|
@@ -1109,7 +1109,7 @@
|
|
|
</el-tooltip>
|
|
|
</el-form-item>
|
|
|
</div>
|
|
|
- <div class="custom-css" v-if="user_form.placeType != 1">
|
|
|
+ <div v-if="user_form.placeType != 1" class="custom-css">
|
|
|
<el-form-item
|
|
|
label="打卡方式"
|
|
|
class="form-item-style item-margin-bottom"
|
|
@@ -1137,42 +1137,75 @@
|
|
|
<el-radio label="2">钉钉</el-radio>
|
|
|
</el-radio-group>
|
|
|
</el-form-item>
|
|
|
- <div class="flex" v-if="user_form.clockWayType == 1">
|
|
|
- <el-form-item
|
|
|
- label="推送地址"
|
|
|
- class="form-item-style special"
|
|
|
- prop="clockWayPushUrl"
|
|
|
- >
|
|
|
- <el-input
|
|
|
- v-model.trim="user_form.clockWayPushUrl"
|
|
|
- placeholder="请选择推送地址"
|
|
|
- />
|
|
|
- </el-form-item>
|
|
|
- <el-form-item
|
|
|
- label="推送字段"
|
|
|
- class="form-item-style special"
|
|
|
- prop="punchReportFieldsConfig"
|
|
|
- >
|
|
|
- <el-select
|
|
|
- filterable
|
|
|
- clearable
|
|
|
- multiple
|
|
|
- collapse-tags
|
|
|
- v-model="user_form.punchReportFieldsConfig"
|
|
|
- placeholder="请选择推送字段"
|
|
|
- style="width: 100%"
|
|
|
+
|
|
|
+ <div v-if="user_form.clockWayType == 1">
|
|
|
+ <div v-for="(clockWayItem, index) in user_form.clockWayPushInterfaceAddresses" :key="index" style="width:100%;display: flex;align-items: center;">
|
|
|
+ <el-form-item
|
|
|
+ label-width="78px"
|
|
|
+ :label="`推送地址${index+1}`"
|
|
|
+ class="form-item-style"
|
|
|
+ style="width: 400px;flex:none;"
|
|
|
+ :prop="`clockWayPushInterfaceAddresses.${index}.interfAddr`"
|
|
|
>
|
|
|
- <el-option
|
|
|
- v-for="item in pushField"
|
|
|
- :key="item.value"
|
|
|
- :label="item.label"
|
|
|
- :value="item.value"
|
|
|
+ <el-input
|
|
|
+ v-model="clockWayItem.interfAddr"
|
|
|
+ placeholder="请选择推送地址"
|
|
|
+ />
|
|
|
+ </el-form-item>
|
|
|
+ <el-form-item
|
|
|
+ label-width="78px"
|
|
|
+ label-position="right"
|
|
|
+ label="推送字段"
|
|
|
+ class="form-item-style"
|
|
|
+ :prop="`clockWayPushInterfaceAddresses.${index}.punchReportFields`"
|
|
|
+ :rules="{ required: true, type: 'array', message: '推送字段不能为空', trigger: ['change', 'blur'], validator: clockWayRule }"
|
|
|
+ style="margin-left:13px;width: 309px;flex:none;"
|
|
|
+ >
|
|
|
+ <el-select
|
|
|
+ v-model="clockWayItem.punchReportFields"
|
|
|
+ filterable
|
|
|
+ clearable
|
|
|
+ multiple
|
|
|
+ collapse-tags
|
|
|
+ placeholder="请选择推送字段"
|
|
|
+ style="width: 100%"
|
|
|
>
|
|
|
- </el-option>
|
|
|
- </el-select>
|
|
|
- </el-form-item>
|
|
|
+ <el-option
|
|
|
+ v-for="item in pushField"
|
|
|
+ :key="item.value"
|
|
|
+ :label="item.label"
|
|
|
+ :value="item.value"
|
|
|
+ />
|
|
|
+ </el-select>
|
|
|
+ </el-form-item>
|
|
|
+ <el-form-item
|
|
|
+ label-width="78px"
|
|
|
+ class="form-item-style"
|
|
|
+ style="margin-left:10px;width:309px;flex:none;"
|
|
|
+ :prop="`clockWayPushInterfaceAddresses.${index}.zoneId`"
|
|
|
+ >
|
|
|
+ <div slot="label" style="text-align: right;">绑定区域</div>
|
|
|
+ <el-select
|
|
|
+ v-model="clockWayItem.zoneId"
|
|
|
+ filterable
|
|
|
+ style="width:100%;"
|
|
|
+ placeholder="请绑定区域"
|
|
|
+ @change="e => checkWayOfAreaSelectChange(e, index)"
|
|
|
+ >
|
|
|
+ <el-option
|
|
|
+ v-for="item in platformAreaList"
|
|
|
+ :key="item.id"
|
|
|
+ :label="item.name"
|
|
|
+ :value="item.id"
|
|
|
+ :disabled="checkWayOfSelectedPlatformAreaList && checkWayOfSelectedPlatformAreaList.length > 0 && checkWayOfSelectedPlatformAreaList.includes(item.id)"
|
|
|
+ />
|
|
|
+ </el-select>
|
|
|
+ </el-form-item>
|
|
|
+ <el-button v-if="user_form.clockWayPushInterfaceAddresses && user_form.clockWayPushInterfaceAddresses.length > 1" icon="el-icon-close" size="small" circle style="align-self: flex-start;margin:4px 0 0 6px;border:none;" @click.prevent="removeCheckWayInterfaceAddress(index, clockWayItem.zoneId)" />
|
|
|
+ <el-button type="info" icon="el-icon-plus" size="small" circle style="align-self: flex-start;margin:4px 0 0 6px;" @click.prevent="addCheckWayInterfaceAddress" />
|
|
|
+ </div>
|
|
|
</div>
|
|
|
- <div class="flex" v-if="user_form.clockWayType == 2">
|
|
|
+ <div v-if="user_form.clockWayType == 2" class="flex">
|
|
|
<el-form-item
|
|
|
label="AppKey"
|
|
|
class="form-item-style special"
|
|
@@ -1542,6 +1575,7 @@
|
|
|
<el-button @click="dialogVisible = false"> 取消 </el-button>
|
|
|
<el-button
|
|
|
type="primary"
|
|
|
+ :loading="submitLoading"
|
|
|
@click="dialogType === 'add' ? add() : doUpdate()"
|
|
|
>
|
|
|
确定
|
|
@@ -1738,6 +1772,8 @@ export default {
|
|
|
area_list_search: [],
|
|
|
// 是否显示对话框
|
|
|
dialogVisible: false,
|
|
|
+ // 提交状态
|
|
|
+ submitLoading: false,
|
|
|
// 对话框标题
|
|
|
dialogTitle: {
|
|
|
add: "添加账号",
|
|
@@ -1774,8 +1810,14 @@ export default {
|
|
|
isPush: 0,
|
|
|
addCustomList: [], //自定义字段
|
|
|
clockWayType: "0", //打卡方式
|
|
|
- clockWayPushUrl: null, //推送地址
|
|
|
- punchReportFieldsConfig: [], //推送字段
|
|
|
+ // clockWayPushUrl: null, //推送地址
|
|
|
+ // punchReportFieldsConfig: [], //推送字段
|
|
|
+ // 打卡方式-通用 [{"interfAddr":"三方接口地址","punchReportFields":"打卡上报字段, 多个逗号分割","zoneId":"所在区域ID"}]
|
|
|
+ clockWayPushInterfaceAddresses: [{
|
|
|
+ interfAddr: null,
|
|
|
+ punchReportFields: null,
|
|
|
+ zoneId: null
|
|
|
+ }],
|
|
|
dingtalkAppKey: null,
|
|
|
dingtalkAppSecret: null,
|
|
|
placeType: 0, //场所类型
|
|
@@ -1814,7 +1856,7 @@ export default {
|
|
|
openThirdLinkPlatform: false,
|
|
|
interfaceAddress: null,
|
|
|
interfaceAddresses: [{
|
|
|
- interfAddr: null,
|
|
|
+ interfAddr: null,
|
|
|
zoneId: null
|
|
|
}],
|
|
|
subLineSuccess: null,
|
|
@@ -1830,23 +1872,23 @@ export default {
|
|
|
scene_list: [
|
|
|
{
|
|
|
name: "通用场景",
|
|
|
- id: 0,
|
|
|
+ id: 0
|
|
|
},
|
|
|
{
|
|
|
name: "楼宇场景",
|
|
|
- id: 2,
|
|
|
+ id: 2
|
|
|
},
|
|
|
{
|
|
|
name: "预约场景",
|
|
|
- id: 1,
|
|
|
- },
|
|
|
+ id: 1
|
|
|
+ }
|
|
|
],
|
|
|
// 账号级别
|
|
|
type_list: [
|
|
|
{ id: 2, name: "省级超管员", disabled: false },
|
|
|
{ id: 3, name: "省级管理员", disabled: false },
|
|
|
{ id: 4, name: "市级管理员" },
|
|
|
- { id: 5, name: "区级管理员" },
|
|
|
+ { id: 5, name: "区级管理员" }
|
|
|
],
|
|
|
// 账号类别
|
|
|
tag_list: [],
|
|
@@ -1858,8 +1900,8 @@ export default {
|
|
|
min: 2,
|
|
|
max: 20,
|
|
|
message: "长度在 2 到 20 个字符",
|
|
|
- trigger: "blur",
|
|
|
- },
|
|
|
+ trigger: "blur"
|
|
|
+ }
|
|
|
],
|
|
|
type: [
|
|
|
{ required: true, message: "请选择账号级别", trigger: "change" },
|
|
@@ -1869,7 +1911,7 @@ export default {
|
|
|
required: true,
|
|
|
message: "请选择是否导出记录功能",
|
|
|
trigger: "change",
|
|
|
- },
|
|
|
+ }
|
|
|
],
|
|
|
isHideImportant: [
|
|
|
{ required: true, message: "请选择是否脱敏", trigger: "change" },
|
|
@@ -1879,14 +1921,14 @@ export default {
|
|
|
required: true,
|
|
|
message: "请选择是否为布控账号",
|
|
|
trigger: "change",
|
|
|
- },
|
|
|
+ }
|
|
|
],
|
|
|
openInOutStatistics: [
|
|
|
{
|
|
|
required: true,
|
|
|
message: "请选择是否开启进出记录统计",
|
|
|
trigger: "change",
|
|
|
- },
|
|
|
+ }
|
|
|
],
|
|
|
tagId: [
|
|
|
{ required: false, message: "请选择账号类别", trigger: "change" },
|
|
@@ -1898,7 +1940,7 @@ export default {
|
|
|
max: 20,
|
|
|
message: "长度在 2 到 20 个字符",
|
|
|
trigger: "blur",
|
|
|
- },
|
|
|
+ }
|
|
|
],
|
|
|
phone: [
|
|
|
{ required: true, message: "请输入管理员手机号", trigger: "change" },
|
|
@@ -1921,7 +1963,7 @@ export default {
|
|
|
required: true,
|
|
|
message: "请选择是否开启员工身份证认证",
|
|
|
trigger: "blur",
|
|
|
- },
|
|
|
+ }
|
|
|
],
|
|
|
password: [
|
|
|
{ required: true, message: "请输入密码", trigger: "blur" },
|
|
@@ -1930,98 +1972,98 @@ export default {
|
|
|
/^(((?=.*\d)(?=.*[a-z])(?=.*[A-Z]))|((?=.*\d)(?=.*[a-z])(?=.*[~!@#$%^&*]))|((?=.*\d)(?=.*[A-Z])(?=.*[~!@#$%^&*]))|((?=.*[a-z])(?=.*[A-Z])(?=.*[~!@#$%^&*]))|((?=.*\d)(?=.*[a-z])(?=.*[A-Z])(?=.*[~!@#$%^&*]))).{10,32}$/,
|
|
|
message:
|
|
|
"必须大小写字母、数字、特殊字符,4种组合中至少满足3种,且密码长度在10-32位之间",
|
|
|
- },
|
|
|
+ }
|
|
|
],
|
|
|
customName: [
|
|
|
{
|
|
|
required: true,
|
|
|
message: "请输入名称",
|
|
|
trigger: "blur",
|
|
|
- },
|
|
|
+ }
|
|
|
],
|
|
|
customType: [
|
|
|
{
|
|
|
required: true,
|
|
|
message: "请选择字段类型",
|
|
|
trigger: "blur",
|
|
|
- },
|
|
|
+ }
|
|
|
],
|
|
|
configurationOptions: [
|
|
|
{
|
|
|
required: true,
|
|
|
message: "请输入选项配置",
|
|
|
trigger: "blur",
|
|
|
- },
|
|
|
+ }
|
|
|
],
|
|
|
addressCode: [
|
|
|
{
|
|
|
required: true,
|
|
|
message: "请输入场所码Code",
|
|
|
trigger: "blur",
|
|
|
- },
|
|
|
+ }
|
|
|
],
|
|
|
unitName: [
|
|
|
{
|
|
|
required: true,
|
|
|
message: "请输入单位名称",
|
|
|
trigger: "blur",
|
|
|
- },
|
|
|
+ }
|
|
|
],
|
|
|
unitAddress: [
|
|
|
{
|
|
|
required: true,
|
|
|
message: "请输入详细地址",
|
|
|
trigger: "blur",
|
|
|
- },
|
|
|
+ }
|
|
|
],
|
|
|
placeAreaCode: [
|
|
|
{
|
|
|
required: true,
|
|
|
message: "请选择",
|
|
|
trigger: "blur",
|
|
|
- },
|
|
|
+ }
|
|
|
],
|
|
|
isShowCustomWord: [
|
|
|
{
|
|
|
required: true,
|
|
|
message: "请选择",
|
|
|
trigger: "blur",
|
|
|
- },
|
|
|
+ }
|
|
|
],
|
|
|
codeType: [
|
|
|
{
|
|
|
required: true,
|
|
|
message: "请选择",
|
|
|
trigger: "blur",
|
|
|
- },
|
|
|
+ }
|
|
|
],
|
|
|
placeType: [
|
|
|
{
|
|
|
required: true,
|
|
|
message: "请选择",
|
|
|
trigger: "blur",
|
|
|
- },
|
|
|
+ }
|
|
|
],
|
|
|
userWhitelistEffectiveTime: [
|
|
|
{
|
|
|
required: true,
|
|
|
message: "请填写",
|
|
|
trigger: "blur",
|
|
|
- },
|
|
|
+ }
|
|
|
],
|
|
|
userVisiterEffectiveTime: [
|
|
|
{
|
|
|
required: true,
|
|
|
message: "请填写",
|
|
|
trigger: "blur",
|
|
|
- },
|
|
|
+ }
|
|
|
],
|
|
|
cardPhysics: [
|
|
|
{
|
|
|
required: true,
|
|
|
message: "请填写",
|
|
|
trigger: "blur",
|
|
|
- },
|
|
|
+ }
|
|
|
],
|
|
|
faceLogHoldDays: [
|
|
|
{
|
|
@@ -2032,35 +2074,32 @@ export default {
|
|
|
],
|
|
|
clockWayType: [{ required: true, message: "请选择", trigger: "blur" }],
|
|
|
dingtalkAppKey: [
|
|
|
- { required: true, message: "请输入钉钉唯一标识key", trigger: "blur" },
|
|
|
+ { required: true, message: "请输入钉钉唯一标识key", trigger: "blur" }
|
|
|
],
|
|
|
dingtalkAppSecret: [
|
|
|
- { required: true, message: "请输入钉钉密钥", trigger: "blur" },
|
|
|
- ],
|
|
|
- clockWayPushUrl: [
|
|
|
- { required: false, message: "请输入推送地址", trigger: "blur" },
|
|
|
+ { required: true, message: "请输入钉钉密钥", trigger: "blur" }
|
|
|
],
|
|
|
disinfectFlag: [{ required: true, message: "请选择", trigger: "blur" }],
|
|
|
problemReportFlag: [
|
|
|
- { required: true, message: "请选择", trigger: "blur" },
|
|
|
+ { required: true, message: "请选择", trigger: "blur" }
|
|
|
],
|
|
|
wxLoginType: [{ required: true, message: "请选择", trigger: "blur" }],
|
|
|
isNeedRealAuthentication: [
|
|
|
- { required: true, message: "请选择", trigger: "blur" },
|
|
|
+ { required: true, message: "请选择", trigger: "blur" }
|
|
|
],
|
|
|
mobileAutoInputFlag: [
|
|
|
- { required: true, message: "请选择", trigger: "blur" },
|
|
|
+ { required: true, message: "请选择", trigger: "blur" }
|
|
|
],
|
|
|
isOpenExam: [{ required: true, message: "请选择", trigger: "blur" }],
|
|
|
isOpenVisitorClear: [
|
|
|
- { required: true, message: "请选择", trigger: "blur" },
|
|
|
+ { required: true, message: "请选择", trigger: "blur" }
|
|
|
],
|
|
|
topTitle: [
|
|
|
{
|
|
|
required: true,
|
|
|
message: "请输入",
|
|
|
- trigger: "blur",
|
|
|
- },
|
|
|
+ trigger: "blur"
|
|
|
+ }
|
|
|
],
|
|
|
latestResultPage: [
|
|
|
{
|
|
@@ -2085,6 +2124,8 @@ export default {
|
|
|
platformAreaList: [],
|
|
|
// 选中的区域列表
|
|
|
selectedPlatformAreaList: [],
|
|
|
+ // 打卡方式-通用 的区域选中列表
|
|
|
+ checkWayOfSelectedPlatformAreaList: [],
|
|
|
// 字段类型
|
|
|
customType_list: [
|
|
|
{ id: 1, name: "文本" },
|
|
@@ -2093,14 +2134,14 @@ export default {
|
|
|
{ id: 4, name: "省市区街道" },
|
|
|
{ id: 5, name: "日期" },
|
|
|
{ id: 6, name: "时间" },
|
|
|
- { id: 7, name: "图片" },
|
|
|
+ { id: 7, name: "图片" }
|
|
|
],
|
|
|
// 推送字段
|
|
|
pushField: [],
|
|
|
doUpload: "",
|
|
|
placeAreaCode_list: [], //场所码所属区域
|
|
|
- row: {},
|
|
|
- };
|
|
|
+ row: {}
|
|
|
+ }
|
|
|
},
|
|
|
created() {
|
|
|
this.fetchData()
|
|
@@ -2150,8 +2191,13 @@ export default {
|
|
|
this.user_form.dingtalkAppSecret = ''
|
|
|
}
|
|
|
if (n !== '1') {
|
|
|
- this.user_form.clockWayPushUrl = null
|
|
|
- this.user_form.punchReportFieldsConfig = []
|
|
|
+ // this.user_form.clockWayPushUrl = null
|
|
|
+ // this.user_form.punchReportFieldsConfig = []
|
|
|
+ this.user_form.clockWayPushInterfaceAddresses = [{
|
|
|
+ interfAddr: null,
|
|
|
+ punchReportFields: null,
|
|
|
+ zoneId: null
|
|
|
+ }]
|
|
|
}
|
|
|
}
|
|
|
},
|
|
@@ -2161,6 +2207,12 @@ export default {
|
|
|
isdisabled(e) {
|
|
|
return e === 0
|
|
|
},
|
|
|
+ clockWayRule(rule, value, callback) {
|
|
|
+ if (value && value.length > 0) {
|
|
|
+ return callback()
|
|
|
+ }
|
|
|
+ return callback('推送字段不能为空!')
|
|
|
+ },
|
|
|
// 获取区域列表
|
|
|
getPlatformList(adminId) {
|
|
|
getAreaList({ adminId }).then((res) => {
|
|
@@ -2169,6 +2221,13 @@ export default {
|
|
|
id: 0,
|
|
|
name: '全部'
|
|
|
})
|
|
|
+ if (this.user_form.clockWayPushInterfaceAddresses && this.user_form.clockWayPushInterfaceAddresses.length > 0) {
|
|
|
+ for (let i = 0; i < this.user_form.clockWayPushInterfaceAddresses.length; i++) {
|
|
|
+ if (this.user_form.clockWayPushInterfaceAddresses[i].zoneId !== null) {
|
|
|
+ this.checkWayOfSelectedPlatformAreaList.push(this.user_form.clockWayPushInterfaceAddresses[i].zoneId)
|
|
|
+ }
|
|
|
+ }
|
|
|
+ }
|
|
|
if (this.user_form.interfaceAddresses && this.user_form.interfaceAddresses.length > 0) {
|
|
|
for (let i = 0; i < this.user_form.interfaceAddresses.length; i++) {
|
|
|
if (this.user_form.interfaceAddresses[i].zoneId !== null) {
|
|
@@ -2185,18 +2244,38 @@ export default {
|
|
|
this.selectedPlatformAreaList.push(value)
|
|
|
}
|
|
|
},
|
|
|
+ checkWayOfAreaSelectChange(value, index) {
|
|
|
+ if (this.checkWayOfSelectedPlatformAreaList[index] !== null) {
|
|
|
+ this.checkWayOfSelectedPlatformAreaList[index] = value
|
|
|
+ } else {
|
|
|
+ this.checkWayOfSelectedPlatformAreaList.push(value)
|
|
|
+ }
|
|
|
+ },
|
|
|
removeInterfaceAddress(index, value) {
|
|
|
this.user_form.interfaceAddresses.splice(index, 1)
|
|
|
this.selectedPlatformAreaList = this.selectedPlatformAreaList.filter(function(item) {
|
|
|
return item !== value
|
|
|
})
|
|
|
},
|
|
|
+ removeCheckWayInterfaceAddress(index, value) {
|
|
|
+ this.user_form.clockWayPushInterfaceAddresses.splice(index, 1)
|
|
|
+ this.checkWayOfSelectedPlatformAreaList = this.checkWayOfSelectedPlatformAreaList.filter(function(item) {
|
|
|
+ return item !== value
|
|
|
+ })
|
|
|
+ },
|
|
|
addInterfaceAddress() {
|
|
|
this.user_form.interfaceAddresses.push({
|
|
|
interfAddr: null,
|
|
|
zoneId: null
|
|
|
})
|
|
|
},
|
|
|
+ addCheckWayInterfaceAddress() {
|
|
|
+ this.user_form.clockWayPushInterfaceAddresses.push({
|
|
|
+ interfAddr: null,
|
|
|
+ punchReportFields: null,
|
|
|
+ zoneId: null
|
|
|
+ })
|
|
|
+ },
|
|
|
// 添加自定义
|
|
|
addCustom(index) {
|
|
|
this.user_form.addCustomList.splice(index + 1, 0, {
|
|
@@ -2365,9 +2444,13 @@ export default {
|
|
|
},
|
|
|
// 确定添加
|
|
|
add() {
|
|
|
- this.$refs["user_form"].validate((valid) => {
|
|
|
+ if (this.submitLoading) {
|
|
|
+ return
|
|
|
+ }
|
|
|
+ this.$refs['user_form'].validate((valid) => {
|
|
|
if (valid) {
|
|
|
- if(!this.user_form.openThirdLinkPlatform) {
|
|
|
+ this.submitLoading = true
|
|
|
+ if (!this.user_form.openThirdLinkPlatform) {
|
|
|
this.user_form.interfaceAddresses = null
|
|
|
}
|
|
|
if (this.user_form.interfaceAddresses && this.user_form.interfaceAddresses.length > 0) {
|
|
@@ -2378,6 +2461,22 @@ export default {
|
|
|
this.user_form.interfaceAddresses = null
|
|
|
}
|
|
|
}
|
|
|
+ if (this.user_form.clockWayPushInterfaceAddresses && this.user_form.clockWayPushInterfaceAddresses.length > 0) {
|
|
|
+ this.user_form.clockWayPushInterfaceAddresses = this.user_form.clockWayPushInterfaceAddresses.filter(item => {
|
|
|
+ return item.interfAddr !== null && (item.punchReportFields !== null && item.punchReportFields.length > 0) && item.zoneId !== null
|
|
|
+ })
|
|
|
+ if (this.user_form.clockWayPushInterfaceAddresses.length <= 0) {
|
|
|
+ this.user_form.clockWayPushInterfaceAddresses = null
|
|
|
+ } else {
|
|
|
+ this.user_form.clockWayPushInterfaceAddresses = this.user_form.clockWayPushInterfaceAddresses.map(item => {
|
|
|
+ return {
|
|
|
+ interfAddr: item.interfAddr,
|
|
|
+ zoneId: item.zoneId,
|
|
|
+ punchReportFields: (item.punchReportFields && item.punchReportFields > 0) ? item.punchReportFields.join(',') : null
|
|
|
+ }
|
|
|
+ })
|
|
|
+ }
|
|
|
+ }
|
|
|
if (this.user_form.latestResultPage) {
|
|
|
this.user_form.mainLineLeft = null
|
|
|
this.user_form.subLineLeft = null
|
|
@@ -2388,11 +2487,12 @@ export default {
|
|
|
this.user_form.advertise = null
|
|
|
}
|
|
|
doEditAdmin(this.user_form).then((res) => {
|
|
|
+ this.submitLoading = false
|
|
|
this.dialogVisible = false
|
|
|
this.fetchData()
|
|
|
this.$message({
|
|
|
- type: "success",
|
|
|
- message: "添加成功!"
|
|
|
+ type: 'success',
|
|
|
+ message: '添加成功!'
|
|
|
})
|
|
|
})
|
|
|
}
|
|
@@ -2404,19 +2504,20 @@ export default {
|
|
|
confirmButtonText: "确定",
|
|
|
cancelButtonText: "取消",
|
|
|
type: "warning",
|
|
|
- center: true,
|
|
|
+ center: true
|
|
|
}).then(() => {
|
|
|
doDeleteAdmin(id).then((res) => {
|
|
|
- this.fetchData();
|
|
|
+ this.fetchData()
|
|
|
this.$message({
|
|
|
type: "success",
|
|
|
- message: "删除成功!",
|
|
|
- });
|
|
|
- });
|
|
|
- });
|
|
|
+ message: "删除成功!"
|
|
|
+ })
|
|
|
+ })
|
|
|
+ })
|
|
|
},
|
|
|
// 打开编辑
|
|
|
update(row) {
|
|
|
+ this.checkWayOfSelectedPlatformAreaList = []
|
|
|
this.selectedPlatformAreaList = []
|
|
|
this.user_form = Object.assign(this.user_form, row)
|
|
|
this.row = row
|
|
@@ -2426,13 +2527,14 @@ export default {
|
|
|
if (this.user_form.realAuthenticationAgeEnd == null) {
|
|
|
this.user_form.realAuthenticationAgeEnd = 200
|
|
|
}
|
|
|
- this.user_form.password = ""
|
|
|
+ this.user_form.password = ''
|
|
|
this.getAddressList(2, this.user_form.provinceId)
|
|
|
this.getTagList(this.user_form.provinceId)
|
|
|
this.getAddressList(3, this.user_form.cityId)
|
|
|
this.getAddressList(4, this.user_form.areaId)
|
|
|
this.dialogType = "update"
|
|
|
this.dialogVisible = true
|
|
|
+
|
|
|
this.$nextTick(() => {
|
|
|
this.$refs["user_form"].clearValidate()
|
|
|
})
|
|
@@ -2442,7 +2544,30 @@ export default {
|
|
|
this.user_form.isShowCustomWord =
|
|
|
this.user_form.addCustomList.length > 0
|
|
|
})
|
|
|
- if(!this.user_form.interfaceAddresses || this.user_form.interfaceAddresses.length <= 0) {
|
|
|
+ if (this.user_form.clockWayPushInterfaceAddresses && this.user_form.clockWayPushInterfaceAddresses.length > 0) {
|
|
|
+ this.user_form.clockWayPushInterfaceAddresses = this.user_form.clockWayPushInterfaceAddresses.map(item => {
|
|
|
+ let punchReportFields = null
|
|
|
+ if (typeof item.punchReportFields === 'string') {
|
|
|
+ punchReportFields = item.punchReportFields ? item.punchReportFields.split(',') : null
|
|
|
+ } else {
|
|
|
+ punchReportFields = item.punchReportFields
|
|
|
+ }
|
|
|
+ return {
|
|
|
+ interfAddr: item.interfAddr,
|
|
|
+ zoneId: item.zoneId,
|
|
|
+ punchReportFields
|
|
|
+ }
|
|
|
+ })
|
|
|
+ } else {
|
|
|
+ this.user_form.clockWayPushInterfaceAddresses = []
|
|
|
+ this.user_form.clockWayPushInterfaceAddresses.push({
|
|
|
+ interfAddr: null,
|
|
|
+ zoneId: null,
|
|
|
+ punchReportFields: null
|
|
|
+ })
|
|
|
+ }
|
|
|
+
|
|
|
+ if (!this.user_form.interfaceAddresses || this.user_form.interfaceAddresses.length <= 0) {
|
|
|
this.user_form.interfaceAddresses = []
|
|
|
this.user_form.interfaceAddresses.push({
|
|
|
interfAddr: null,
|
|
@@ -2466,16 +2591,20 @@ export default {
|
|
|
},
|
|
|
// 确定编辑
|
|
|
doUpdate() {
|
|
|
+ if (this.submitLoading) {
|
|
|
+ return
|
|
|
+ }
|
|
|
this.$refs["user_form"].validate((valid) => {
|
|
|
if (valid) {
|
|
|
+ this.submitLoading = true
|
|
|
if (!this.user_form.homeImgUrl) {
|
|
|
this.user_form.homeImgUrl =
|
|
|
"https://tx.hz-hanghui.com:8088/yx-fyzd/file/icon/face.jpg";
|
|
|
}
|
|
|
- if(!this.user_form.openThirdLinkPlatform) {
|
|
|
+ if (!this.user_form.openThirdLinkPlatform) {
|
|
|
this.user_form.interfaceAddresses = null
|
|
|
}
|
|
|
- if(this.user_form.interfaceAddresses && this.user_form.interfaceAddresses.length > 0) {
|
|
|
+ if (this.user_form.interfaceAddresses && this.user_form.interfaceAddresses.length > 0) {
|
|
|
this.user_form.interfaceAddresses = this.user_form.interfaceAddresses.filter(item => {
|
|
|
return item.interfAddr !== null && item.zoneId !== null
|
|
|
})
|
|
@@ -2483,16 +2612,42 @@ export default {
|
|
|
this.user_form.interfaceAddresses = null
|
|
|
}
|
|
|
}
|
|
|
+ if (this.user_form.clockWayPushInterfaceAddresses && this.user_form.clockWayPushInterfaceAddresses.length > 0) {
|
|
|
+ this.user_form.clockWayPushInterfaceAddresses = this.user_form.clockWayPushInterfaceAddresses.filter(item => {
|
|
|
+ return item.interfAddr !== null && (item.punchReportFields !== null && item.punchReportFields.length > 0) && item.zoneId !== null
|
|
|
+ })
|
|
|
+ if (this.user_form.clockWayPushInterfaceAddresses.length <= 0) {
|
|
|
+ this.user_form.clockWayPushInterfaceAddresses = null
|
|
|
+ } else {
|
|
|
+ this.user_form.clockWayPushInterfaceAddresses = this.user_form.clockWayPushInterfaceAddresses.map(item => {
|
|
|
+ return {
|
|
|
+ interfAddr: item.interfAddr,
|
|
|
+ zoneId: item.zoneId,
|
|
|
+ punchReportFields: (item.punchReportFields && item.punchReportFields.length > 0) ? item.punchReportFields.join(',') : null
|
|
|
+ }
|
|
|
+ })
|
|
|
+ }
|
|
|
+ }
|
|
|
+ if (this.user_form.latestResultPage) {
|
|
|
+ this.user_form.mainLineLeft = null
|
|
|
+ this.user_form.subLineLeft = null
|
|
|
+ this.user_form.mainLineRight = null
|
|
|
+ this.user_form.subLineRight = null
|
|
|
+ this.user_form.showQrcode = false
|
|
|
+ this.user_form.qrcodeText = null
|
|
|
+ this.user_form.advertise = null
|
|
|
+ }
|
|
|
doEditAdmin(this.user_form).then((res) => {
|
|
|
- this.dialogVisible = false;
|
|
|
- this.fetchData();
|
|
|
+ this.dialogVisible = false
|
|
|
+ this.submitLoading = false
|
|
|
+ this.fetchData()
|
|
|
this.$message({
|
|
|
type: "success",
|
|
|
- message: "编辑成功!",
|
|
|
- });
|
|
|
- });
|
|
|
+ message: "编辑成功!"
|
|
|
+ })
|
|
|
+ })
|
|
|
}
|
|
|
- });
|
|
|
+ })
|
|
|
},
|
|
|
// 下载模板
|
|
|
download() {
|