|
@@ -356,9 +356,9 @@
|
|
:close-on-click-modal="false"
|
|
:close-on-click-modal="false"
|
|
>
|
|
>
|
|
<el-form
|
|
<el-form
|
|
|
|
+ ref="user_form"
|
|
:model="user_form"
|
|
:model="user_form"
|
|
:rules="rules"
|
|
:rules="rules"
|
|
- ref="user_form"
|
|
|
|
label-width="150px"
|
|
label-width="150px"
|
|
label-position="left"
|
|
label-position="left"
|
|
>
|
|
>
|
|
@@ -529,10 +529,10 @@
|
|
</div>
|
|
</div>
|
|
<div class="flex">
|
|
<div class="flex">
|
|
<el-form-item
|
|
<el-form-item
|
|
|
|
+ v-if="dialogType === 'add'"
|
|
label="账号级别"
|
|
label="账号级别"
|
|
class="form-item-style"
|
|
class="form-item-style"
|
|
prop="type"
|
|
prop="type"
|
|
- v-if="dialogType === 'add'"
|
|
|
|
>
|
|
>
|
|
<el-select
|
|
<el-select
|
|
v-model="user_form.type"
|
|
v-model="user_form.type"
|
|
@@ -542,12 +542,11 @@
|
|
>
|
|
>
|
|
<el-option
|
|
<el-option
|
|
v-for="item in type_list"
|
|
v-for="item in type_list"
|
|
- :disabled="item.disabled"
|
|
|
|
:key="item.id"
|
|
:key="item.id"
|
|
|
|
+ :disabled="item.disabled"
|
|
:label="item.name"
|
|
:label="item.name"
|
|
:value="item.id"
|
|
:value="item.id"
|
|
- >
|
|
|
|
- </el-option>
|
|
|
|
|
|
+ />
|
|
</el-select>
|
|
</el-select>
|
|
</el-form-item>
|
|
</el-form-item>
|
|
<el-form-item
|
|
<el-form-item
|
|
@@ -563,12 +562,11 @@
|
|
>
|
|
>
|
|
<el-option
|
|
<el-option
|
|
v-for="item in tag_list"
|
|
v-for="item in tag_list"
|
|
- :disabled="item.disabled"
|
|
|
|
:key="item.id"
|
|
:key="item.id"
|
|
|
|
+ :disabled="item.disabled"
|
|
:label="item.name"
|
|
:label="item.name"
|
|
:value="item.id"
|
|
:value="item.id"
|
|
- >
|
|
|
|
- </el-option>
|
|
|
|
|
|
+ />
|
|
</el-select>
|
|
</el-select>
|
|
</el-form-item>
|
|
</el-form-item>
|
|
</div>
|
|
</div>
|
|
@@ -647,11 +645,11 @@
|
|
placement="bottom"
|
|
placement="bottom"
|
|
>
|
|
>
|
|
<el-input-number
|
|
<el-input-number
|
|
- size="mini"
|
|
|
|
- :precision="1"
|
|
|
|
v-model="user_form.userWhitelistEffectiveTime"
|
|
v-model="user_form.userWhitelistEffectiveTime"
|
|
|
|
+ :precision="1"
|
|
:min="0"
|
|
:min="0"
|
|
- ></el-input-number>
|
|
|
|
|
|
+ size="mini"
|
|
|
|
+ />
|
|
</el-tooltip>
|
|
</el-tooltip>
|
|
</el-form-item>
|
|
</el-form-item>
|
|
<el-form-item
|
|
<el-form-item
|
|
@@ -667,11 +665,11 @@
|
|
placement="bottom"
|
|
placement="bottom"
|
|
>
|
|
>
|
|
<el-input-number
|
|
<el-input-number
|
|
- size="mini"
|
|
|
|
- :precision="1"
|
|
|
|
v-model="user_form.userVisiterEffectiveTime"
|
|
v-model="user_form.userVisiterEffectiveTime"
|
|
|
|
+ :precision="1"
|
|
:min="0"
|
|
:min="0"
|
|
- ></el-input-number>
|
|
|
|
|
|
+ size="mini"
|
|
|
|
+ />
|
|
</el-tooltip>
|
|
</el-tooltip>
|
|
</el-form-item>
|
|
</el-form-item>
|
|
</div>
|
|
</div>
|
|
@@ -689,10 +687,10 @@
|
|
placement="bottom"
|
|
placement="bottom"
|
|
>
|
|
>
|
|
<el-input-number
|
|
<el-input-number
|
|
- size="mini"
|
|
|
|
v-model="user_form.realAuthenticationAgeStart"
|
|
v-model="user_form.realAuthenticationAgeStart"
|
|
:min="0"
|
|
:min="0"
|
|
- ></el-input-number>
|
|
|
|
|
|
+ size="mini"
|
|
|
|
+ />
|
|
</el-tooltip>
|
|
</el-tooltip>
|
|
至
|
|
至
|
|
<el-tooltip
|
|
<el-tooltip
|
|
@@ -703,10 +701,10 @@
|
|
placement="bottom"
|
|
placement="bottom"
|
|
>
|
|
>
|
|
<el-input-number
|
|
<el-input-number
|
|
- size="mini"
|
|
|
|
v-model="user_form.realAuthenticationAgeEnd"
|
|
v-model="user_form.realAuthenticationAgeEnd"
|
|
:min="0"
|
|
:min="0"
|
|
- ></el-input-number>
|
|
|
|
|
|
+ size="mini"
|
|
|
|
+ />
|
|
</el-tooltip>
|
|
</el-tooltip>
|
|
</el-form-item>
|
|
</el-form-item>
|
|
<el-form-item
|
|
<el-form-item
|
|
@@ -722,10 +720,10 @@
|
|
placement="bottom"
|
|
placement="bottom"
|
|
>
|
|
>
|
|
<el-input-number
|
|
<el-input-number
|
|
- size="mini"
|
|
|
|
v-model="user_form.notAllowAgeStart"
|
|
v-model="user_form.notAllowAgeStart"
|
|
:min="0"
|
|
:min="0"
|
|
- ></el-input-number>
|
|
|
|
|
|
+ size="mini"
|
|
|
|
+ />
|
|
</el-tooltip>
|
|
</el-tooltip>
|
|
至
|
|
至
|
|
<el-tooltip
|
|
<el-tooltip
|
|
@@ -736,10 +734,10 @@
|
|
placement="bottom"
|
|
placement="bottom"
|
|
>
|
|
>
|
|
<el-input-number
|
|
<el-input-number
|
|
- size="mini"
|
|
|
|
v-model="user_form.notAllowAgeEnd"
|
|
v-model="user_form.notAllowAgeEnd"
|
|
:min="0"
|
|
:min="0"
|
|
- ></el-input-number>
|
|
|
|
|
|
+ size="mini"
|
|
|
|
+ />
|
|
</el-tooltip>
|
|
</el-tooltip>
|
|
</el-form-item>
|
|
</el-form-item>
|
|
</div>
|
|
</div>
|
|
@@ -1242,14 +1240,16 @@
|
|
class="el-icon-download form-item-style"
|
|
class="el-icon-download form-item-style"
|
|
type="text"
|
|
type="text"
|
|
@click="getAppKeyAndAppSecret(true)"
|
|
@click="getAppKeyAndAppSecret(true)"
|
|
- >密钥</el-button
|
|
|
|
>
|
|
>
|
|
|
|
+ 密钥
|
|
|
|
+ </el-button>
|
|
<el-button
|
|
<el-button
|
|
class="el-icon-download form-item-style"
|
|
class="el-icon-download form-item-style"
|
|
type="text"
|
|
type="text"
|
|
@click="getAppKeyAndAppSecret(false)"
|
|
@click="getAppKeyAndAppSecret(false)"
|
|
- >文档</el-button
|
|
|
|
>
|
|
>
|
|
|
|
+ 文档
|
|
|
|
+ </el-button>
|
|
</span>
|
|
</span>
|
|
</el-form-item>
|
|
</el-form-item>
|
|
<el-form-item
|
|
<el-form-item
|
|
@@ -1263,10 +1263,11 @@
|
|
placeholder="请输入顶部标题"
|
|
placeholder="请输入顶部标题"
|
|
maxlength="8"
|
|
maxlength="8"
|
|
show-word-limit
|
|
show-word-limit
|
|
- ></el-input>
|
|
|
|
|
|
+ />
|
|
</el-form-item>
|
|
</el-form-item>
|
|
</div>
|
|
</div>
|
|
<el-form-item
|
|
<el-form-item
|
|
|
|
+ v-if="false"
|
|
label-width="120px"
|
|
label-width="120px"
|
|
label="地址"
|
|
label="地址"
|
|
class="form-item-style"
|
|
class="form-item-style"
|
|
@@ -1275,42 +1276,48 @@
|
|
<el-input
|
|
<el-input
|
|
v-model="user_form.interfaceAddress"
|
|
v-model="user_form.interfaceAddress"
|
|
placeholder="请输入地址"
|
|
placeholder="请输入地址"
|
|
- ></el-input>
|
|
|
|
|
|
+ />
|
|
</el-form-item>
|
|
</el-form-item>
|
|
- <div class="flex interfaceAddress-layout" v-if="false">
|
|
|
|
- <el-form-item
|
|
|
|
- label-width="120px"
|
|
|
|
- label="联动地址"
|
|
|
|
- class="form-item-style"
|
|
|
|
- :prop="user_form.openThirdLinkPlatform?'interfaceAddressInterfAddr':''"
|
|
|
|
- >
|
|
|
|
- <el-input
|
|
|
|
- v-model="user_form.interfaceAddress"
|
|
|
|
- placeholder="请输入联动地址"
|
|
|
|
- ></el-input>
|
|
|
|
- </el-form-item>
|
|
|
|
- <el-form-item
|
|
|
|
- label-width="120px"
|
|
|
|
- label="绑定区域"
|
|
|
|
- class="form-item-style"
|
|
|
|
- :prop="user_form.openThirdLinkPlatform?'interfaceAddressZoneId':''"
|
|
|
|
- >
|
|
|
|
- <el-select
|
|
|
|
- filterable
|
|
|
|
- clearable
|
|
|
|
- v-model="user_form.interfaceAddress"
|
|
|
|
- placeholder="请绑定区域"
|
|
|
|
- class="input"
|
|
|
|
|
|
+ <div v-if="user_form.openThirdLinkPlatform" class="interfaceAddress-layout">
|
|
|
|
+ <div v-for="(interfaceAddressItem, index) in user_form.interfaceAddresses" :key="index" style="width:100%;display: flex;align-items: center;">
|
|
|
|
+ <el-form-item
|
|
|
|
+ label-width="110px"
|
|
|
|
+ :label="`联动地址${index+1}`"
|
|
|
|
+ class="form-item-style"
|
|
|
|
+ style="width: 533px;flex:none;"
|
|
|
|
+ :prop="`interfaceAddresses.${index}.interfAddr`"
|
|
>
|
|
>
|
|
- <el-option
|
|
|
|
- v-for="item in scene_list"
|
|
|
|
- :key="item.id"
|
|
|
|
- :label="item.name"
|
|
|
|
- :value="item.id"
|
|
|
|
|
|
+ <el-input
|
|
|
|
+ v-model="interfaceAddressItem.interfAddr"
|
|
|
|
+ placeholder="请输入联动地址"
|
|
|
|
+ />
|
|
|
|
+ </el-form-item>
|
|
|
|
+ <el-form-item
|
|
|
|
+ label-width="120px"
|
|
|
|
+ label="绑定区域"
|
|
|
|
+ class="form-item-style"
|
|
|
|
+ style="margin-left:60px;width:455px;flex:none;"
|
|
|
|
+ :prop="`interfaceAddresses.${index}.zoneId`"
|
|
|
|
+ >
|
|
|
|
+ <el-select
|
|
|
|
+ v-model="interfaceAddressItem.zoneId"
|
|
|
|
+ filterable
|
|
|
|
+ style="width:100%;"
|
|
|
|
+ placeholder="请绑定区域"
|
|
|
|
+ @change="e => areaSelectChange(e, index)"
|
|
>
|
|
>
|
|
- </el-option>
|
|
|
|
- </el-select>
|
|
|
|
- </el-form-item>
|
|
|
|
|
|
+ <el-option
|
|
|
|
+ v-for="item in platformAreaList"
|
|
|
|
+ :key="item.id"
|
|
|
|
+ :label="item.name"
|
|
|
|
+ :value="item.id"
|
|
|
|
+ :disabled="selectedPlatformAreaList && selectedPlatformAreaList.length > 0 && selectedPlatformAreaList.includes(item.id)"
|
|
|
|
+ />
|
|
|
|
+ </el-select>
|
|
|
|
+ </el-form-item>
|
|
|
|
+ <el-button v-if="user_form.interfaceAddresses && user_form.interfaceAddresses.length > 1" icon="el-icon-close" size="small" circle style="align-self: flex-start;margin:4px 0 0 6px;border:none;" @click.prevent="removeInterfaceAddress(index, interfaceAddressItem.zoneId)" />
|
|
|
|
+ <el-button type="info" icon="el-icon-plus" size="small" circle plain style="align-self: flex-start;margin:4px 0 0 6px;" @click.prevent="addInterfaceAddress" />
|
|
|
|
+ </div>
|
|
</div>
|
|
</div>
|
|
<div class="flex">
|
|
<div class="flex">
|
|
<el-form-item
|
|
<el-form-item
|
|
@@ -1322,7 +1329,7 @@
|
|
<el-input
|
|
<el-input
|
|
v-model="user_form.subLineSuccess"
|
|
v-model="user_form.subLineSuccess"
|
|
placeholder="请输入成功通行结果"
|
|
placeholder="请输入成功通行结果"
|
|
- ></el-input>
|
|
|
|
|
|
+ />
|
|
</el-form-item>
|
|
</el-form-item>
|
|
<el-form-item
|
|
<el-form-item
|
|
label-width="120px"
|
|
label-width="120px"
|
|
@@ -1333,7 +1340,7 @@
|
|
<el-input
|
|
<el-input
|
|
v-model="user_form.subLineFail"
|
|
v-model="user_form.subLineFail"
|
|
placeholder="请输入失败通行结果"
|
|
placeholder="请输入失败通行结果"
|
|
- ></el-input>
|
|
|
|
|
|
+ />
|
|
</el-form-item>
|
|
</el-form-item>
|
|
</div>
|
|
</div>
|
|
<div class="flex">
|
|
<div class="flex">
|
|
@@ -1346,7 +1353,7 @@
|
|
<el-input
|
|
<el-input
|
|
v-model="user_form.mainLineLeft"
|
|
v-model="user_form.mainLineLeft"
|
|
placeholder="请输入左副框上层"
|
|
placeholder="请输入左副框上层"
|
|
- ></el-input>
|
|
|
|
|
|
+ />
|
|
</el-form-item>
|
|
</el-form-item>
|
|
<el-form-item
|
|
<el-form-item
|
|
label-width="120px"
|
|
label-width="120px"
|
|
@@ -1357,7 +1364,7 @@
|
|
<el-input
|
|
<el-input
|
|
v-model="user_form.subLineLeft"
|
|
v-model="user_form.subLineLeft"
|
|
placeholder="请输入左副框下层"
|
|
placeholder="请输入左副框下层"
|
|
- ></el-input>
|
|
|
|
|
|
+ />
|
|
</el-form-item>
|
|
</el-form-item>
|
|
</div>
|
|
</div>
|
|
<div class="flex">
|
|
<div class="flex">
|
|
@@ -1370,7 +1377,7 @@
|
|
<el-input
|
|
<el-input
|
|
v-model="user_form.mainLineRight"
|
|
v-model="user_form.mainLineRight"
|
|
placeholder="请输入右副框上层"
|
|
placeholder="请输入右副框上层"
|
|
- ></el-input>
|
|
|
|
|
|
+ />
|
|
</el-form-item>
|
|
</el-form-item>
|
|
<el-form-item
|
|
<el-form-item
|
|
label-width="120px"
|
|
label-width="120px"
|
|
@@ -1381,7 +1388,7 @@
|
|
<el-input
|
|
<el-input
|
|
v-model="user_form.subLineRight"
|
|
v-model="user_form.subLineRight"
|
|
placeholder="请输入右副框下层"
|
|
placeholder="请输入右副框下层"
|
|
- ></el-input>
|
|
|
|
|
|
+ />
|
|
</el-form-item>
|
|
</el-form-item>
|
|
</div>
|
|
</div>
|
|
<div class="flex">
|
|
<div class="flex">
|
|
@@ -1542,10 +1549,10 @@
|
|
destroy-on-close
|
|
destroy-on-close
|
|
>
|
|
>
|
|
<el-table
|
|
<el-table
|
|
- class="table"
|
|
|
|
ref="table_form_result"
|
|
ref="table_form_result"
|
|
v-loading="false"
|
|
v-loading="false"
|
|
:data="result_list"
|
|
:data="result_list"
|
|
|
|
+ class="table"
|
|
element-loading-text="Loading"
|
|
element-loading-text="Loading"
|
|
border
|
|
border
|
|
fit
|
|
fit
|
|
@@ -1585,13 +1592,14 @@ import {
|
|
getTagList,
|
|
getTagList,
|
|
getContextById,
|
|
getContextById,
|
|
fieldOptions,
|
|
fieldOptions,
|
|
- getPlaceAreas,
|
|
|
|
-} from "@/api/user_manage";
|
|
|
|
-import Pagination from "@/components/Pagination";
|
|
|
|
-import { checkRole } from "@/utils/checkRole";
|
|
|
|
-import { uploadAdminInfoExcel, pictureLocal } from "@/api/ordinary_user";
|
|
|
|
-import { batchDownload } from "@/utils/batchDownload";
|
|
|
|
-import { saveAs } from "file-saver"; //字符串保存成 TXT 文件保存到电脑
|
|
|
|
|
|
+ getPlaceAreas
|
|
|
|
+} from '@/api/user_manage'
|
|
|
|
+import { getAreaList } from '@/api/area'
|
|
|
|
+import Pagination from '@/components/Pagination'
|
|
|
|
+import { checkRole } from '@/utils/checkRole'
|
|
|
|
+import { uploadAdminInfoExcel, pictureLocal } from '@/api/ordinary_user'
|
|
|
|
+import { batchDownload } from '@/utils/batchDownload'
|
|
|
|
+import { saveAs } from 'file-saver' // 字符串保存成 TXT 文件保存到电脑
|
|
|
|
|
|
// secondary package based on el-pagination
|
|
// secondary package based on el-pagination
|
|
|
|
|
|
@@ -1600,11 +1608,11 @@ export default {
|
|
filters: {
|
|
filters: {
|
|
matchNull(str) {
|
|
matchNull(str) {
|
|
if (!str) {
|
|
if (!str) {
|
|
- return "未填写";
|
|
|
|
|
|
+ return '未填写'
|
|
} else {
|
|
} else {
|
|
- return str;
|
|
|
|
|
|
+ return str
|
|
}
|
|
}
|
|
- },
|
|
|
|
|
|
+ }
|
|
},
|
|
},
|
|
computed: {
|
|
computed: {
|
|
regularCode() {
|
|
regularCode() {
|
|
@@ -1797,6 +1805,10 @@ export default {
|
|
homeImgUrl: null, //首页图片配置
|
|
homeImgUrl: null, //首页图片配置
|
|
openThirdLinkPlatform: false,
|
|
openThirdLinkPlatform: false,
|
|
interfaceAddress: null,
|
|
interfaceAddress: null,
|
|
|
|
+ interfaceAddresses: [{
|
|
|
|
+ interfAddr: null,
|
|
|
|
+ zoneId: null
|
|
|
|
+ }],
|
|
subLineSuccess: null,
|
|
subLineSuccess: null,
|
|
subLineFail: null,
|
|
subLineFail: null,
|
|
mainLineLeft: null,
|
|
mainLineLeft: null,
|
|
@@ -1804,7 +1816,7 @@ export default {
|
|
mainLineRight: null,
|
|
mainLineRight: null,
|
|
subLineRight: null,
|
|
subLineRight: null,
|
|
openVoiceMsgSuccess: null,
|
|
openVoiceMsgSuccess: null,
|
|
- openVoiceMsgFail: null,
|
|
|
|
|
|
+ openVoiceMsgFail: null
|
|
},
|
|
},
|
|
user_form_copy: {},
|
|
user_form_copy: {},
|
|
scene_list: [
|
|
scene_list: [
|
|
@@ -2018,7 +2030,7 @@ export default {
|
|
{ required: true, message: "请输入钉钉密钥", trigger: "blur" },
|
|
{ required: true, message: "请输入钉钉密钥", trigger: "blur" },
|
|
],
|
|
],
|
|
clockWayPushUrl: [
|
|
clockWayPushUrl: [
|
|
- { required: true, message: "请输入推送地址", trigger: "blur" },
|
|
|
|
|
|
+ { required: false, message: "请输入推送地址", trigger: "blur" },
|
|
],
|
|
],
|
|
disinfectFlag: [{ required: true, message: "请选择", trigger: "blur" }],
|
|
disinfectFlag: [{ required: true, message: "请选择", trigger: "blur" }],
|
|
problemReportFlag: [
|
|
problemReportFlag: [
|
|
@@ -2048,25 +2060,15 @@ export default {
|
|
message: '请输入',
|
|
message: '请输入',
|
|
trigger: 'blur'
|
|
trigger: 'blur'
|
|
}
|
|
}
|
|
- ],
|
|
|
|
- interfaceAddressInterfAddr: [
|
|
|
|
- {
|
|
|
|
- required: true,
|
|
|
|
- message: '请输入联动地址',
|
|
|
|
- trigger: 'blur'
|
|
|
|
- }
|
|
|
|
- ],
|
|
|
|
- interfaceAddressZoneId: [
|
|
|
|
- {
|
|
|
|
- required: true,
|
|
|
|
- message: '请绑定区域',
|
|
|
|
- trigger: 'blur'
|
|
|
|
- }
|
|
|
|
]
|
|
]
|
|
},
|
|
},
|
|
// 批量导入结果返回
|
|
// 批量导入结果返回
|
|
resultVisible: false,
|
|
resultVisible: false,
|
|
result_list: [],
|
|
result_list: [],
|
|
|
|
+ // 弹框区域列表
|
|
|
|
+ platformAreaList: [],
|
|
|
|
+ // 选中的区域列表
|
|
|
|
+ selectedPlatformAreaList: [],
|
|
// 字段类型
|
|
// 字段类型
|
|
customType_list: [
|
|
customType_list: [
|
|
{ id: 1, name: "文本" },
|
|
{ id: 1, name: "文本" },
|
|
@@ -2085,145 +2087,188 @@ export default {
|
|
};
|
|
};
|
|
},
|
|
},
|
|
created() {
|
|
created() {
|
|
- this.fetchData();
|
|
|
|
- this.getUserListSearch();
|
|
|
|
- this.getAddressList(1);
|
|
|
|
- this.getAddressListSearch(1);
|
|
|
|
- this.fieldOptions();
|
|
|
|
|
|
+ this.fetchData()
|
|
|
|
+ this.getUserListSearch()
|
|
|
|
+ this.getAddressList(1)
|
|
|
|
+ this.getAddressListSearch(1)
|
|
|
|
+ this.fieldOptions()
|
|
// 如果为省级账号则锁定省份的选择
|
|
// 如果为省级账号则锁定省份的选择
|
|
if (checkRole([2])) {
|
|
if (checkRole([2])) {
|
|
- this.getAddressList(2, this.$store.getters.provinceId);
|
|
|
|
- this.getAddressListSearch(2, this.$store.getters.provinceId);
|
|
|
|
- this.getTagList(this.$store.getters.provinceId);
|
|
|
|
- this.user_form.provinceId = this.$store.getters.provinceId;
|
|
|
|
- this.page.data.provinceId = this.$store.getters.provinceId;
|
|
|
|
- this.type_list[0].disabled = true;
|
|
|
|
|
|
+ this.getAddressList(2, this.$store.getters.provinceId)
|
|
|
|
+ this.getAddressListSearch(2, this.$store.getters.provinceId)
|
|
|
|
+ this.getTagList(this.$store.getters.provinceId)
|
|
|
|
+ this.user_form.provinceId = this.$store.getters.provinceId
|
|
|
|
+ this.page.data.provinceId = this.$store.getters.provinceId
|
|
|
|
+ this.type_list[0].disabled = true
|
|
}
|
|
}
|
|
- this.user_form_copy = JSON.parse(JSON.stringify(this.user_form));
|
|
|
|
|
|
+ this.user_form_copy = JSON.parse(JSON.stringify(this.user_form))
|
|
},
|
|
},
|
|
watch: {
|
|
watch: {
|
|
- "user_form.type": {
|
|
|
|
|
|
+ 'user_form.type': {
|
|
handler(n, o) {
|
|
handler(n, o) {
|
|
- if (this.dialogType == "add") {
|
|
|
|
- this.user_form.placeType = 0;
|
|
|
|
- this.user_form.codeType = ["0"];
|
|
|
|
|
|
+ if (this.dialogType === 'add') {
|
|
|
|
+ this.user_form.placeType = 0
|
|
|
|
+ this.user_form.codeType = ['0']
|
|
}
|
|
}
|
|
- if (n != 5) {
|
|
|
|
- this.user_form.addCustomList = [];
|
|
|
|
|
|
+ if (n !== 5) {
|
|
|
|
+ this.user_form.addCustomList = []
|
|
}
|
|
}
|
|
},
|
|
},
|
|
},
|
|
},
|
|
- "user_form.whiteVisitorType": {
|
|
|
|
|
|
+ 'user_form.whiteVisitorType': {
|
|
handler(n, o) {
|
|
handler(n, o) {
|
|
if (this.user_form.whiteVisitorType.length === 0) {
|
|
if (this.user_form.whiteVisitorType.length === 0) {
|
|
- this.user_form.addCustomList = [];
|
|
|
|
|
|
+ this.user_form.addCustomList = []
|
|
}
|
|
}
|
|
- },
|
|
|
|
|
|
+ }
|
|
},
|
|
},
|
|
- "user_form.placeType"(n, o) {
|
|
|
|
- if (n == 1) {
|
|
|
|
- this.user_form.isShowCustomWord = false;
|
|
|
|
|
|
+ 'user_form.placeType'(n, o) {
|
|
|
|
+ if (n === 1) {
|
|
|
|
+ this.user_form.isShowCustomWord = false
|
|
}
|
|
}
|
|
},
|
|
},
|
|
- "user_form.clockWayType"(n) {
|
|
|
|
|
|
+ 'user_form.clockWayType'(n) {
|
|
// 选择钉钉或通用清除另一个
|
|
// 选择钉钉或通用清除另一个
|
|
- if (n != 2) {
|
|
|
|
- this.user_form.dingtalkAppKey = "";
|
|
|
|
- this.user_form.dingtalkAppSecret = "";
|
|
|
|
|
|
+ if (n !== 2) {
|
|
|
|
+ this.user_form.dingtalkAppKey = ''
|
|
|
|
+ this.user_form.dingtalkAppSecret = ''
|
|
}
|
|
}
|
|
- if (n != 1) {
|
|
|
|
- this.user_form.clockWayPushUrl = null;
|
|
|
|
- this.user_form.punchReportFieldsConfig = [];
|
|
|
|
|
|
+ if (n !== 1) {
|
|
|
|
+ this.user_form.clockWayPushUrl = null
|
|
|
|
+ this.user_form.punchReportFieldsConfig = []
|
|
}
|
|
}
|
|
- },
|
|
|
|
|
|
+ }
|
|
},
|
|
},
|
|
methods: {
|
|
methods: {
|
|
// 查询权限
|
|
// 查询权限
|
|
checkRole,
|
|
checkRole,
|
|
isdisabled(e) {
|
|
isdisabled(e) {
|
|
- return e == 0 ? true : false;
|
|
|
|
|
|
+ return e === 0
|
|
|
|
+ },
|
|
|
|
+ // 获取区域列表
|
|
|
|
+ getPlatformList(adminId) {
|
|
|
|
+ getAreaList({ adminId }).then((res) => {
|
|
|
|
+ this.platformAreaList = res.data
|
|
|
|
+ this.platformAreaList.unshift({
|
|
|
|
+ id: 0,
|
|
|
|
+ name: '全部'
|
|
|
|
+ })
|
|
|
|
+ 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) {
|
|
|
|
+ this.selectedPlatformAreaList.push(this.user_form.interfaceAddresses[i].zoneId)
|
|
|
|
+ }
|
|
|
|
+ }
|
|
|
|
+ }
|
|
|
|
+ })
|
|
|
|
+ },
|
|
|
|
+ areaSelectChange(value, index) {
|
|
|
|
+ if (this.selectedPlatformAreaList[index] !== null) {
|
|
|
|
+ this.selectedPlatformAreaList[index] = value
|
|
|
|
+ } else {
|
|
|
|
+ this.selectedPlatformAreaList.push(value)
|
|
|
|
+ }
|
|
|
|
+ },
|
|
|
|
+ removeInterfaceAddress(index, value) {
|
|
|
|
+ this.user_form.interfaceAddresses.splice(index, 1)
|
|
|
|
+ this.selectedPlatformAreaList = this.selectedPlatformAreaList.filter(function(item) {
|
|
|
|
+ return item !== value
|
|
|
|
+ })
|
|
|
|
+ },
|
|
|
|
+ addInterfaceAddress() {
|
|
|
|
+ this.user_form.interfaceAddresses.push({
|
|
|
|
+ interfAddr: null,
|
|
|
|
+ zoneId: null
|
|
|
|
+ })
|
|
},
|
|
},
|
|
// 添加自定义
|
|
// 添加自定义
|
|
addCustom(index) {
|
|
addCustom(index) {
|
|
this.user_form.addCustomList.splice(index + 1, 0, {
|
|
this.user_form.addCustomList.splice(index + 1, 0, {
|
|
- customName: "",
|
|
|
|
- prompt: "",
|
|
|
|
|
|
+ customName: '',
|
|
|
|
+ prompt: '',
|
|
isEditable: 1,
|
|
isEditable: 1,
|
|
isShow: 1,
|
|
isShow: 1,
|
|
configurationOptions: null,
|
|
configurationOptions: null,
|
|
customType: null,
|
|
customType: null,
|
|
- customNameVal: null,
|
|
|
|
- });
|
|
|
|
|
|
+ customNameVal: null
|
|
|
|
+ })
|
|
},
|
|
},
|
|
// 删除自定义
|
|
// 删除自定义
|
|
delCustom(index) {
|
|
delCustom(index) {
|
|
- this.user_form.addCustomList.splice(index, 1);
|
|
|
|
|
|
+ this.user_form.addCustomList.splice(index, 1)
|
|
},
|
|
},
|
|
// 获取列表数据
|
|
// 获取列表数据
|
|
fetchData() {
|
|
fetchData() {
|
|
- this.listLoading = true;
|
|
|
|
|
|
+ this.listLoading = true
|
|
getUserList(this.page).then((res) => {
|
|
getUserList(this.page).then((res) => {
|
|
- this.list = res.data.list;
|
|
|
|
- this.total = res.data.total;
|
|
|
|
- this.listLoading = false;
|
|
|
|
- });
|
|
|
|
|
|
+ this.list = res.data.list
|
|
|
|
+ this.total = res.data.total
|
|
|
|
+ this.listLoading = false
|
|
|
|
+ })
|
|
},
|
|
},
|
|
// 打开添加账号对话框
|
|
// 打开添加账号对话框
|
|
create() {
|
|
create() {
|
|
- this.user_form = JSON.parse(JSON.stringify(this.user_form_copy));
|
|
|
|
- this.dialogType = "add";
|
|
|
|
- this.dialogVisible = true;
|
|
|
|
|
|
+ this.user_form = JSON.parse(JSON.stringify(this.user_form_copy))
|
|
|
|
+ this.dialogType = 'add'
|
|
|
|
+ this.dialogVisible = true
|
|
this.$nextTick(() => {
|
|
this.$nextTick(() => {
|
|
- this.$refs["user_form"].clearValidate();
|
|
|
|
- });
|
|
|
|
|
|
+ this.$refs['user_form'].clearValidate()
|
|
|
|
+ })
|
|
|
|
+ this.platformAreaList = []
|
|
|
|
+ this.selectedPlatformAreaList = []
|
|
|
|
+ // this.getPlatformList()
|
|
|
|
+ this.platformAreaList.push({
|
|
|
|
+ id: 0,
|
|
|
|
+ name: '全部'
|
|
|
|
+ })
|
|
},
|
|
},
|
|
// 选择账号权限
|
|
// 选择账号权限
|
|
changeType(e) {
|
|
changeType(e) {
|
|
if (e > 2) {
|
|
if (e > 2) {
|
|
- this.rules.tagId[0].required = true;
|
|
|
|
|
|
+ this.rules.tagId[0].required = true
|
|
} else {
|
|
} else {
|
|
- this.rules.tagId[0].required = false;
|
|
|
|
|
|
+ this.rules.tagId[0].required = false
|
|
}
|
|
}
|
|
- this.user_form.tagId = null;
|
|
|
|
|
|
+ this.user_form.tagId = null
|
|
},
|
|
},
|
|
// 获得标签列表
|
|
// 获得标签列表
|
|
getTagList(provinceId) {
|
|
getTagList(provinceId) {
|
|
getTagList(provinceId).then((res) => {
|
|
getTagList(provinceId).then((res) => {
|
|
- this.tag_list = res.data;
|
|
|
|
- });
|
|
|
|
|
|
+ this.tag_list = res.data
|
|
|
|
+ })
|
|
},
|
|
},
|
|
// 获取账号列表数据_搜索
|
|
// 获取账号列表数据_搜索
|
|
getUserListSearch() {
|
|
getUserListSearch() {
|
|
getUserListSearch().then((res) => {
|
|
getUserListSearch().then((res) => {
|
|
- this.user_list = res.data;
|
|
|
|
- });
|
|
|
|
|
|
+ this.user_list = res.data
|
|
|
|
+ })
|
|
},
|
|
},
|
|
// 获取推送字段
|
|
// 获取推送字段
|
|
fieldOptions() {
|
|
fieldOptions() {
|
|
fieldOptions().then((res) => {
|
|
fieldOptions().then((res) => {
|
|
- this.pushField = res.data;
|
|
|
|
- });
|
|
|
|
|
|
+ this.pushField = res.data
|
|
|
|
+ })
|
|
},
|
|
},
|
|
// 获得省市县列表_搜索
|
|
// 获得省市县列表_搜索
|
|
getAddressListSearch(type, code) {
|
|
getAddressListSearch(type, code) {
|
|
switch (type) {
|
|
switch (type) {
|
|
case 1:
|
|
case 1:
|
|
getProvince().then((res) => {
|
|
getProvince().then((res) => {
|
|
- this.province_list_search = res.data;
|
|
|
|
- });
|
|
|
|
- break;
|
|
|
|
|
|
+ this.province_list_search = res.data
|
|
|
|
+ })
|
|
|
|
+ break
|
|
case 2:
|
|
case 2:
|
|
getCity(code).then((res) => {
|
|
getCity(code).then((res) => {
|
|
- this.city_list_search = res.data;
|
|
|
|
- });
|
|
|
|
- break;
|
|
|
|
|
|
+ this.city_list_search = res.data
|
|
|
|
+ })
|
|
|
|
+ break
|
|
case 3:
|
|
case 3:
|
|
getArea(code).then((res) => {
|
|
getArea(code).then((res) => {
|
|
- this.area_list_search = res.data;
|
|
|
|
- });
|
|
|
|
- break;
|
|
|
|
|
|
+ this.area_list_search = res.data
|
|
|
|
+ })
|
|
|
|
+ break
|
|
default:
|
|
default:
|
|
- break;
|
|
|
|
|
|
+ break
|
|
}
|
|
}
|
|
},
|
|
},
|
|
// 选择省份_搜索
|
|
// 选择省份_搜索
|
|
@@ -2306,6 +2351,17 @@ export default {
|
|
add() {
|
|
add() {
|
|
this.$refs["user_form"].validate((valid) => {
|
|
this.$refs["user_form"].validate((valid) => {
|
|
if (valid) {
|
|
if (valid) {
|
|
|
|
+ if(!this.user_form.openThirdLinkPlatform) {
|
|
|
|
+ this.user_form.interfaceAddresses = null
|
|
|
|
+ }
|
|
|
|
+ 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
|
|
|
|
+ })
|
|
|
|
+ if (this.user_form.interfaceAddresses.length <= 0) {
|
|
|
|
+ this.user_form.interfaceAddresses = null
|
|
|
|
+ }
|
|
|
|
+ }
|
|
doEditAdmin(this.user_form).then((res) => {
|
|
doEditAdmin(this.user_form).then((res) => {
|
|
this.dialogVisible = false;
|
|
this.dialogVisible = false;
|
|
this.fetchData();
|
|
this.fetchData();
|
|
@@ -2336,30 +2392,39 @@ export default {
|
|
},
|
|
},
|
|
// 打开编辑
|
|
// 打开编辑
|
|
update(row) {
|
|
update(row) {
|
|
- this.user_form = Object.assign(this.user_form, row);
|
|
|
|
- this.row = row;
|
|
|
|
|
|
+ this.selectedPlatformAreaList = []
|
|
|
|
+ this.user_form = Object.assign(this.user_form, row)
|
|
|
|
+ this.row = row
|
|
if (this.user_form.realAuthenticationAgeStart == null) {
|
|
if (this.user_form.realAuthenticationAgeStart == null) {
|
|
- this.user_form.realAuthenticationAgeStart = 0;
|
|
|
|
|
|
+ this.user_form.realAuthenticationAgeStart = 0
|
|
}
|
|
}
|
|
if (this.user_form.realAuthenticationAgeEnd == null) {
|
|
if (this.user_form.realAuthenticationAgeEnd == null) {
|
|
- this.user_form.realAuthenticationAgeEnd = 200;
|
|
|
|
|
|
+ this.user_form.realAuthenticationAgeEnd = 200
|
|
}
|
|
}
|
|
- 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.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.$nextTick(() => {
|
|
- this.$refs["user_form"].clearValidate();
|
|
|
|
- });
|
|
|
|
|
|
+ this.$refs["user_form"].clearValidate()
|
|
|
|
+ })
|
|
getContextById(row.adminId).then((res) => {
|
|
getContextById(row.adminId).then((res) => {
|
|
- this.user_form.addCustomList = res.data;
|
|
|
|
|
|
+ this.user_form.addCustomList = res.data
|
|
// 初始化是否显示自定义字段
|
|
// 初始化是否显示自定义字段
|
|
this.user_form.isShowCustomWord =
|
|
this.user_form.isShowCustomWord =
|
|
- this.user_form.addCustomList.length > 0;
|
|
|
|
- });
|
|
|
|
|
|
+ this.user_form.addCustomList.length > 0
|
|
|
|
+ })
|
|
|
|
+ if(!this.user_form.interfaceAddresses || this.user_form.interfaceAddresses.length <= 0) {
|
|
|
|
+ this.user_form.interfaceAddresses = []
|
|
|
|
+ this.user_form.interfaceAddresses.push({
|
|
|
|
+ interfAddr: null,
|
|
|
|
+ zoneId: null
|
|
|
|
+ })
|
|
|
|
+ }
|
|
|
|
+ this.getPlatformList(this.user_form.adminId)
|
|
},
|
|
},
|
|
// 选择是否显示自定义字段
|
|
// 选择是否显示自定义字段
|
|
changeCustomWord(e) {
|
|
changeCustomWord(e) {
|
|
@@ -2382,6 +2447,17 @@ export default {
|
|
this.user_form.homeImgUrl =
|
|
this.user_form.homeImgUrl =
|
|
"https://tx.hz-hanghui.com:8088/yx-fyzd/file/icon/face.jpg";
|
|
"https://tx.hz-hanghui.com:8088/yx-fyzd/file/icon/face.jpg";
|
|
}
|
|
}
|
|
|
|
+ if(!this.user_form.openThirdLinkPlatform) {
|
|
|
|
+ this.user_form.interfaceAddresses = null
|
|
|
|
+ }
|
|
|
|
+ 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
|
|
|
|
+ })
|
|
|
|
+ if (this.user_form.interfaceAddresses.length <= 0) {
|
|
|
|
+ this.user_form.interfaceAddresses = null
|
|
|
|
+ }
|
|
|
|
+ }
|
|
doEditAdmin(this.user_form).then((res) => {
|
|
doEditAdmin(this.user_form).then((res) => {
|
|
this.dialogVisible = false;
|
|
this.dialogVisible = false;
|
|
this.fetchData();
|
|
this.fetchData();
|
|
@@ -2593,12 +2669,18 @@ export default {
|
|
width: 100%;
|
|
width: 100%;
|
|
display: flex;
|
|
display: flex;
|
|
justify-content: flex-start;
|
|
justify-content: flex-start;
|
|
|
|
+ & > div:nth-child(1) {
|
|
|
|
+ margin-right: 60px;
|
|
|
|
+ }
|
|
// align-items: center;
|
|
// align-items: center;
|
|
}
|
|
}
|
|
.interfaceAddress-layout {
|
|
.interfaceAddress-layout {
|
|
|
|
+ width: 100%;
|
|
|
|
+ padding: 0 10px;
|
|
border: 1px solid #D6EAFF;
|
|
border: 1px solid #D6EAFF;
|
|
border-radius: 6px;
|
|
border-radius: 6px;
|
|
padding-top: 18px;
|
|
padding-top: 18px;
|
|
|
|
+ margin-bottom: 17px;
|
|
}
|
|
}
|
|
.margin-left {
|
|
.margin-left {
|
|
margin: 10px 0 0 10px;
|
|
margin: 10px 0 0 10px;
|