| | |
| | | :level="4" |
| | | v-model:value="formSearch._locations" |
| | | ></FYOptionLocation> |
| | | <FYOptionText label="关键字" placeholder="输入名称关键字" v-model:value="formSearch.searchText"></FYOptionText> |
| | | <FYOptionText |
| | | label="关键字" |
| | | placeholder="输入名称关键字" |
| | | v-model:value="formSearch.searchText" |
| | | ></FYOptionText> |
| | | <FYOptionScene |
| | | :allOption="true" |
| | | :type="1" |
| | |
| | | </template> |
| | | |
| | | <template #table-column> |
| | | <el-table-column |
| | | type="index" |
| | | fixed="left" |
| | | prop="userInfo.realname" |
| | | label="名称" |
| | | width="400" |
| | | > |
| | | <el-table-column type="index" fixed="left" prop="userInfo.realname" label="名称" width="400"> |
| | | <template #default="scope"> |
| | | <el-tooltip |
| | | effect="dark" |
| | |
| | | <el-table-column prop="userInfo.usertype" label="用户类型" width="90" /> |
| | | <el-table-column fixed="right" align="right" label="操作" width="160"> |
| | | <template #header> |
| | | <el-button |
| | | icon="DocumentAdd" |
| | | size="default" |
| | | type="success" |
| | | @click="drawer = true" |
| | | <el-button icon="DocumentAdd" size="default" type="success" @click="drawer = true" |
| | | >新增用户</el-button |
| | | > |
| | | </template> |
| | |
| | | |
| | | export default { |
| | | components: { |
| | | CompUserInfoAddDrawer, |
| | | CompUserInfoAddDrawer |
| | | }, |
| | | data() { |
| | | return { |
| | |
| | | _locations: {}, |
| | | searchText: '', |
| | | scensetype: {}, |
| | | online: {}, |
| | | online: {} |
| | | }, |
| | | drawer: false, |
| | | drawer: false |
| | | }; |
| | | }, |
| | | computed: { |
| | | ...mapStores(useLoadingStore), |
| | | ...mapStores(useLoadingStore) |
| | | }, |
| | | methods: { |
| | | onSearch(page, func) { |
| | | const f = this.formSearch; |
| | | const area = {}; |
| | | // 行政区划 |
| | | area.provinceCode = f._locations.pCode ? f._locations.pCode + '0000' : undefined |
| | | area.provinceCode = f._locations.pCode; |
| | | area.provinceName = f._locations.pName; |
| | | if (area.provinceCode == null) { |
| | | area.provinceCode = null; |
| | | area.provinceName = null; |
| | | } |
| | | area.cityCode = f._locations.cCode ? f._locations.cCode.substring(0, 3) + '100' : undefined |
| | | area.cityCode = f._locations.cCode; |
| | | area.cityName = f._locations.cName; |
| | | area.districtCode = f._locations.dCode; |
| | | area.districtName = f._locations.dName; |
| | |
| | | if (res) { |
| | | func({ |
| | | data: res.data, |
| | | total: res.head.totalCount, |
| | | total: res.head.totalCount |
| | | }); |
| | | } |
| | | }); |
| | |
| | | const param = { |
| | | guid: scope.row.userInfo.guid, |
| | | isenable: !scope.row.userInfo.isenable |
| | | } |
| | | }; |
| | | const msg = scope.row.userInfo.isenable ? '下线' : '上线'; |
| | | useMessageBoxTip({ |
| | | confirmMsg: `确认${msg}该场景?`, |
| | | confirmTitle: msg, |
| | | onConfirm: () => { |
| | | onConfirm: async () => { |
| | | scope.row.loading2 = true; |
| | | return userApi |
| | | .updateUserInfo(param) |
| | |
| | | .finally(() => { |
| | | scope.row.loading2 = false; |
| | | }); |
| | | }, |
| | | } |
| | | }); |
| | | }, |
| | | tableRowClassName({ row }) { |
| | | return row.userInfo.isenable ? 'online-row' : 'offline-row'; |
| | | }, |
| | | }, |
| | | } |
| | | } |
| | | }; |
| | | </script> |
| | | <style></style> |