| | |
| | | "axios": "^1.2.1", |
| | | "dayjs": "^1.11.10", |
| | | "element-plus": "^2.4.3", |
| | | "js-base64": "^3.7.5", |
| | | "pinia": "^2.0.26", |
| | | "vue": "^3.2.45", |
| | | "vue-i18n": "^9.8.0", |
| | |
| | | "@sideway/formula": "^3.0.0", |
| | | "@sideway/pinpoint": "^2.0.0" |
| | | } |
| | | }, |
| | | "node_modules/js-base64": { |
| | | "version": "3.7.5", |
| | | "resolved": "https://registry.npmmirror.com/js-base64/-/js-base64-3.7.5.tgz", |
| | | "integrity": "sha512-3MEt5DTINKqfScXKfJFrRbxkrnk2AxPWGBL/ycjz4dK8iqiSJ06UxD8jh8xuh6p10TX4t2+7FsBYVxxQbMg+qA==" |
| | | }, |
| | | "node_modules/js-sdsl": { |
| | | "version": "4.2.0", |
| | |
| | | "@sideway/pinpoint": "^2.0.0" |
| | | } |
| | | }, |
| | | "js-base64": { |
| | | "version": "3.7.5", |
| | | "resolved": "https://registry.npmmirror.com/js-base64/-/js-base64-3.7.5.tgz", |
| | | "integrity": "sha512-3MEt5DTINKqfScXKfJFrRbxkrnk2AxPWGBL/ycjz4dK8iqiSJ06UxD8jh8xuh6p10TX4t2+7FsBYVxxQbMg+qA==" |
| | | }, |
| | | "js-sdsl": { |
| | | "version": "4.2.0", |
| | | "dev": true |
| | |
| | | "axios": "^1.2.1", |
| | | "dayjs": "^1.11.10", |
| | | "element-plus": "^2.4.3", |
| | | "js-base64": "^3.7.5", |
| | | "pinia": "^2.0.26", |
| | | "vue": "^3.2.45", |
| | | "vue-i18n": "^9.8.0", |
| | |
| | | import { $fysp } from '../index'; |
| | | |
| | | export default { |
| | | |
| | | /** |
| | | * 获取自动评估历史记录 |
| | | */ |
| | | fetchAutoEvaluation(param){ |
| | | return $fysp.post(`evaluation/auto/record`, param); |
| | | fetchAutoEvaluation(param) { |
| | | return $fysp.post(`evaluation/auto/record`, param).then((res) => res.data); |
| | | } |
| | | }; |
| | |
| | | */ |
| | | checkProblem({ pId, action, remark = '', userId = id, userName = name }) { |
| | | const params = `?pId=${pId}&action=${action}&remark=${remark}&userId=${userId}&userName=${userName}`; |
| | | return $fysp.post(`problemlist/check${params}`); |
| | | return $fysp.post(`problemlist/check${params}`).then((res) => res.data); |
| | | }, |
| | | }; |
| | |
| | | */ |
| | | searchScene(area, page = 1, perPage = 20) { |
| | | const params = `page=${page}&per_page=${perPage}`; |
| | | return $fysp.post(`scense/find?${params}`, area); |
| | | return $fysp.post(`scense/find?${params}`, area).then((res) => res.data); |
| | | }, |
| | | |
| | | /** |
| | |
| | | * @returns 场景详情 |
| | | */ |
| | | getSceneDetail(sId) { |
| | | return $fysp.get(`scense/detail`, { |
| | | params: { |
| | | sceneId: sId |
| | | } |
| | | }); |
| | | return $fysp |
| | | .get(`scense/detail`, { |
| | | params: { |
| | | sceneId: sId |
| | | } |
| | | }) |
| | | .then((res) => res.data); |
| | | }, |
| | | |
| | | /** |
| | |
| | | subScene: subScene ? JSON.stringify(subScene) : null, |
| | | sceneDevice: sceneDevice ? sceneDevice : null |
| | | }; |
| | | return $fysp.post(`scense/detail/update?${params}`, rb); |
| | | return $fysp.post(`scense/detail/update?${params}`, rb).then((res) => res.data); |
| | | }, |
| | | |
| | | /** |
| | | * 更新场景额外信息 |
| | | */ |
| | | updateSubScene(typeId, subScene) { |
| | | return this.updateSceneDetail(typeId, { subScene: subScene }); |
| | | return this.updateSceneDetail(typeId, { subScene: subScene }).then((res) => res.data); |
| | | }, |
| | | |
| | | /** |
| | | * 更新场景设备信息 |
| | | */ |
| | | updateSceneDevice(typeId, sceneDevice) { |
| | | return this.updateSceneDetail(typeId, { sceneDevice: sceneDevice }); |
| | | return this.updateSceneDetail(typeId, { sceneDevice: sceneDevice }).then((res) => res.data); |
| | | }, |
| | | |
| | | /** |
| | |
| | | * @param {Object} scene |
| | | */ |
| | | createScene(scene) { |
| | | return $fysp.put('scense', scene); |
| | | return $fysp.put('scense', scene).then((res) => res.data); |
| | | }, |
| | | |
| | | /** |
| | |
| | | * @param {Object} scene |
| | | */ |
| | | updateScene(scene) { |
| | | return $fysp.post('scense', scene); |
| | | return $fysp.post('scense', scene).then((res) => res.data); |
| | | } |
| | | }; |
| | |
| | | * 获取顶层任务 |
| | | */ |
| | | getTopTask() { |
| | | return $fysp.get('task/alltask/0'); |
| | | return $fysp.get('task/alltask/0').then((res) => res.data); |
| | | }, |
| | | |
| | | /** |
| | | * 获取子任务统计信息 |
| | | */ |
| | | getSubtaskSummary({ topTaskId = undefined, sceneTypeId = undefined }) { |
| | | return $fysp.get('subtask/summary', { |
| | | params: { |
| | | topTaskId: topTaskId, |
| | | sceneTypeId: sceneTypeId |
| | | } |
| | | }); |
| | | return $fysp |
| | | .get('subtask/summary', { |
| | | params: { |
| | | topTaskId: topTaskId, |
| | | sceneTypeId: sceneTypeId |
| | | } |
| | | }) |
| | | .then((res) => res.data); |
| | | }, |
| | | |
| | | /** |
| | | * 获取子任务问题详情 |
| | | */ |
| | | getProBySubtask(id) { |
| | | return $fysp.get('problemlist/subtask', { |
| | | params: { |
| | | stGuid: id |
| | | } |
| | | }); |
| | | return $fysp |
| | | .get('problemlist/subtask', { |
| | | params: { |
| | | stGuid: id |
| | | } |
| | | }) |
| | | .then((res) => res.data); |
| | | } |
| | | }; |
| | |
| | | * 获取用户详情 |
| | | */ |
| | | getUserById(id) { |
| | | return $fysp.get(`userinfo/${id}`); |
| | | return $fysp.get(`userinfo/${id}`).then((res) => res.data); |
| | | }, |
| | | |
| | | /** |
| | | * 更新用户详情 |
| | | */ |
| | | updateUser(user) { |
| | | return $fysp.post(`userinfo`, user); |
| | | return $fysp.post(`userinfo`, user).then((res) => res.data); |
| | | }, |
| | | |
| | | /** |
| | | * 获取场景的用户详情 |
| | | */ |
| | | getUserByScene(sId) { |
| | | return $fysp.get(`userinfo/scene/get?sceneId=${sId}`); |
| | | return $fysp.get(`userinfo/scene/get?sceneId=${sId}`).then((res) => res.data); |
| | | }, |
| | | |
| | | /** |
| | | * 自动创建账户 |
| | | */ |
| | | autoCreateAccount(sId) { |
| | | return $fysp.post(`userinfo/create?sceneId=${sId}`); |
| | | return $fysp.post(`userinfo/create?sceneId=${sId}`).then((res) => res.data); |
| | | } |
| | | }; |
| | |
| | | import { Base64 } from 'js-base64'; |
| | | import { $fytz } from '../index'; |
| | | |
| | | /** |
| | |
| | | return $fytz |
| | | .get(`credit/ecCode/download?userId=${userId}`, { responseType: 'blob' }) |
| | | .then((res) => { |
| | | const url = window.URL.createObjectURL(new Blob([res.data])); |
| | | const name = Base64.decode(res.headers.get('fileName')); |
| | | const url = window.URL.createObjectURL(res.data); |
| | | const link = document.createElement('a'); |
| | | link.href = url; |
| | | link.setAttribute('download', 'creditCode.png'); |
| | | link.setAttribute('download', name); |
| | | document.body.appendChild(link); |
| | | link.click(); |
| | | document.body.removeChild(link); |
| | |
| | | */ |
| | | getNoticeHistory({ type, subtype = null, page = 1, perPage = 20 }) { |
| | | const params = `userId=${id}&page=${page}&per_page=${perPage}`; |
| | | return $fytz.post(`notifications/history?${params}`, { |
| | | ecNoticetype: type, |
| | | ecNoticesubtype: subtype |
| | | }); |
| | | return $fytz |
| | | .post(`notifications/history?${params}`, { |
| | | ecNoticetype: type, |
| | | ecNoticesubtype: subtype |
| | | }) |
| | | .then((res) => res.data); |
| | | }, |
| | | |
| | | /** |
| | | * 获取用户未读通知 |
| | | */ |
| | | getNotification() { |
| | | return $fytz.get('notifications', { |
| | | params: { |
| | | userId: id, |
| | | page: 1, |
| | | per_page: 30 |
| | | } |
| | | }); |
| | | return $fytz |
| | | .get('notifications', { |
| | | params: { |
| | | userId: id, |
| | | page: 1, |
| | | per_page: 30 |
| | | } |
| | | }) |
| | | .then((res) => res.data); |
| | | }, |
| | | |
| | | /** |
| | |
| | | releaseNotice(notice) { |
| | | notice.authorId = id; |
| | | notice.authorName = name; |
| | | return $fytz.post(`notifications/${id}/release2`, notice); |
| | | return $fytz.post(`notifications/${id}/release2`, notice).then((res) => res.data); |
| | | } |
| | | }; |
| | |
| | | */ |
| | | fetchUser(page = 1, per_page = 20, data) { |
| | | const params = `page=${page}&per_page=${per_page}`; |
| | | return $fytz.post(`baseInfo/search/?${params}`, data); |
| | | return $fytz.post(`baseInfo/search/?${params}`, data).then((res) => res.data); |
| | | }, |
| | | |
| | | /** |
| | |
| | | * @returns |
| | | */ |
| | | fetchUserBaseInfo(userId) { |
| | | return $fytz.get(`userInfo/baseInfo?userId=${userId}`); |
| | | return $fytz.get(`userInfo/baseInfo?userId=${userId}`).then((res) => res.data); |
| | | }, |
| | | |
| | | /** |
| | |
| | | * @returns |
| | | */ |
| | | updateUserInfo(data) { |
| | | return $fytz.post('userInfo', data); |
| | | return $fytz.post('userInfo', data).then((res) => res.data); |
| | | }, |
| | | |
| | | /** |
| | |
| | | * @returns |
| | | */ |
| | | createUser(data) { |
| | | return $fytz.put('userInfo/create', data); |
| | | return $fytz.put('userInfo/create', data).then((res) => res.data); |
| | | }, |
| | | |
| | | /** |
| | | * 重置用户密码 |
| | | */ |
| | | resetPassword(id) { |
| | | return $fytz.post(`userInfo/resetPw?userId=${id}`); |
| | | return $fytz.post(`userInfo/resetPw?userId=${id}`).then((res) => res.data); |
| | | } |
| | | }; |
| | |
| | | import axios from 'axios'; |
| | | import { ElMessage } from 'element-plus'; |
| | | |
| | | const debug = true; |
| | | const debug = false; |
| | | |
| | | let ip1 = 'http://47.100.191.150:9005/'; |
| | | let ip1_file = 'http://47.100.191.150:9005/'; |
| | |
| | | if (response.status == 200) { |
| | | if (response.data.success != undefined && response.data.success != null) { |
| | | if (response.data.success == true) { |
| | | return response.data; |
| | | return response; |
| | | } else { |
| | | ElMessage({ |
| | | message: response.data.message, |
| | |
| | | return Promise.reject(response.data.message); |
| | | } |
| | | } else { |
| | | return response.data; |
| | | return response; |
| | | } |
| | | } else { |
| | | return Promise.reject(response); |
| | |
| | | ElBreadcrumb: typeof import('element-plus/es')['ElBreadcrumb'] |
| | | ElBreadcrumbItem: typeof import('element-plus/es')['ElBreadcrumbItem'] |
| | | ElButton: typeof import('element-plus/es')['ElButton'] |
| | | ElButtonGroup: typeof import('element-plus/es')['ElButtonGroup'] |
| | | ElCard: typeof import('element-plus/es')['ElCard'] |
| | | ElCascader: typeof import('element-plus/es')['ElCascader'] |
| | | ElCol: typeof import('element-plus/es')['ElCol'] |
| | |
| | | ElTabPane: typeof import('element-plus/es')['ElTabPane'] |
| | | ElTabs: typeof import('element-plus/es')['ElTabs'] |
| | | ElTag: typeof import('element-plus/es')['ElTag'] |
| | | ElText: typeof import('element-plus/es')['ElText'] |
| | | ElTooltip: typeof import('element-plus/es')['ElTooltip'] |
| | | ElTree: typeof import('element-plus/es')['ElTree'] |
| | | Footer: typeof import('./components/core/Footer.vue')['default'] |
| | |
| | | </template> |
| | | <template #default="{ row }"> |
| | | <el-space> |
| | | <!-- <el-button :loading="row.loading1" type="primary" size="small" @click="editRow(row)" |
| | | >查看</el-button |
| | | > --> |
| | | <el-button |
| | | :loading="row.loading2" |
| | | :type="row.userInfo.isenable != '0' ? 'danger' : 'primary'" |
| | |
| | | @click="itemActive(row)" |
| | | >{{ row.userInfo.isenable != '0' ? '下线' : '上线' }}</el-button |
| | | > |
| | | <el-dropdown |
| | | <el-button-group> |
| | | <el-button type="primary" :loading="row.loading1" size="small" @click="editRow(row)" |
| | | >查看</el-button |
| | | > |
| | | <el-dropdown @command="handleCommand" trigger="click"> |
| | | <el-button |
| | | type="primary" |
| | | :loading="row.downloadLoading" |
| | | size="small" |
| | | :icon="row.downloadLoading ? '' : 'ArrowDown'" |
| | | ></el-button> |
| | | <template #dropdown> |
| | | <el-dropdown-menu> |
| | | <el-dropdown-item icon="Download" :command="{ c: 1, p: row }" |
| | | >下载环信码</el-dropdown-item |
| | | > |
| | | </el-dropdown-menu> |
| | | </template> |
| | | </el-dropdown> |
| | | </el-button-group> |
| | | <!-- <el-dropdown |
| | | split-button |
| | | :loading="row.loading1" |
| | | size="small" |
| | |
| | | > |
| | | </el-dropdown-menu> |
| | | </template> |
| | | </el-dropdown> |
| | | </el-dropdown> --> |
| | | </el-space> |
| | | </template> |
| | | </el-table-column> |
| | |
| | | }, |
| | | data() { |
| | | return { |
| | | // 查询条件 |
| | | formSearch: { |
| | | _locations: {}, |
| | | searchText: '', |
| | | scensetype: {}, |
| | | online: {} |
| | | }, |
| | | // 新增用户弹出框 |
| | | drawer: false |
| | | }; |
| | | }, |
| | |
| | | tableRowClassName({ row }) { |
| | | return row.userInfo.isenable ? 'online-row' : 'offline-row'; |
| | | }, |
| | | handleCommand(e){ |
| | | const userId = e.p.userInfo.guid |
| | | handleCommand(e) { |
| | | const userId = e.p.userInfo.guid; |
| | | switch (e.c) { |
| | | // 下载环信码 |
| | | case 1: |
| | | creditApi.downloadCode(userId) |
| | | e.p.downloadLoading = true; |
| | | creditApi.downloadCode(userId).finally(() => { |
| | | e.p.downloadLoading = false; |
| | | }); |
| | | break; |
| | | |
| | | |
| | | default: |
| | | break; |
| | | } |