| | |
| | | # 本地环境 |
| | | ENV = 'development' |
| | | |
| | | #VITE_API_URL = 'http://192.168.0.35:8008' |
| | | VITE_API_URL = 'http://192.168.0.35:8008' |
| | | #李宇飞接口地址 |
| | | |
| | | #VITE_API_URL = 'http://192.168.0.50:8008' |
| | | #张凤接口地址 |
| | | |
| | | VITE_API_URL = 'http://192.168.0.29:8008' |
| | | #VITE_API_URL = 'http://192.168.0.29:8008' |
| | | #黄振接口地址 |
| | | |
| | | #VITE_API_URL = 'http://192.168.0.179:8008' |
| | |
| | | VITE_API_URL = 'http://121.239.169.27:16006/safeplatform' |
| | | VITE_API_URL_OUT = 'http://121.239.169.27:16006/safeplatform-out' |
| | | VITE_API_URL_SOCKET = 'http://121.239.169.27:16006/safeplatform' |
| | | |
| | | #VITE_API_URL = 'http://192.168.0.52:8011/safeplatform' |
| | | #VITE_API_URL_OUT = 'http://192.168.0.52:8011/safeplatform-out' |
| | | #VITE_API_URL_SOCKET = 'http://192.168.0.52:8011/safeplatform' |
| | | |
| | | #内网test环境 |
| | | #VITE_API_URL = 'http://192.168.0.52:7021/safeplatform' |
| | | #VITE_API_URL_OUT = 'http://192.168.0.52:7021/safeplatform-out' |
| | | #VITE_API_URL_SOCKET = 'http://192.168.0.52:7021/safeplatform' |
| | | |
| | | # 国泰线上试用环境接口地址 |
| | | #VITE_API_URL = 'http://121.239.169.27:16016/safeplatform' |
| | | #VITE_API_URL_OUT = 'http://121.239.169.27:16016/safeplatform-out' |
| | | #VITE_API_URL_SOCKET = 'http://121.239.169.27:16016/safeplatform' |
对比新文件 |
| | |
| | | Index: .env.production |
| | | IDEA additional info: |
| | | Subsystem: com.intellij.openapi.diff.impl.patch.BaseRevisionTextPatchEP |
| | | <+># 线上环境\r\nENV = 'production'\r\n\r\n# 线上环境接口地址\r\nVITE_API_URL = 'http://121.239.169.27:16006/safeplatform'\r\nVITE_API_URL_OUT = 'http://121.239.169.27:16006/safeplatform-out'\r\nVITE_API_URL_SOCKET = 'http://121.239.169.27:16006/safeplatform'\r\n#VITE_API_URL = 'http://192.168.0.52:8011/safeplatform'\r\n#VITE_API_URL_OUT = 'http://192.168.0.52:8011/safeplatform-out'\r\n#VITE_API_URL_SOCKET = 'http://192.168.0.52:8011/safeplatform'\r\n |
| | | Subsystem: com.intellij.openapi.diff.impl.patch.CharsetEP |
| | | <+>UTF-8 |
| | | =================================================================== |
| | | diff --git a/.env.production b/.env.production |
| | | --- a/.env.production (revision 216d03fa53a38ffc6afe45756d2ae73b21bf00b5) |
| | | +++ b/.env.production (date 1661244605763) |
| | | @@ -5,6 +5,17 @@ |
| | | VITE_API_URL = 'http://121.239.169.27:16006/safeplatform' |
| | | VITE_API_URL_OUT = 'http://121.239.169.27:16006/safeplatform-out' |
| | | VITE_API_URL_SOCKET = 'http://121.239.169.27:16006/safeplatform' |
| | | + |
| | | #VITE_API_URL = 'http://192.168.0.52:8011/safeplatform' |
| | | #VITE_API_URL_OUT = 'http://192.168.0.52:8011/safeplatform-out' |
| | | #VITE_API_URL_SOCKET = 'http://192.168.0.52:8011/safeplatform' |
| | | + |
| | | +#内网test环境 |
| | | +#VITE_API_URL = 'http://192.168.0.52:7021/safeplatform' |
| | | +#VITE_API_URL_OUT = 'http://192.168.0.52:7021/safeplatform-out' |
| | | +#VITE_API_URL_SOCKET = 'http://192.168.0.52:7021/safeplatform' |
| | | + |
| | | +# 国泰线上试用环境接口地址 |
| | | +#VITE_API_URL = 'http://121.239.169.27:16016/safeplatform' |
| | | +#VITE_API_URL_OUT = 'http://121.239.169.27:16016/safeplatform-out' |
| | | +#VITE_API_URL_SOCKET = 'http://121.239.169.27:16016/safeplatform' |
| | | Index: src/views/system/user/index.vue |
| | | IDEA additional info: |
| | | Subsystem: com.intellij.openapi.diff.impl.patch.BaseRevisionTextPatchEP |
| | | <+><template>\r\n <div class=\"system-user-container\">\r\n <el-card shadow=\"hover\">\r\n <div class=\"system-user-search mb15\">\r\n <el-input size=\"default\" v-model=\"userTableData.listQuery.searchParams.username\" placeholder=\"请输入用户名称\" style=\"max-width: 180px\"> </el-input>\r\n <el-input size=\"default\" v-model=\"userTableData.listQuery.searchParams.realName\" placeholder=\"请输入真实姓名\" style=\"max-width: 180px; margin-left: 10px\"> </el-input>\r\n <el-button size=\"default\" type=\"primary\" class=\"ml10\" @click=\"initUserTableData\">\r\n <el-icon>\r\n <ele-Search />\r\n </el-icon>\r\n 查询\r\n </el-button>\r\n <el-button size=\"default\" type=\"success\" class=\"ml10\" @click=\"onOpenUserDialog('新增', '')\">\r\n <el-icon>\r\n <ele-FolderAdd />\r\n </el-icon>\r\n 新增用户\r\n </el-button>\r\n </div>\r\n <el-table :data=\"userTableData.data\" style=\"width: 100%\">\r\n <el-table-column type=\"index\" label=\"序号\" width=\"60\" />\r\n <el-table-column prop=\"username\" label=\"账户名称\" show-overflow-tooltip></el-table-column>\r\n <el-table-column prop=\"realName\" label=\"用户昵称\" show-overflow-tooltip></el-table-column>\r\n <el-table-column prop=\"sex\" label=\"性别\" show-overflow-tooltip></el-table-column>\r\n <el-table-column prop=\"role.name\" label=\"关联角色\" show-overflow-tooltip></el-table-column>\r\n <el-table-column prop=\"department.name\" label=\"部门\" show-overflow-tooltip></el-table-column>\r\n <el-table-column prop=\"phone\" label=\"手机号\" show-overflow-tooltip></el-table-column>\r\n <el-table-column prop=\"email\" label=\"邮箱\" show-overflow-tooltip></el-table-column>\r\n <el-table-column prop=\"status\" label=\"用户状态\" show-overflow-tooltip>\r\n <template #default=\"scope\">\r\n <el-tag type=\"success\" v-if=\"scope.row.status\">启用</el-tag>\r\n <el-tag type=\"info\" v-else>禁用</el-tag>\r\n </template>\r\n </el-table-column>\r\n <el-table-column prop=\"gmtCreate\" label=\"创建时间\" show-overflow-tooltip></el-table-column>\r\n <el-table-column label=\"操作\" width=\"100\">\r\n <template #default=\"scope\">\r\n <el-button :disabled=\"scope.row.userName === 'admin'\" size=\"small\" text type=\"primary\" @click=\"onOpenUserDialog('修改', scope.row)\">修改</el-button>\r\n <el-button :disabled=\"scope.row.userName === 'admin'\" size=\"small\" text type=\"primary\" @click=\"onRowDel(scope.row)\">删除</el-button>\r\n </template>\r\n </el-table-column>\r\n </el-table>\r\n <br />\r\n <el-pagination @size-change=\"onHandleSizeChange\" @current-change=\"onHandleCurrentChange\" class=\"page-position\" :pager-count=\"5\" :page-sizes=\"[10, 20, 30]\" v-model:current-page=\"userTableData.listQuery.pageIndex\" background v-model:page-size=\"userTableData.listQuery.pageSize\" layout=\"total, sizes, prev, pager, next, jumper\" :total=\"userTableData.total\"> </el-pagination>\r\n <br />\r\n <br />\r\n </el-card>\r\n <userDialog ref=\"userRef\" @getUserList=\"initUserTableData\" />\r\n </div>\r\n</template>\r\n\r\n<script lang=\"ts\">\r\nimport { toRefs, reactive, onMounted, ref, defineComponent } from 'vue';\r\nimport { ElMessageBox, ElMessage } from 'element-plus';\r\nimport userDialog from '/@/views/system/user/component/userDialog.vue';\r\nimport { userApi } from '/@/api/systemManage/user';\r\nimport { departmentApi } from '/@/api/systemManage/department';\r\nimport { useRoleApi } from '/@/api/systemManage/role';\r\n\r\n// 定义接口来定义对象的类型\r\ninterface TableDataRow {\r\n userName: string;\r\n userNickname: string;\r\n roleSign: string;\r\n department: string[];\r\n phone: string;\r\n email: string;\r\n sex: string;\r\n password: string;\r\n overdueTime: Date;\r\n status: boolean;\r\n describe: string;\r\n createTime: string;\r\n}\r\ninterface DepartmentDataRow {}\r\ninterface TableDataState {\r\n userTableData: {\r\n data: Array<TableDataRow>;\r\n total: number;\r\n loading: boolean;\r\n listQuery: {\r\n searchParams: {\r\n username: string | null;\r\n realName: string | null;\r\n };\r\n pageIndex: number;\r\n pageSize: number;\r\n };\r\n };\r\n departmentList: [];\r\n roleList: [];\r\n}\r\n\r\nexport default defineComponent({\r\n name: 'systemUser',\r\n components: { userDialog },\r\n setup() {\r\n const userRef = ref();\r\n const state = reactive<TableDataState>({\r\n userTableData: {\r\n data: [],\r\n total: 0,\r\n loading: false,\r\n listQuery: {\r\n searchParams: {\r\n username: null,\r\n realName: null\r\n },\r\n pageIndex: 1,\r\n pageSize: 10\r\n }\r\n },\r\n departmentList: [],\r\n roleList: []\r\n });\r\n // 初始化表格数据\r\n const initUserTableData = async () => {\r\n let res = await userApi().getUserList(state.userTableData.listQuery);\r\n if (res.data.code === '200') {\r\n state.userTableData.data = res.data.data;\r\n state.userTableData.total = res.data.total;\r\n } else {\r\n ElMessage({\r\n type: 'warning',\r\n message: res.data.msg\r\n });\r\n }\r\n };\r\n\r\n const getDepartmentData = async () => {\r\n let res = await departmentApi().getDepartmentList();\r\n if (res.data.code === '200') {\r\n state.departmentList = res.data.data;\r\n } else {\r\n ElMessage({\r\n type: 'warning',\r\n message: res.data.msg\r\n });\r\n }\r\n };\r\n\r\n const getRoleData = async () => {\r\n let res = await useRoleApi().getRoleList();\r\n if (res.data.code === '200') {\r\n state.roleList = res.data.data;\r\n } else {\r\n ElMessage({\r\n type: 'warning',\r\n message: res.data.msg\r\n });\r\n }\r\n };\r\n\r\n // 打开新增修改用户弹窗\r\n const onOpenUserDialog = (type: string, value: any) => {\r\n userRef.value.openDialog(type, value, state.departmentList, state.roleList);\r\n };\r\n\r\n // 删除用户\r\n const onRowDel = (row: TableDataRow) => {\r\n ElMessageBox.confirm(`此操作将永久删除账户名称:“${row.userName}”,是否继续?`, '提示', {\r\n confirmButtonText: '确认',\r\n cancelButtonText: '取消',\r\n type: 'warning'\r\n })\r\n .then(() => {\r\n ElMessage.success('删除成功');\r\n })\r\n .catch(() => {});\r\n };\r\n // 分页改变\r\n const onHandleSizeChange = (val: number) => {\r\n state.userTableData.listQuery.pageSize = val;\r\n initUserTableData();\r\n };\r\n // 分页改变\r\n const onHandleCurrentChange = (val: number) => {\r\n state.userTableData.listQuery.pageIndex = val;\r\n initUserTableData();\r\n };\r\n // 页面加载时\r\n onMounted(() => {\r\n initUserTableData();\r\n getDepartmentData();\r\n getRoleData();\r\n });\r\n return {\r\n userRef,\r\n onOpenUserDialog,\r\n onRowDel,\r\n onHandleSizeChange,\r\n initUserTableData,\r\n onHandleCurrentChange,\r\n ...toRefs(state)\r\n };\r\n }\r\n});\r\n</script>\r\n |
| | | Subsystem: com.intellij.openapi.diff.impl.patch.CharsetEP |
| | | <+>UTF-8 |
| | | =================================================================== |
| | | diff --git a/src/views/system/user/index.vue b/src/views/system/user/index.vue |
| | | --- a/src/views/system/user/index.vue (revision 216d03fa53a38ffc6afe45756d2ae73b21bf00b5) |
| | | +++ b/src/views/system/user/index.vue (date 1661242148445) |
| | | @@ -180,6 +180,10 @@ |
| | | }; |
| | | // 页面加载时 |
| | | onMounted(() => { |
| | | + let a = { name: 1, c: { name: 1 } }; |
| | | + let b = Object.assign({}, a); |
| | | + b.c.name = 2; |
| | | + console.log(a.c.name); |
| | | initUserTableData(); |
| | | getDepartmentData(); |
| | | getRoleData(); |
| | | Index: src/views/intellectInspect/inspectRecordManage/inspectRecord/index.vue |
| | | IDEA additional info: |
| | | Subsystem: com.intellij.openapi.diff.impl.patch.BaseRevisionTextPatchEP |
| | | <+><template>\r\n <div class=\"home-container\">\r\n <div style=\"height: 100%\">\r\n <el-row class=\"homeCard\">\r\n <div class=\"basic-line\">\r\n <span>任务类型:</span>\r\n <el-select v-model=\"tableData.params.taskType\" clearable filterable class=\"input-box\" placeholder=\"任务类型\">\r\n <el-option v-for=\"item in workTypeList\" :key=\"item.id\" :label=\"item.name\" :value=\"item.id\"></el-option>\r\n </el-select>\r\n </div>\r\n <div class=\"basic-line\">\r\n <span>执行班组:</span>\r\n <el-select v-model=\"tableData.params.execClassgroupId\" clearable filterable class=\"input-box\" placeholder=\"执行班组\">\r\n <el-option v-for=\"item in classGroupList\" :key=\"item.id\" :label=\"item.groupName\" :value=\"item.id\"></el-option>\r\n </el-select>\r\n </div>\r\n <div class=\"basic-line\">\r\n <span>任务状态:</span>\r\n <el-select v-model=\"tableData.params.taskStatus\" clearable filterable class=\"input-box\" placeholder=\"执行班组\">\r\n <el-option v-for=\"item in taskStatusList\" :key=\"item.id\" :label=\"item.name\" :value=\"item.id\"></el-option>\r\n </el-select>\r\n </div>\r\n <div style=\"padding-bottom: 10px\">\r\n <el-button type=\"primary\" @click=\"getInspectRecord\">查询</el-button>\r\n <el-button plain @click=\"reset\">重置</el-button>\r\n </div>\r\n </el-row>\r\n <div class=\"homeCard\">\r\n <div class=\"main-card\">\r\n <el-row class=\"cardTop\">\r\n <el-button type=\"primary\" :icon=\"Refresh\" size=\"default\" />\r\n </el-row>\r\n <el-table ref=\"multipleTableRef\" :data=\"tableData.inspectRecordData\" style=\"width: 100%\" height=\"calc(100% - 100px)\" :header-cell-style=\"{ background: '#fafafa' }\">\r\n <el-table-column property=\"taskName\" label=\"任务名称\" />\r\n <el-table-column property=\"taskType\" label=\"任务类型\">\r\n <template #default=\"scope\">\r\n <span>\r\n {{ parseNumber(scope.row.taskType, '任务类型') }}\r\n </span>\r\n </template>\r\n </el-table-column>\r\n <el-table-column property=\"execClassgroupId\" label=\"巡检班组\">\r\n <template #default=\"scope\">\r\n <span>\r\n {{ parseNumber(scope.row.execClassgroupId, '巡检班组') }}\r\n </span>\r\n </template>\r\n </el-table-column>\r\n <el-table-column property=\"frequency\" label=\"检查频次\">\r\n <template #default=\"scope\">\r\n <span>\r\n {{ scope.row.checkCycle }}\r\n </span>\r\n <span>\r\n {{ parseNumber(scope.row.checkCycleUnit, '检查频次') }}\r\n </span>\r\n </template>\r\n </el-table-column>\r\n <el-table-column property=\"startTime\" label=\"任务开始时间\" />\r\n <el-table-column prop=\"execUserName\" label=\"执行人\" show-overflow-tooltip></el-table-column>\r\n <el-table-column property=\"taskStatus\" label=\"任务状态\">\r\n <template #default=\"scope\">\r\n <el-tag :type=\"scope.row.taskStatus === 1 ? 'info' : scope.row.taskStatus === 2 ? '' : scope.row.taskStatus === 3 ? 'success' : 'danger'\">\r\n <span>\r\n {{ parseNumber(scope.row.taskStatus, '任务状态') }}\r\n </span>\r\n </el-tag>\r\n </template>\r\n </el-table-column>\r\n <el-table-column property=\"resultStatus\" label=\"巡检结果\">\r\n <template #default=\"scope\">\r\n <span>\r\n {{ parseNumber(scope.row.resultStatus, '巡检状态') }}\r\n </span>\r\n </template>\r\n </el-table-column>\r\n <el-table-column fixed=\"right\" label=\"操作\" align=\"center\" width=\"300\">\r\n <template #default=\"scope\">\r\n <el-button link type=\"primary\" size=\"small\" :icon=\"View\" @click=\"openInspectRecordDialog('查看', scope.row)\">查看</el-button>\r\n </template>\r\n </el-table-column>\r\n </el-table>\r\n <div class=\"pageBtn\">\r\n <el-pagination @size-change=\"onHandleSizeChange\" @current-change=\"onHandleCurrentChange\" :pager-count=\"5\" :page-sizes=\"[10, 20, 30]\" v-model:current-page=\"tableData.params.pageIndex\" background v-model:page-size=\"tableData.params.pageSize\" layout=\"total, sizes, prev, pager, next, jumper\" :total=\"tableData.total\" class=\"page-position\"> </el-pagination>\r\n </div>\r\n </div>\r\n </div>\r\n </div>\r\n <inspect-record-dialog ref=\"inspectRecordDialogRef\" @refreshInspectRecord=\"getInspectRecord\"></inspect-record-dialog>\r\n </div>\r\n</template>\r\n\r\n<script lang=\"ts\">\r\nimport { toRefs, reactive, ref, onMounted, nextTick } from 'vue';\r\nimport { Edit, View, Plus, Delete, Refresh, Search, Download } from '@element-plus/icons-vue';\r\nimport { ElTable, ElMessage } from 'element-plus';\r\nimport { inspectRecordApi } from '/@/api/intellectInspectSystem/inspectRecord';\r\nimport inspectRecordDialog from './components/inspectRecordDialog.vue';\r\nimport { departmentApi } from '/@/api/systemManage/department';\r\nimport { teamManageApi } from '/@/api/systemManage/personShiftManage/teamManage';\r\nimport { inspectPointApi } from '/@/api/intellectInspectSystem/inspectPointManage';\r\nimport { inspectTaskApi } from '/@/api/intellectInspectSystem/inspectTask';\r\nimport { useRoute } from 'vue-router';\r\nlet global: any = {\r\n homeChartOne: null,\r\n homeChartTwo: null,\r\n homeCharThree: null,\r\n dispose: [null, '', undefined]\r\n};\r\n\r\ninterface stateType {\r\n tableData: {\r\n inspectRecordData: [];\r\n total: number;\r\n loading: boolean;\r\n params: {\r\n pageIndex: number | null;\r\n pageSize: number | null;\r\n taskName: string | null;\r\n taskType: number | null;\r\n taskStatus: number | null;\r\n execUserId: number | null;\r\n execClassgroupId: number | null;\r\n execDepId: number | null;\r\n startTime: string | null;\r\n validTime: string | null;\r\n createUserId: number | null;\r\n reportTime: string | null;\r\n };\r\n };\r\n workTypeList: Array<type>;\r\n taskStatusList: Array<type>;\r\n quotaList: [];\r\n departmentList: [];\r\n classGroupList: Array<classGroup>;\r\n inspectPointAllList: [];\r\n timeType: Array<type>;\r\n resultStatusList: Array<type>;\r\n}\r\ninterface type {\r\n id: number;\r\n name: string;\r\n}\r\ninterface classGroup {\r\n id: number;\r\n groupName: string;\r\n}\r\nexport default {\r\n name: 'index',\r\n components: { inspectRecordDialog },\r\n setup() {\r\n const inspectRecordDialogRef = ref();\r\n const route = useRoute();\r\n const state = reactive<stateType>({\r\n tableData: {\r\n inspectRecordData: [],\r\n total: 0,\r\n loading: false,\r\n params: {\r\n pageIndex: 1,\r\n pageSize: 10,\r\n taskName: null,\r\n taskType: null,\r\n taskStatus: 2,\r\n execUserId: null,\r\n execClassgroupId: null,\r\n execDepId: null,\r\n startTime: null,\r\n validTime: null,\r\n createUserId: null,\r\n reportTime: null\r\n }\r\n },\r\n workTypeList: [\r\n { id: 1, name: '周期任务' },\r\n { id: 2, name: '单次任务' }\r\n ],\r\n resultStatusList: [\r\n { id: 0, name: '正常' },\r\n { id: 1, name: '存在异常' }\r\n ],\r\n taskStatusList: [\r\n { id: 1, name: '待巡检' },\r\n { id: 2, name: '巡检中' },\r\n { id: 3, name: '已巡检' },\r\n { id: 4, name: '超时未完成巡检' }\r\n ],\r\n quotaList: [],\r\n departmentList: [],\r\n classGroupList: [],\r\n inspectPointAllList: [],\r\n timeType: [\r\n { id: 1, name: '分' },\r\n { id: 2, name: '小时' },\r\n { id: 3, name: '日' },\r\n { id: 4, name: '月' },\r\n { id: 5, name: '年' }\r\n ]\r\n });\r\n\r\n //获取巡检记录数据\r\n const getInspectRecord = async () => {\r\n let res = await inspectRecordApi().getInspectRecordList(state.tableData.params);\r\n if (res.data.code === '200') {\r\n state.tableData.inspectRecordData = res.data.data.records;\r\n state.tableData.total = res.data.data.total;\r\n } else {\r\n ElMessage({\r\n type: 'warning',\r\n message: res.data.msg\r\n });\r\n }\r\n };\r\n\r\n //获取部门\r\n const getDepartmentData = async () => {\r\n let res = await departmentApi().getDepartmentList();\r\n if (res.data.code === '200') {\r\n state.departmentList = res.data.data;\r\n } else {\r\n ElMessage({\r\n type: 'warning',\r\n message: res.data.msg\r\n });\r\n }\r\n };\r\n\r\n //获取部门\r\n const getQuotaList = async () => {\r\n let res = await inspectTaskApi().getQuotaList();\r\n if (res.data.code === '200') {\r\n state.quotaList = res.data.data;\r\n } else {\r\n ElMessage({\r\n type: 'warning',\r\n message: res.data.msg\r\n });\r\n }\r\n };\r\n\r\n //获取巡检点\r\n const getInspectTaskPoint = async () => {\r\n let res = await inspectPointApi().getInspectPointAll();\r\n if (res.data.code === '200') {\r\n state.inspectPointAllList = res.data.data;\r\n } else {\r\n ElMessage({\r\n type: 'warning',\r\n message: res.data.msg\r\n });\r\n }\r\n };\r\n\r\n //获取班组\r\n const getClassGroupData = async () => {\r\n let res = await teamManageApi().getRecord({ depIp: null, groupName: null, containGroupMemberEnable: null });\r\n if (res.data.code === '200') {\r\n state.classGroupList = res.data.data;\r\n } else {\r\n ElMessage({\r\n type: 'warning',\r\n message: res.data.msg\r\n });\r\n }\r\n };\r\n\r\n const openInspectRecordDialog = (type: string, value: {}) => {\r\n inspectRecordDialogRef.value.showInspectRecordDialog(type, value, state.workTypeList, state.departmentList, state.timeType, state.classGroupList, state.quotaList, state.inspectPointAllList);\r\n };\r\n\r\n const parseNumber = (value: number, type: string) => {\r\n if (type === '任务类型') {\r\n return state.workTypeList.find((item) => item.id === value)?.name;\r\n } else if (type === '检查频次') {\r\n return state.timeType.find((item) => item.id == value)?.name;\r\n } else if (type === '巡检状态') {\r\n return state.resultStatusList.find((item) => item.id == value)?.name;\r\n } else if (type === '任务状态') {\r\n return state.taskStatusList.find((item) => item.id == value)?.name;\r\n } else {\r\n return state.classGroupList.find((item) => item.id == value)?.groupName;\r\n }\r\n };\r\n\r\n // 分页改变\r\n const onHandleSizeChange = (val: number) => {\r\n state.tableData.params.pageSize = val;\r\n getInspectRecord();\r\n };\r\n // 分页改变\r\n const onHandleCurrentChange = (val: number) => {\r\n state.tableData.params.pageIndex = val;\r\n getInspectRecord();\r\n };\r\n\r\n const reset = () => {\r\n state.tableData.params = {\r\n pageIndex: 1,\r\n pageSize: 10,\r\n taskName: null,\r\n taskType: null,\r\n taskStatus: null,\r\n execUserId: null,\r\n execClassgroupId: null,\r\n execDepId: null,\r\n startTime: null,\r\n validTime: null,\r\n createUserId: null,\r\n reportTime: null\r\n };\r\n };\r\n\r\n // 页面加载时\r\n onMounted(() => {\r\n if (route.query.id) {\r\n state.tableData.params.taskStatus = Number(route.query.id);\r\n state.tableData.inspectRecordData = JSON.parse(route.query.dataList);\r\n state.tableData.total = Number(route.query.total);\r\n }\r\n // getInspectRecord();\r\n getQuotaList();\r\n getDepartmentData();\r\n getClassGroupData();\r\n getInspectTaskPoint();\r\n });\r\n\r\n return {\r\n View,\r\n Edit,\r\n Delete,\r\n Refresh,\r\n Plus,\r\n reset,\r\n parseNumber,\r\n getInspectRecord,\r\n onHandleSizeChange,\r\n onHandleCurrentChange,\r\n inspectRecordDialogRef,\r\n openInspectRecordDialog,\r\n ...toRefs(state)\r\n };\r\n }\r\n};\r\n</script>\r\n\r\n<style scoped lang=\"scss\">\r\n$homeNavLengh: 8;\r\n.home-container {\r\n height: calc(100vh - 144px);\r\n box-sizing: border-box;\r\n overflow: hidden;\r\n .homeCard {\r\n width: 100%;\r\n padding: 20px;\r\n box-sizing: border-box;\r\n background: #fff;\r\n border-radius: 4px;\r\n\r\n .main-card {\r\n width: 100%;\r\n height: 100%;\r\n .cardTop {\r\n display: flex;\r\n align-items: center;\r\n justify-content: space-between;\r\n margin-bottom: 20px;\r\n .mainCardBtn {\r\n margin: 0;\r\n }\r\n }\r\n .pageBtn {\r\n height: 60px;\r\n display: flex;\r\n align-items: center;\r\n justify-content: right;\r\n\r\n .demo-pagination-block + .demo-pagination-block {\r\n margin-top: 10px;\r\n }\r\n .demo-pagination-block .demonstration {\r\n margin-bottom: 16px;\r\n }\r\n }\r\n }\r\n &:last-of-type {\r\n height: calc(100% - 100px);\r\n }\r\n }\r\n .el-row {\r\n display: flex;\r\n align-items: center;\r\n margin-bottom: 20px;\r\n &:last-child {\r\n margin-bottom: 0;\r\n }\r\n .grid-content {\r\n align-items: center;\r\n min-height: 36px;\r\n }\r\n\r\n .topInfo {\r\n display: flex;\r\n align-items: center;\r\n font-size: 16px;\r\n font-weight: bold;\r\n\r\n & > div {\r\n white-space: nowrap;\r\n margin-right: 20px;\r\n }\r\n }\r\n }\r\n}\r\n.stepItem {\r\n width: 100%;\r\n display: flex;\r\n align-items: flex-start;\r\n margin-bottom: 30px;\r\n margin-left: 30px;\r\n padding-bottom: 30px;\r\n border-left: 2px solid #ccc;\r\n &:first-of-type {\r\n margin-top: 30px;\r\n }\r\n &:last-of-type {\r\n margin-bottom: 0;\r\n border-left: none;\r\n }\r\n .stepNum {\r\n width: 30px;\r\n height: 30px;\r\n border-radius: 15px;\r\n box-sizing: border-box;\r\n color: #333;\r\n border: 1px solid #999;\r\n line-height: 28px;\r\n text-align: center;\r\n margin-right: 10px;\r\n margin-left: -16px;\r\n margin-top: -30px;\r\n }\r\n .stepCard {\r\n width: 100%;\r\n margin-top: -30px;\r\n\r\n .box-card {\r\n width: 100%;\r\n &:deep(.el-card__header) {\r\n padding: 10px 15px;\r\n }\r\n .card-header {\r\n width: 100%;\r\n display: flex;\r\n justify-content: space-between;\r\n align-items: center;\r\n & > div:first-of-type {\r\n margin-right: 80px;\r\n font-size: 18px;\r\n font-weight: bold;\r\n }\r\n }\r\n }\r\n }\r\n &:hover .card-header {\r\n color: #0098f5;\r\n }\r\n &:hover .stepNum {\r\n border: 2px solid #0098f5;\r\n color: #0098f5;\r\n }\r\n}\r\n.el-input {\r\n width: 100% !important;\r\n}\r\n:deep(.el-date-editor) {\r\n width: 100%;\r\n}\r\n.el-select {\r\n width: 100%;\r\n}\r\n:deep(.el-textarea.is-disabled .el-textarea__inner) {\r\n background-color: var(--el-card-bg-color);\r\n color: var(--el-input-text-color, var(--el-text-color-regular));\r\n}\r\n:deep(.el-input.is-disabled .el-input__inner) {\r\n color: var(--el-input-text-color, var(--el-text-color-regular));\r\n}\r\n:deep(.el-input.is-disabled .el-input__wrapper) {\r\n background-color: var(--el-card-bg-color);\r\n}\r\n</style>\r\n |
| | | Subsystem: com.intellij.openapi.diff.impl.patch.CharsetEP |
| | | <+>UTF-8 |
| | | =================================================================== |
| | | diff --git a/src/views/intellectInspect/inspectRecordManage/inspectRecord/index.vue b/src/views/intellectInspect/inspectRecordManage/inspectRecord/index.vue |
| | | --- a/src/views/intellectInspect/inspectRecordManage/inspectRecord/index.vue (revision 216d03fa53a38ffc6afe45756d2ae73b21bf00b5) |
| | | +++ b/src/views/intellectInspect/inspectRecordManage/inspectRecord/index.vue (date 1661228236216) |
| | | @@ -314,7 +314,7 @@ |
| | | onMounted(() => { |
| | | if (route.query.id) { |
| | | state.tableData.params.taskStatus = Number(route.query.id); |
| | | - state.tableData.inspectRecordData = JSON.parse(route.query.dataList); |
| | | + state.tableData.inspectRecordData = JSON.parse(route.query.dataList as string); |
| | | state.tableData.total = Number(route.query.total); |
| | | } |
| | | // getInspectRecord(); |
| | | Index: src/views/system/user/component/userDialog.vue |
| | | IDEA additional info: |
| | | Subsystem: com.intellij.openapi.diff.impl.patch.BaseRevisionTextPatchEP |
| | | <+><template>\r\n <div class=\"system-add-user-container\">\r\n <el-dialog :title=\"title\" v-model=\"isShowUserDialog\" width=\"769px\">\r\n <el-form :model=\"userForm\" size=\"default\" label-width=\"90px\">\r\n <el-row :gutter=\"35\">\r\n <el-col :xs=\"24\" :sm=\"12\" :md=\"12\" :lg=\"12\" :xl=\"12\" class=\"mb20\">\r\n <el-form-item label=\"账户名称\">\r\n <el-input v-model=\"userForm.username\" placeholder=\"请输入账户名称\" clearable></el-input>\r\n </el-form-item>\r\n </el-col>\r\n <el-col :xs=\"24\" :sm=\"12\" :md=\"12\" :lg=\"12\" :xl=\"12\" class=\"mb20\">\r\n <el-form-item label=\"用户昵称\">\r\n <el-input v-model=\"userForm.realName\" placeholder=\"请输入用户昵称\" clearable></el-input>\r\n </el-form-item>\r\n </el-col>\r\n <el-col :xs=\"24\" :sm=\"12\" :md=\"12\" :lg=\"12\" :xl=\"12\" class=\"mb20\">\r\n <el-form-item label=\"关联角色\">\r\n <el-select v-model=\"userForm.roleId\" placeholder=\"请选择\" clearable class=\"w100\">\r\n <el-option v-for=\"item in roleData\" :key=\"item.roleId\" :label=\"item.roleName\" :value=\"item.roleId\"> </el-option>\r\n </el-select>\r\n </el-form-item>\r\n </el-col>\r\n <el-col :xs=\"24\" :sm=\"12\" :md=\"12\" :lg=\"12\" :xl=\"12\" class=\"mb20\">\r\n <el-form-item label=\"部门\">\r\n <el-cascader :options=\"departmentData\" :props=\"{ emitPath: false, checkStrictly: true, value: 'depId', label: 'depName' }\" placeholder=\"请选择部门\" clearable class=\"w100\" v-model=\"userForm.depId\"> </el-cascader>\r\n </el-form-item>\r\n </el-col>\r\n <el-col :xs=\"24\" :sm=\"12\" :md=\"12\" :lg=\"12\" :xl=\"12\" class=\"mb20\">\r\n <el-form-item label=\"手机号\">\r\n <el-input v-model=\"userForm.phone\" placeholder=\"请输入手机号\" clearable></el-input>\r\n </el-form-item>\r\n </el-col>\r\n <el-col :xs=\"24\" :sm=\"12\" :md=\"12\" :lg=\"12\" :xl=\"12\" class=\"mb20\">\r\n <el-form-item label=\"身份证\">\r\n <el-input v-model=\"userForm.identify\" placeholder=\"请输入身份证\" clearable></el-input>\r\n </el-form-item>\r\n </el-col>\r\n <el-col :xs=\"24\" :sm=\"12\" :md=\"12\" :lg=\"12\" :xl=\"12\" class=\"mb20\">\r\n <el-form-item label=\"邮箱\">\r\n <el-input v-model=\"userForm.email\" placeholder=\"请输入\" clearable></el-input>\r\n </el-form-item>\r\n </el-col>\r\n <el-col :xs=\"24\" :sm=\"12\" :md=\"12\" :lg=\"12\" :xl=\"12\" class=\"mb20\">\r\n <el-form-item label=\"性别\">\r\n <el-select v-model=\"userForm.gender\" placeholder=\"请选择\" clearable class=\"w100\">\r\n <el-option v-for=\"item in sexList\" :key=\"item.id\" :value=\"item.id\" :label=\"item.name\"> </el-option>\r\n </el-select>\r\n </el-form-item>\r\n </el-col>\r\n <el-col :xs=\"24\" :sm=\"12\" :md=\"12\" :lg=\"12\" :xl=\"12\" class=\"mb20\">\r\n <el-form-item label=\"账户密码\">\r\n <el-input v-model=\"userForm.password\" placeholder=\"请输入\" type=\"password\" clearable></el-input>\r\n </el-form-item>\r\n </el-col>\r\n <el-col :xs=\"24\" :sm=\"12\" :md=\"12\" :lg=\"12\" :xl=\"12\" class=\"mb20\">\r\n <el-form-item label=\"账户过期\">\r\n <el-date-picker v-model=\"userForm.expireTime\" type=\"date\" placeholder=\"请选择\" class=\"w100\"> </el-date-picker>\r\n </el-form-item>\r\n </el-col>\r\n <!--\t\t\t\t\t<el-col :xs=\"24\" :sm=\"12\" :md=\"12\" :lg=\"12\" :xl=\"12\" class=\"mb20\">-->\r\n <!--\t\t\t\t\t\t<el-form-item label=\"用户状态\">-->\r\n <!--\t\t\t\t\t\t\t<el-switch v-model=\"userForm.status\" inline-prompt active-value = 1 inactive-value= 0 active-text=\"启\" inactive-text=\"禁\"></el-switch>-->\r\n <!--\t\t\t\t\t\t</el-form-item>-->\r\n <!--\t\t\t\t\t</el-col>-->\r\n </el-row>\r\n </el-form>\r\n <template #footer>\r\n <span class=\"dialog-footer\">\r\n <el-button @click=\"isShowUserDialog = !isShowUserDialog\" size=\"default\">取 消</el-button>\r\n <el-button type=\"primary\" v-throttle @click=\"onSubmit\" size=\"default\">确 定</el-button>\r\n </span>\r\n </template>\r\n </el-dialog>\r\n </div>\r\n</template>\r\n\r\n<script lang=\"ts\">\r\nimport { reactive, toRefs, onMounted, defineComponent } from 'vue';\r\nimport { ElMessageBox, ElMessage } from 'element-plus';\r\nimport { userApi } from '/@/api/systemManage/user';\r\n\r\n// 定义接口来定义对象的类型\r\ninterface DeptData {}\r\ninterface roleData {}\r\ninterface sexData {}\r\ninterface UserState {\r\n title: string;\r\n isShowUserDialog: boolean;\r\n userForm: {\r\n username: string;\r\n realName: string;\r\n roleId: number | null;\r\n depId: number | null;\r\n phone: string;\r\n email: string;\r\n gender: number | null;\r\n password: string;\r\n expireTime: string;\r\n status: number;\r\n identify: string;\r\n };\r\n departmentData: Array<DeptData>;\r\n roleData: Array<roleData>;\r\n sexList: Array<sexData>;\r\n}\r\n\r\nexport default defineComponent({\r\n name: 'user',\r\n setup(props, context) {\r\n const state = reactive<UserState>({\r\n title: '',\r\n isShowUserDialog: false,\r\n userForm: {\r\n username: '', // 账户名称\r\n realName: '', // 用户昵称\r\n roleId: null, // 关联角色\r\n depId: null, // 部门\r\n phone: '', // 手机号\r\n email: '', // 邮箱\r\n identify: '',\r\n gender: null, // 性别\r\n password: '', // 账户密码\r\n expireTime: '', // 账户过期\r\n status: 1 // 用户状态\r\n },\r\n departmentData: [], // 部门数据\r\n roleData: [], //角色数据\r\n sexList: [\r\n { id: 1, name: '男' },\r\n { id: 0, name: '女' }\r\n ]\r\n });\r\n // 打开弹窗\r\n const openDialog = (type: string, value: any, departmentList: [], roleList: []) => {\r\n state.isShowUserDialog = true;\r\n state.departmentData = departmentList;\r\n state.roleData = roleList;\r\n if (type === '新增') {\r\n state.title = '新增用户';\r\n state.userForm = {\r\n username: '',\r\n realName: '',\r\n roleId: null,\r\n depId: null,\r\n phone: '',\r\n email: '',\r\n identify: '',\r\n gender: null,\r\n password: '',\r\n expireTime: '',\r\n status: 1\r\n };\r\n } else {\r\n state.title = '修改用户';\r\n state.userForm = JSON.parse(JSON.stringify(value));\r\n }\r\n };\r\n\r\n // 新增修改\r\n const onSubmit = async () => {\r\n if (state.title === '新增用户') {\r\n let res = await userApi().addUser(state.userForm);\r\n if (res.data.code === '200') {\r\n ElMessage({\r\n type: 'success',\r\n message: '用户新增成功',\r\n duration: 2000\r\n });\r\n state.isShowUserDialog = false;\r\n context.emit('getUserList');\r\n } else {\r\n ElMessage({\r\n type: 'warning',\r\n message: res.data.msg\r\n });\r\n }\r\n } else {\r\n let res = await userApi().modUser(state.userForm);\r\n if (res.data.code === '200') {\r\n ElMessage({\r\n type: 'success',\r\n message: '用户修改成功',\r\n duration: 2000\r\n });\r\n state.isShowUserDialog = false;\r\n context.emit('getUserList');\r\n } else {\r\n ElMessage({\r\n type: 'warning',\r\n message: res.data.msg\r\n });\r\n }\r\n }\r\n };\r\n\r\n // 页面加载时\r\n onMounted(() => {});\r\n return {\r\n openDialog,\r\n onSubmit,\r\n ...toRefs(state)\r\n };\r\n }\r\n});\r\n</script>\r\n |
| | | Subsystem: com.intellij.openapi.diff.impl.patch.CharsetEP |
| | | <+>UTF-8 |
| | | =================================================================== |
| | | diff --git a/src/views/system/user/component/userDialog.vue b/src/views/system/user/component/userDialog.vue |
| | | --- a/src/views/system/user/component/userDialog.vue (revision 216d03fa53a38ffc6afe45756d2ae73b21bf00b5) |
| | | +++ b/src/views/system/user/component/userDialog.vue (date 1661237062499) |
| | | @@ -94,6 +94,7 @@ |
| | | phone: string; |
| | | email: string; |
| | | gender: number | null; |
| | | + positionId: number | null; |
| | | password: string; |
| | | expireTime: string; |
| | | status: number; |
| | | @@ -120,6 +121,7 @@ |
| | | identify: '', |
| | | gender: null, // 性别 |
| | | password: '', // 账户密码 |
| | | + positionId: 1, // 岗位 |
| | | expireTime: '', // 账户过期 |
| | | status: 1 // 用户状态 |
| | | }, |
| | | @@ -145,6 +147,7 @@ |
| | | phone: '', |
| | | email: '', |
| | | identify: '', |
| | | + positionId: 1, |
| | | gender: null, |
| | | password: '', |
| | | expireTime: '', |
| | | Index: .idea/shelf/Uncommitted_changes_before_Update_at_2022_8_16_15_03__Default_Changelist_.xml |
| | | =================================================================== |
| | | diff --git a/.idea/shelf/Uncommitted_changes_before_Update_at_2022_8_16_15_03__Default_Changelist_.xml b/.idea/shelf/Uncommitted_changes_before_Update_at_2022_8_16_15_03__Default_Changelist_.xml |
| | | deleted file mode 100644 |
| | | --- a/.idea/shelf/Uncommitted_changes_before_Update_at_2022_8_16_15_03__Default_Changelist_.xml (revision 216d03fa53a38ffc6afe45756d2ae73b21bf00b5) |
| | | +++ /dev/null (revision 216d03fa53a38ffc6afe45756d2ae73b21bf00b5) |
| | | @@ -1,4 +0,0 @@ |
| | | -<changelist name="Uncommitted_changes_before_Update_at_2022_8_16_15_03_[Default_Changelist]" date="1660633492977" recycled="true" deleted="true"> |
| | | - <option name="PATH" value="$PROJECT_DIR$/.idea/shelf/Uncommitted_changes_before_Update_at_2022_8_16_15_03_[Default_Changelist]/shelved.patch" /> |
| | | - <option name="DESCRIPTION" value="Uncommitted changes before Update at 2022/8/16 15:03 [Default Changelist]" /> |
| | | -</changelist> |
| | | \ No newline at end of file |
| | | Index: .idea/shelf/Uncommitted_changes_before_Update_at_2022_8_16_15_03_[Default_Changelist]/shelved.patch |
| | | =================================================================== |
| | | diff --git a/.idea/shelf/Uncommitted_changes_before_Update_at_2022_8_16_15_03_[Default_Changelist]/shelved.patch b/.idea/shelf/Uncommitted_changes_before_Update_at_2022_8_16_15_03_[Default_Changelist]/shelved.patch |
| | | deleted file mode 100644 |
| | | --- a/.idea/shelf/Uncommitted_changes_before_Update_at_2022_8_16_15_03_[Default_Changelist]/shelved.patch (revision 216d03fa53a38ffc6afe45756d2ae73b21bf00b5) |
| | | +++ /dev/null (revision 216d03fa53a38ffc6afe45756d2ae73b21bf00b5) |
| | | @@ -1,1194 +0,0 @@ |
| | | -Index: src/views/specialWorkSystem/workFlow/approveBasic/components/approveBasicDialog.vue |
| | | -IDEA additional info: |
| | | -Subsystem: com.intellij.openapi.diff.impl.patch.BaseRevisionTextPatchEP |
| | | -<+><template>\r\n <div class=\"system-add-menu-container\">\r\n <el-dialog :title=\"title\" v-model=\"isShowApproveBasicDialog\" width=\"600px\" :close-on-click-modal=\"false\">\r\n <el-form :model=\"approveBasicForm\" :rules=\"approveBasicFormRules\" ref=\"approveBasicFormRef\" size=\"default\" label-width=\"120px\">\r\n <el-row :gutter=\"35\">\r\n <el-col :xs=\"24\" :sm=\"24\" :md=\"24\" :lg=\"24\" :xl=\"24\" class=\"mb20\">\r\n <el-form-item label=\"标题\" prop=\"title\">\r\n <el-input class=\"input-add\" :disabled=\"!disabled\" v-model.trim=\"approveBasicForm.title\" placeholder=\"请输入标题名称\" clearable></el-input>\r\n </el-form-item>\r\n </el-col>\r\n <el-col :xs=\"24\" :sm=\"24\" :md=\"24\" :lg=\"24\" :xl=\"24\" class=\"mb20\">\r\n <el-form-item label=\"标准类型\" prop=\"ruleStandType\">\r\n <el-select class=\"input-add\" :disabled=\"!disabled\" v-model=\"approveBasicForm.ruleStandType\" placeholder=\"请选择标准类型\" clearable filterable>\r\n <el-option v-for=\"item in ruleStandTypeList\" :key=\"item.id\" :label=\"item.name\" :value=\"item.id\"></el-option>\r\n </el-select>\r\n </el-form-item>\r\n </el-col>\r\n <el-col :xs=\"24\" :sm=\"24\" :md=\"24\" :lg=\"24\" :xl=\"24\" class=\"mb20\">\r\n <el-form-item label=\"最大值\" prop=\"maxVal\">\r\n <el-input v-model=\"approveBasicForm.maxVal\" type=\"number\" class=\"input-add\" placeholder=\"请根据需求选择\">\r\n <template #prepend>\r\n <el-select v-model=\"approveBasicForm.maxValMatchPattern\" placeholder=\"请根据需求选择\" style=\"width: 115px\">\r\n <el-option v-for=\"item in typeTwoList\" :key=\"item.id\" :value=\"item.id\" :label=\"item.name\"> </el-option>\r\n </el-select>\r\n </template>\r\n </el-input>\r\n </el-form-item>\r\n </el-col>\r\n <el-col :xs=\"24\" :sm=\"24\" :md=\"24\" :lg=\"24\" :xl=\"24\" class=\"mb20\">\r\n <el-form-item label=\"最小值\" prop=\"minVal\">\r\n <el-input v-model=\"approveBasicForm.minVal\" type=\"number\" class=\"input-add\" placeholder=\"请根据需求选择\">\r\n <template #prepend>\r\n <el-select v-model=\"approveBasicForm.minValMatchPattern\" placeholder=\"请根据需求选择\" style=\"width: 115px\">\r\n <el-option v-for=\"item in typeList\" :key=\"item.id\" :value=\"item.id\" :label=\"item.name\"> </el-option>\r\n </el-select>\r\n </template>\r\n </el-input>\r\n </el-form-item>\r\n </el-col>\r\n <el-col :xs=\"24\" :sm=\"24\" :md=\"24\" :lg=\"24\" :xl=\"24\" class=\"mb20\">\r\n <el-form-item label=\"描述\" prop=\"info\">\r\n <el-input class=\"input-add\" :rows=\"3\" v-model.trim=\"approveBasicForm.info\" type=\"textarea\" placeholder=\"请输入描述\" ></el-input>\r\n </el-form-item>\r\n </el-col>\r\n <el-col :xs=\"24\" :sm=\"24\" :md=\"24\" :lg=\"24\" :xl=\"24\" class=\"mb20\" v-show=\"personTime\">\r\n <el-form-item label=\"创建人\" prop=\"location\">\r\n <el-input class=\"input-add\" :disabled=\"!disabled\" v-model.trim=\"approveBasicForm.createByUserName\"></el-input>\r\n </el-form-item>\r\n </el-col>\r\n <el-col :xs=\"24\" :sm=\"24\" :md=\"24\" :lg=\"24\" :xl=\"24\" class=\"mb20\" v-show=\"personTime\">\r\n <el-form-item label=\"创建时间\" prop=\"location\">\r\n <el-input class=\"input-add\" :disabled=\"!disabled\" v-model.trim=\"approveBasicForm.gmtCreate\"></el-input>\r\n </el-form-item>\r\n </el-col>\r\n <el-col :xs=\"24\" :sm=\"24\" :md=\"24\" :lg=\"24\" :xl=\"24\" class=\"mb20\" v-show=\"personTime\">\r\n <el-form-item label=\"最后修改人\" prop=\"location\">\r\n <el-input class=\"input-add\" :disabled=\"!disabled\" v-model.trim=\"approveBasicForm.lastEditUserName\"></el-input>\r\n </el-form-item>\r\n </el-col>\r\n <el-col :xs=\"24\" :sm=\"24\" :md=\"24\" :lg=\"24\" :xl=\"24\" class=\"mb20\" v-show=\"personTime\">\r\n <el-form-item label=\"最后修改时间\" prop=\"location\">\r\n <el-input class=\"input-add\" :disabled=\"!disabled\" v-model.trim=\"approveBasicForm.gmtModitify\"></el-input>\r\n </el-form-item>\r\n </el-col>\r\n </el-row>\r\n </el-form>\r\n <template #footer>\r\n <span class=\"dialog-footer\" v-show=\"disabled\">\r\n <el-button @click=\"isShowApproveBasicDialog = !isShowApproveBasicDialog\" size=\"default\">取 消</el-button>\r\n <el-button type=\"primary\" @click=\"submitApproveBasic\" v-throttle size=\"default\">确 定</el-button>\r\n </span>\r\n </template>\r\n </el-dialog>\r\n </div>\r\n</template>\r\n\r\n<script lang=\"ts\">\r\ninterface stateType {\r\n isShowApproveBasicDialog: Boolean;\r\n disabled: Boolean;\r\n personTime: Boolean;\r\n approveBasicForm: {\r\n ruleStandType: null|number,\r\n minVal: null|number,\r\n minValMatchPattern: null,\r\n maxVal: null|number,\r\n maxValMatchPattern: null|number,\r\n title:null| string,\r\n info:null| string,\r\n };\r\n title: string;\r\n departmentList: [];\r\n ruleStandTypeList: Array<levelListState>;\r\n typeList: Array<levelListState>;\r\n typeTwoList: Array<levelListState>;\r\n approveBasicFormRules: {};\r\n}\r\ninterface levelListState {\r\n id:number,\r\n name:string\r\n}\r\nimport { reactive, toRefs, ref } from 'vue';\r\nimport { approveBasicApi } from '/@/api/specialWorkSystem/approveBasic';\r\nimport { ElMessage } from 'element-plus';\r\nexport default {\r\n name: 'approveBasicDialog',\r\n setup(props: any, context: any) {\r\n const approveBasicFormRef = ref();\r\n const state = reactive<stateType>({\r\n title: '',\r\n disabled: false,\r\n personTime: false,\r\n departmentList: [],\r\n isShowApproveBasicDialog: false,\r\n ruleStandTypeList: [\r\n { id: 1, name: '可燃气浓度' },\r\n { id: 2, name: '氧气浓度' },\r\n { id: 3, name: '一氧化碳浓度' },\r\n { id: 4, name: '硫化氢浓度' },\r\n { id: 5, name: '温度' },\r\n { id: 6, name: '压力' },\r\n { id: 7, name: '震动' },\r\n ],\r\n typeList:[\r\n { id: 1, name: '大于' },\r\n { id: 2, name: '等于' },\r\n { id: 4, name: '大于等于' },\r\n ],\r\n typeTwoList:[\r\n { id: 3, name: '小于' },\r\n { id: 2, name: '等于' },\r\n { id: 5, name: '小于等于' },\r\n ],\r\n approveBasicForm: {\r\n ruleStandType: null,\r\n minVal: null,\r\n minValMatchPattern: null,\r\n maxVal: null,\r\n maxValMatchPattern: null,\r\n title: null,\r\n info: null,\r\n },\r\n approveBasicFormRules: {\r\n ruleStandType: [{ required: true, message: '请选择标准类型', trigger: 'change' }],\r\n minVal: [{ required: true, message: '请填写标最低值', trigger: 'blur' }],\r\n maxVal: [{ required: true, message: '请填写标最高值', trigger: 'blur' }],\r\n title: [{ required: true, message: '请选择风险等级', trigger: 'blur' }],\r\n info: [{ required: true, message: '请填写描述信息', trigger: 'blur' }]\r\n }\r\n });\r\n\r\n //打开模态框\r\n const showApproveBasicDialog = (type: string, value: object, department: []) => {\r\n state.isShowApproveBasicDialog = true;\r\n state.departmentList = department;\r\n setTimeout(() => {\r\n approveBasicFormRef.value.clearValidate();\r\n });\r\n if (type === '新增') {\r\n state.disabled = true;\r\n state.personTime = false;\r\n state.title = '新增审批标准';\r\n state.approveBasicForm = {\r\n ruleStandType: null,\r\n minVal: null,\r\n minValMatchPattern: null,\r\n maxVal: null,\r\n maxValMatchPattern: null,\r\n title: null,\r\n info: null,\r\n };\r\n } else if (type === '查看') {\r\n state.disabled = false;\r\n state.personTime = true;\r\n state.title = '查看审批标准';\r\n state.approveBasicForm = JSON.parse(JSON.stringify(value));\r\n } else {\r\n state.disabled = true;\r\n state.personTime = false;\r\n state.title = '修改审批标准';\r\n state.approveBasicForm = JSON.parse(JSON.stringify(value));\r\n }\r\n };\r\n\r\n //新增修改提交\r\n const submitApproveBasic = async () => {\r\n approveBasicFormRef.value.validate(async (valid: Boolean) => {\r\n if (valid) {\r\n if (state.title === '新增审批标准') {\r\n let res = await approveBasicApi().addApproveBasic(state.approveBasicForm);\r\n if (res.data.code === '200') {\r\n ElMessage({\r\n type: 'success',\r\n message: '审批标准新增成功',\r\n duration: 2000\r\n });\r\n state.isShowApproveBasicDialog = false;\r\n context.emit('refreshApproveBasic');\r\n } else {\r\n ElMessage({\r\n type: 'warning',\r\n message: res.data.msg\r\n });\r\n }\r\n } else {\r\n let res = await approveBasicApi().modApproveBasic(state.approveBasicForm);\r\n if (res.data.code === '200') {\r\n ElMessage({\r\n type: 'success',\r\n message: '审批标准修改成功',\r\n duration: 2000\r\n });\r\n state.isShowApproveBasicDialog = false;\r\n context.emit('refreshApproveBasic');\r\n } else {\r\n ElMessage({\r\n type: 'warning',\r\n message: res.data.msg\r\n });\r\n }\r\n }\r\n } else {\r\n ElMessage({\r\n type: 'warning',\r\n message: '请完善基本信息'\r\n });\r\n }\r\n });\r\n };\r\n\r\n return {\r\n ...toRefs(state),\r\n approveBasicFormRef,\r\n submitApproveBasic,\r\n showApproveBasicDialog\r\n };\r\n }\r\n};\r\n</script>\r\n\r\n<style scoped></style>\r\n |
| | | -Subsystem: com.intellij.openapi.diff.impl.patch.CharsetEP |
| | | -<+>UTF-8 |
| | | -=================================================================== |
| | | -diff --git a/src/views/specialWorkSystem/workFlow/approveBasic/components/approveBasicDialog.vue b/src/views/specialWorkSystem/workFlow/approveBasic/components/approveBasicDialog.vue |
| | | ---- a/src/views/specialWorkSystem/workFlow/approveBasic/components/approveBasicDialog.vue (revision a1d03a0e810219f8353748f6e55699bf2e1a77a6) |
| | | -+++ b/src/views/specialWorkSystem/workFlow/approveBasic/components/approveBasicDialog.vue (date 1660630612554) |
| | | -@@ -39,7 +39,7 @@ |
| | | - </el-col> |
| | | - <el-col :xs="24" :sm="24" :md="24" :lg="24" :xl="24" class="mb20"> |
| | | - <el-form-item label="描述" prop="info"> |
| | | -- <el-input class="input-add" :rows="3" v-model.trim="approveBasicForm.info" type="textarea" placeholder="请输入描述" ></el-input> |
| | | -+ <el-input class="input-add" :rows="3" v-model.trim="approveBasicForm.info" type="textarea" placeholder="请输入描述"></el-input> |
| | | - </el-form-item> |
| | | - </el-col> |
| | | - <el-col :xs="24" :sm="24" :md="24" :lg="24" :xl="24" class="mb20" v-show="personTime"> |
| | | -@@ -80,13 +80,14 @@ |
| | | - disabled: Boolean; |
| | | - personTime: Boolean; |
| | | - approveBasicForm: { |
| | | -- ruleStandType: null|number, |
| | | -- minVal: null|number, |
| | | -- minValMatchPattern: null, |
| | | -- maxVal: null|number, |
| | | -- maxValMatchPattern: null|number, |
| | | -- title:null| string, |
| | | -- info:null| string, |
| | | -+ ruleStandId: null | number; |
| | | -+ ruleStandType: null | number; |
| | | -+ minVal: null | number; |
| | | -+ minValMatchPattern: null; |
| | | -+ maxVal: null | number; |
| | | -+ maxValMatchPattern: null | number; |
| | | -+ title: null | string; |
| | | -+ info: null | string; |
| | | - }; |
| | | - title: string; |
| | | - departmentList: []; |
| | | -@@ -96,9 +97,20 @@ |
| | | - approveBasicFormRules: {}; |
| | | - } |
| | | - interface levelListState { |
| | | -- id:number, |
| | | -- name:string |
| | | -+ id: number; |
| | | -+ name: string; |
| | | - } |
| | | -+interface approveBasicForm { |
| | | -+ ruleStandId: null | number; |
| | | -+ ruleStandType: null | number; |
| | | -+ minVal: null | number; |
| | | -+ minValMatchPattern: null; |
| | | -+ maxVal: null | number; |
| | | -+ maxValMatchPattern: null | number; |
| | | -+ title: null | string; |
| | | -+ info: null | string; |
| | | -+} |
| | | -+ |
| | | - import { reactive, toRefs, ref } from 'vue'; |
| | | - import { approveBasicApi } from '/@/api/specialWorkSystem/approveBasic'; |
| | | - import { ElMessage } from 'element-plus'; |
| | | -@@ -119,26 +131,27 @@ |
| | | - { id: 4, name: '硫化氢浓度' }, |
| | | - { id: 5, name: '温度' }, |
| | | - { id: 6, name: '压力' }, |
| | | -- { id: 7, name: '震动' }, |
| | | -+ { id: 7, name: '震动' } |
| | | - ], |
| | | -- typeList:[ |
| | | -+ typeList: [ |
| | | - { id: 1, name: '大于' }, |
| | | - { id: 2, name: '等于' }, |
| | | -- { id: 4, name: '大于等于' }, |
| | | -+ { id: 4, name: '大于等于' } |
| | | - ], |
| | | -- typeTwoList:[ |
| | | -+ typeTwoList: [ |
| | | - { id: 3, name: '小于' }, |
| | | - { id: 2, name: '等于' }, |
| | | -- { id: 5, name: '小于等于' }, |
| | | -+ { id: 5, name: '小于等于' } |
| | | - ], |
| | | - approveBasicForm: { |
| | | -+ ruleStandId: null, |
| | | - ruleStandType: null, |
| | | - minVal: null, |
| | | - minValMatchPattern: null, |
| | | - maxVal: null, |
| | | - maxValMatchPattern: null, |
| | | - title: null, |
| | | -- info: null, |
| | | -+ info: null |
| | | - }, |
| | | - approveBasicFormRules: { |
| | | - ruleStandType: [{ required: true, message: '请选择标准类型', trigger: 'change' }], |
| | | -@@ -161,13 +174,14 @@ |
| | | - state.personTime = false; |
| | | - state.title = '新增审批标准'; |
| | | - state.approveBasicForm = { |
| | | -+ ruleStandId: null, |
| | | - ruleStandType: null, |
| | | - minVal: null, |
| | | - minValMatchPattern: null, |
| | | - maxVal: null, |
| | | - maxValMatchPattern: null, |
| | | - title: null, |
| | | -- info: null, |
| | | -+ info: null |
| | | - }; |
| | | - } else if (type === '查看') { |
| | | - state.disabled = false; |
| | | -@@ -179,6 +193,9 @@ |
| | | - state.personTime = false; |
| | | - state.title = '修改审批标准'; |
| | | - state.approveBasicForm = JSON.parse(JSON.stringify(value)); |
| | | -+ // for (let i in state.approveBasicForm) { |
| | | -+ // state.approveBasicForm[i] = approveBasicForm[i]; |
| | | -+ // } |
| | | - } |
| | | - }; |
| | | - |
| | | -Index: src/views/specialWorkSystem/workFlow/approveBasic/index.vue |
| | | -IDEA additional info: |
| | | -Subsystem: com.intellij.openapi.diff.impl.patch.BaseRevisionTextPatchEP |
| | | -<+><template>\r\n <div class=\"home-container\">\r\n <div style=\"height: 100%\">\r\n <el-row class=\"homeCard\">\r\n <div class=\"basic-line\">\r\n <span>任务类型:</span>\r\n <el-select v-model=\"tableData.params.workType\" clearable filterable class=\"input-box\" placeholder=\"任务类型\">\r\n <el-option v-for=\"item in workTypeList\" :key=\"item.id\" :label=\"item.name\" :value=\"item.id\"></el-option>\r\n </el-select>\r\n </div>\r\n <div class=\"basic-line\">\r\n <span>执行班组:</span>\r\n <el-select v-model=\"tableData.params.execClassgroupId\" clearable filterable class=\"input-box\" placeholder=\"执行班组\">\r\n <el-option v-for=\"item in classGroupList\" :key=\"item.id\" :label=\"item.groupName\" :value=\"item.id\"></el-option>\r\n </el-select>\r\n </div>\r\n <div style=\"padding-bottom: 10px\">\r\n <el-button type=\"primary\" @click=\"getInspectionTask\">查询</el-button>\r\n <el-button plain @click=\"reset\">重置</el-button>\r\n </div>\r\n </el-row>\r\n <div class=\"homeCard\">\r\n <div class=\"main-card\">\r\n <el-row class=\"cardTop\">\r\n <el-col :span=\"12\" class=\"mainCardBtn\">\r\n <el-button type=\"primary\" :icon=\"Plus\" size=\"default\" @click=\"openApproveBasicDialog('新增', {})\">新建</el-button>\r\n <!-- <el-button type=\"danger\" :icon=\"Delete\" size=\"default\" plain>删除</el-button>-->\r\n </el-col>\r\n <el-button type=\"primary\" :icon=\"Refresh\" size=\"default\" />\r\n </el-row>\r\n <el-table ref=\"multipleTableRef\" :data=\"tableData.approveBasicData\" style=\"width: 100%\" height=\"calc(100% - 100px)\" :header-cell-style=\"{ background: '#fafafa' }\">\r\n <el-table-column property=\"title\" label=\"标题\" />\r\n <el-table-column property=\"ruleStandType\" label=\"标准类型\">\r\n <template #default=\"scope\">\r\n <span>\r\n {{ parseNumber(scope.row.ruleStandType, '标准类型') }}\r\n </span>\r\n </template>\r\n </el-table-column>\r\n <el-table-column property=\"minVal\" label=\"最低值\">\r\n <template #default=\"scope\">\r\n <span>\r\n {{ parseNumber(scope.row.minValMatchPattern, '最低值') }}\r\n </span>\r\n <span>\r\n {{scope.row.minVal}}\r\n </span>\r\n </template>\r\n </el-table-column>\r\n <el-table-column property=\"maxVal\" label=\"最高值\">\r\n <template #default=\"scope\">\r\n <span>\r\n {{ parseNumber(scope.row.maxValMatchPattern, '最高值') }}\r\n </span>\r\n <span>\r\n {{ scope.row.maxVal }}\r\n </span>\r\n </template>\r\n </el-table-column>\r\n <el-table-column property=\"info\" label=\"描述\" />\r\n <el-table-column prop=\"createUserName\" label=\"创建人\" show-overflow-tooltip></el-table-column>\r\n <el-table-column prop=\"gmtCreate\" label=\"创建时间\" show-overflow-tooltip></el-table-column>\r\n <el-table-column prop=\"lastEditUserName\" label=\"最后修改人\" show-overflow-tooltip></el-table-column>\r\n <el-table-column prop=\"gmtModitify\" label=\"最后修改时间\" show-overflow-tooltip></el-table-column>\r\n <el-table-column property=\"status\" label=\"状态\" width=\"60\" />\r\n <el-table-column fixed=\"right\" label=\"操作\" align=\"center\" width=\"300\">\r\n <template #default=\"scope\">\r\n <el-button link type=\"primary\" size=\"small\" :icon=\"View\" @click=\"openApproveBasicDialog('查看', scope.row)\">查看</el-button>\r\n <el-button link type=\"primary\" size=\"small\" :icon=\"Edit\" @click=\"openApproveBasicDialog('修改', scope.row)\">修改</el-button>\r\n <el-button link type=\"danger\" size=\"small\" :icon=\"Delete\" @click=\"deleteApproveBasic(scope.row)\">删除</el-button>\r\n </template>\r\n </el-table-column>\r\n </el-table>\r\n <br>\r\n <el-pagination\r\n @size-change=\"onHandleSizeChange\"\r\n @current-change=\"onHandleCurrentChange\"\r\n :pager-count=\"5\"\r\n :page-sizes=\"[10, 20, 30]\"\r\n v-model:current-page=\"tableData.params.pageIndex\"\r\n background\r\n v-model:page-size=\"tableData.params.pageSize\"\r\n layout=\"total, sizes, prev, pager, next, jumper\"\r\n :total=\"tableData.total\"\r\n class=\"page-position\">\r\n </el-pagination>\r\n\r\n </div>\r\n </div>\r\n </div>\r\n <approve-basic-dialog ref=\"approveBasicDialogRef\" @refreshApproveBasic=\"getInspectionTask\"></approve-basic-dialog>\r\n </div>\r\n</template>\r\n\r\n<script lang=\"ts\">\r\nimport { toRefs, reactive, ref, onMounted } from 'vue';\r\nimport { Edit, View, Plus, Delete, Refresh, Search, Download } from '@element-plus/icons-vue';\r\nimport { ElTable, ElMessage, ElMessageBox } from 'element-plus';\r\nimport { approveBasicApi } from '/@/api/specialWorkSystem/approveBasic';\r\nimport { departmentApi } from '/@/api/systemManage/department';\r\nimport approveBasicDialog from '/@/views/specialWorkSystem/workFlow/approveBasic/components/approveBasicDialog.vue';\r\nlet global: any = {\r\n homeChartOne: null,\r\n homeChartTwo: null,\r\n homeCharThree: null,\r\n dispose: [null, '', undefined]\r\n};\r\n\r\ninterface stateType {\r\n tableData: {\r\n approveBasicData: [];\r\n total: number;\r\n loading: boolean;\r\n params: {\r\n pageIndex: number | null;\r\n pageSize: number | null;\r\n unitName: string | null;\r\n workType: number | null;\r\n createUserId: number | null;\r\n execClassgroupId: number | null;\r\n checkCycle: number | null;\r\n checkCycleUnit: number | null;\r\n };\r\n };\r\n ruleStandTypeList: Array<type>;\r\n typeList: Array<type>;\r\n typeTwoList: Array<type>;\r\n}\r\ninterface type {\r\n id: number;\r\n name: string;\r\n}\r\ninterface classGroup {\r\n id: number;\r\n groupName: string;\r\n}\r\nexport default {\r\n name: 'index',\r\n components: { approveBasicDialog },\r\n setup() {\r\n const approveBasicDialogRef = ref();\r\n const state = reactive<stateType>({\r\n tableData: {\r\n approveBasicData: [],\r\n total: 0,\r\n loading: false,\r\n params: {\r\n pageIndex: 1,\r\n pageSize: 10,\r\n unitName: null,\r\n workType: null,\r\n createUserId: null,\r\n execClassgroupId: null,\r\n checkCycle: null,\r\n checkCycleUnit: null\r\n }\r\n },\r\n ruleStandTypeList: [\r\n { id: 1, name: '可燃气浓度' },\r\n { id: 2, name: '氧气浓度' },\r\n { id: 3, name: '一氧化碳浓度' },\r\n { id: 4, name: '硫化氢浓度' },\r\n { id: 5, name: '温度' },\r\n { id: 6, name: '压力' },\r\n { id: 7, name: '震动' },\r\n ],\r\n typeList:[\r\n { id: 1, name: '大于' },\r\n { id: 2, name: '等于' },\r\n { id: 4, name: '大于等于' },\r\n ],\r\n typeTwoList:[\r\n { id: 3, name: '小于' },\r\n { id: 2, name: '等于' },\r\n { id: 5, name: '小于等于' },\r\n ],\r\n\r\n });\r\n\r\n //获取巡检任务数据\r\n const getInspectionTask = async () => {\r\n let res = await approveBasicApi().getApproveBasicList(state.tableData.params);\r\n if (res.data.code === '200') {\r\n state.tableData.approveBasicData = res.data.data;\r\n state.tableData.total = res.data.total;\r\n } else {\r\n ElMessage({\r\n type: 'warning',\r\n message: res.data.msg\r\n });\r\n }\r\n };\r\n\r\n // //获取部门\r\n // const getDepartmentData = async () => {\r\n // let res = await departmentApi().getDepartmentList();\r\n // if (res.data.code === '200') {\r\n // state.departmentList = res.data.data;\r\n // } else {\r\n // ElMessage({\r\n // type: 'warning',\r\n // message: res.data.msg\r\n // });\r\n // }\r\n // };\r\n\r\n // 删除\r\n const deleteApproveBasic = (row: any) => {\r\n ElMessageBox.confirm(`此操作将永久删除该任务:“${row.title}”,是否继续?`, '提示', {\r\n confirmButtonText: '确认',\r\n cancelButtonText: '取消',\r\n type: 'warning'\r\n })\r\n .then(async () => {\r\n let res = await approveBasicApi().deleteApproveBasic({ id: row.id });\r\n if (res.data.code === '200') {\r\n ElMessage({\r\n type: 'success',\r\n duration: 2000,\r\n message: '删除成功'\r\n });\r\n await getInspectionTask();\r\n } else {\r\n ElMessage({\r\n type: 'warning',\r\n message: res.data.msg\r\n });\r\n }\r\n })\r\n .catch(() => {});\r\n };\r\n\r\n const openApproveBasicDialog = (type: string, value: {}) => {\r\n approveBasicDialogRef.value.showApproveBasicDialog(type, value);\r\n };\r\n\r\n const parseNumber = (value: number, type: string) => {\r\n if (type === '标准类型') {\r\n return state.ruleStandTypeList.find((item) => item.id === value)?.name;\r\n } else if (type === '最高值') {\r\n return state.typeTwoList.find((item) => item.id == value)?.name;\r\n } else {\r\n return state.typeList.find((item) => item.id == value)?.name;\r\n }\r\n };\r\n\r\n // 分页改变\r\n const onHandleSizeChange = (val: number) => {\r\n state.tableData.params.pageSize = val;\r\n getInspectionTask();\r\n };\r\n // 分页改变\r\n const onHandleCurrentChange = (val: number) => {\r\n state.tableData.params.pageIndex = val;\r\n getInspectionTask();\r\n };\r\n\r\n const reset = () => {\r\n state.tableData.params = {\r\n pageIndex: 1,\r\n pageSize: 10,\r\n unitName: null,\r\n workType: null,\r\n createUserId: null,\r\n execClassgroupId: null,\r\n checkCycle: null,\r\n checkCycleUnit: null\r\n };\r\n };\r\n\r\n // 页面加载时\r\n onMounted(() => {\r\n getInspectionTask();\r\n });\r\n\r\n return {\r\n View,\r\n Edit,\r\n Delete,\r\n Refresh,\r\n Plus,\r\n reset,\r\n parseNumber,\r\n deleteApproveBasic,\r\n getInspectionTask,\r\n onHandleSizeChange,\r\n onHandleCurrentChange,\r\n approveBasicDialogRef,\r\n openApproveBasicDialog,\r\n ...toRefs(state)\r\n };\r\n }\r\n};\r\n</script>\r\n\r\n<style scoped lang=\"scss\">\r\n$homeNavLengh: 8;\r\n.home-container {\r\n height: calc(100vh - 114px);\r\n box-sizing: border-box;\r\n overflow: hidden;\r\n .homeCard {\r\n width: 100%;\r\n padding: 20px;\r\n box-sizing: border-box;\r\n background: #fff;\r\n border-radius: 4px;\r\n\r\n .main-card {\r\n width: 100%;\r\n height: 100%;\r\n .cardTop {\r\n display: flex;\r\n align-items: center;\r\n justify-content: space-between;\r\n margin-bottom: 20px;\r\n .mainCardBtn {\r\n margin: 0;\r\n }\r\n }\r\n .pageBtn {\r\n height: 60px;\r\n display: flex;\r\n align-items: center;\r\n justify-content: right;\r\n\r\n .demo-pagination-block + .demo-pagination-block {\r\n margin-top: 10px;\r\n }\r\n .demo-pagination-block .demonstration {\r\n margin-bottom: 16px;\r\n }\r\n }\r\n }\r\n &:last-of-type {\r\n height: calc(100% - 100px);\r\n }\r\n }\r\n .el-row {\r\n display: flex;\r\n align-items: center;\r\n margin-bottom: 20px;\r\n &:last-child {\r\n margin-bottom: 0;\r\n }\r\n .grid-content {\r\n align-items: center;\r\n min-height: 36px;\r\n }\r\n\r\n .topInfo {\r\n display: flex;\r\n align-items: center;\r\n font-size: 16px;\r\n font-weight: bold;\r\n\r\n & > div {\r\n white-space: nowrap;\r\n margin-right: 20px;\r\n }\r\n }\r\n }\r\n}\r\n.stepItem {\r\n width: 100%;\r\n display: flex;\r\n align-items: flex-start;\r\n margin-bottom: 30px;\r\n margin-left: 30px;\r\n padding-bottom: 30px;\r\n border-left: 2px solid #ccc;\r\n &:first-of-type {\r\n margin-top: 30px;\r\n }\r\n &:last-of-type {\r\n margin-bottom: 0;\r\n border-left: none;\r\n }\r\n .stepNum {\r\n width: 30px;\r\n height: 30px;\r\n border-radius: 15px;\r\n box-sizing: border-box;\r\n color: #333;\r\n border: 1px solid #999;\r\n line-height: 28px;\r\n text-align: center;\r\n margin-right: 10px;\r\n margin-left: -16px;\r\n margin-top: -30px;\r\n }\r\n .stepCard {\r\n width: 100%;\r\n margin-top: -30px;\r\n\r\n .box-card {\r\n width: 100%;\r\n &:deep(.el-card__header) {\r\n padding: 10px 15px;\r\n }\r\n .card-header {\r\n width: 100%;\r\n display: flex;\r\n justify-content: space-between;\r\n align-items: center;\r\n & > div:first-of-type {\r\n margin-right: 80px;\r\n font-size: 18px;\r\n font-weight: bold;\r\n }\r\n }\r\n }\r\n }\r\n &:hover .card-header {\r\n color: #0098f5;\r\n }\r\n &:hover .stepNum {\r\n border: 2px solid #0098f5;\r\n color: #0098f5;\r\n }\r\n}\r\n.el-input {\r\n width: 100% !important;\r\n}\r\n:deep(.el-date-editor) {\r\n width: 100%;\r\n}\r\n.el-select {\r\n width: 100%;\r\n}\r\n:deep(.el-textarea.is-disabled .el-textarea__inner) {\r\n background-color: var(--el-card-bg-color);\r\n color: var(--el-input-text-color, var(--el-text-color-regular));\r\n}\r\n:deep(.el-input.is-disabled .el-input__inner) {\r\n color: var(--el-input-text-color, var(--el-text-color-regular));\r\n}\r\n:deep(.el-input.is-disabled .el-input__wrapper) {\r\n background-color: var(--el-card-bg-color);\r\n}\r\n</style>\r\n |
| | | -Subsystem: com.intellij.openapi.diff.impl.patch.CharsetEP |
| | | -<+>UTF-8 |
| | | -=================================================================== |
| | | -diff --git a/src/views/specialWorkSystem/workFlow/approveBasic/index.vue b/src/views/specialWorkSystem/workFlow/approveBasic/index.vue |
| | | ---- a/src/views/specialWorkSystem/workFlow/approveBasic/index.vue (revision a1d03a0e810219f8353748f6e55699bf2e1a77a6) |
| | | -+++ b/src/views/specialWorkSystem/workFlow/approveBasic/index.vue (date 1660631242441) |
| | | -@@ -5,14 +5,12 @@ |
| | | - <div class="basic-line"> |
| | | - <span>任务类型:</span> |
| | | - <el-select v-model="tableData.params.workType" clearable filterable class="input-box" placeholder="任务类型"> |
| | | -- <el-option v-for="item in workTypeList" :key="item.id" :label="item.name" :value="item.id"></el-option> |
| | | -+ <!-- <el-option v-for="item in workTypeList" :key="item.id" :label="item.name" :value="item.id"></el-option>--> |
| | | - </el-select> |
| | | - </div> |
| | | - <div class="basic-line"> |
| | | - <span>执行班组:</span> |
| | | -- <el-select v-model="tableData.params.execClassgroupId" clearable filterable class="input-box" placeholder="执行班组"> |
| | | -- <el-option v-for="item in classGroupList" :key="item.id" :label="item.groupName" :value="item.id"></el-option> |
| | | -- </el-select> |
| | | -+ <el-select v-model="tableData.params.execClassgroupId" clearable filterable class="input-box" placeholder="执行班组"> </el-select> |
| | | - </div> |
| | | - <div style="padding-bottom: 10px"> |
| | | - <el-button type="primary" @click="getInspectionTask">查询</el-button> |
| | | -@@ -28,7 +26,8 @@ |
| | | - </el-col> |
| | | - <el-button type="primary" :icon="Refresh" size="default" /> |
| | | - </el-row> |
| | | -- <el-table ref="multipleTableRef" :data="tableData.approveBasicData" style="width: 100%" height="calc(100% - 100px)" :header-cell-style="{ background: '#fafafa' }"> |
| | | -+ <el-table ref="multipleTableRef" :data="tableData.approveBasicData" style="width: 100%" height="calc(100% - 100px)" :header-cell-style="{ background: '#fafafa' }" @selection-change="handleSelectionChange"> |
| | | -+ <el-table-column type="selection" width="55" /> |
| | | - <el-table-column property="title" label="标题" /> |
| | | - <el-table-column property="ruleStandType" label="标准类型"> |
| | | - <template #default="scope"> |
| | | -@@ -43,13 +42,13 @@ |
| | | - {{ parseNumber(scope.row.minValMatchPattern, '最低值') }} |
| | | - </span> |
| | | - <span> |
| | | -- {{scope.row.minVal}} |
| | | -+ {{ scope.row.minVal }} |
| | | - </span> |
| | | - </template> |
| | | - </el-table-column> |
| | | - <el-table-column property="maxVal" label="最高值"> |
| | | - <template #default="scope"> |
| | | -- <span> |
| | | -+ <span> |
| | | - {{ parseNumber(scope.row.maxValMatchPattern, '最高值') }} |
| | | - </span> |
| | | - <span> |
| | | -@@ -71,20 +70,8 @@ |
| | | - </template> |
| | | - </el-table-column> |
| | | - </el-table> |
| | | -- <br> |
| | | -- <el-pagination |
| | | -- @size-change="onHandleSizeChange" |
| | | -- @current-change="onHandleCurrentChange" |
| | | -- :pager-count="5" |
| | | -- :page-sizes="[10, 20, 30]" |
| | | -- v-model:current-page="tableData.params.pageIndex" |
| | | -- background |
| | | -- v-model:page-size="tableData.params.pageSize" |
| | | -- layout="total, sizes, prev, pager, next, jumper" |
| | | -- :total="tableData.total" |
| | | -- class="page-position"> |
| | | -- </el-pagination> |
| | | -- |
| | | -+ <br /> |
| | | -+ <el-pagination @size-change="onHandleSizeChange" @current-change="onHandleCurrentChange" :pager-count="5" :page-sizes="[10, 20, 30]" v-model:current-page="tableData.params.pageIndex" background v-model:page-size="tableData.params.pageSize" layout="total, sizes, prev, pager, next, jumper" :total="tableData.total" class="page-position"> </el-pagination> |
| | | - </div> |
| | | - </div> |
| | | - </div> |
| | | -@@ -125,14 +112,16 @@ |
| | | - ruleStandTypeList: Array<type>; |
| | | - typeList: Array<type>; |
| | | - typeTwoList: Array<type>; |
| | | -+ deleteList: { |
| | | -+ ids: Array<number>; |
| | | -+ }; |
| | | - } |
| | | - interface type { |
| | | - id: number; |
| | | - name: string; |
| | | - } |
| | | --interface classGroup { |
| | | -- id: number; |
| | | -- groupName: string; |
| | | -+interface ruleType { |
| | | -+ ruleStandId: number; |
| | | - } |
| | | - export default { |
| | | - name: 'index', |
| | | -@@ -162,19 +151,21 @@ |
| | | - { id: 4, name: '硫化氢浓度' }, |
| | | - { id: 5, name: '温度' }, |
| | | - { id: 6, name: '压力' }, |
| | | -- { id: 7, name: '震动' }, |
| | | -+ { id: 7, name: '震动' } |
| | | - ], |
| | | -- typeList:[ |
| | | -+ typeList: [ |
| | | - { id: 1, name: '大于' }, |
| | | - { id: 2, name: '等于' }, |
| | | -- { id: 4, name: '大于等于' }, |
| | | -+ { id: 4, name: '大于等于' } |
| | | - ], |
| | | -- typeTwoList:[ |
| | | -+ typeTwoList: [ |
| | | - { id: 3, name: '小于' }, |
| | | - { id: 2, name: '等于' }, |
| | | -- { id: 5, name: '小于等于' }, |
| | | -+ { id: 5, name: '小于等于' } |
| | | - ], |
| | | -- |
| | | -+ deleteList: { |
| | | -+ ids: [] |
| | | -+ } |
| | | - }); |
| | | - |
| | | - //获取巡检任务数据 |
| | | -@@ -212,7 +203,7 @@ |
| | | - type: 'warning' |
| | | - }) |
| | | - .then(async () => { |
| | | -- let res = await approveBasicApi().deleteApproveBasic({ id: row.id }); |
| | | -+ let res = await approveBasicApi().deleteApproveBasic(state.deleteList); |
| | | - if (res.data.code === '200') { |
| | | - ElMessage({ |
| | | - type: 'success', |
| | | -@@ -230,6 +221,12 @@ |
| | | - .catch(() => {}); |
| | | - }; |
| | | - |
| | | -+ const handleSelectionChange = (val: Array<ruleType>) => { |
| | | -+ state.deleteList.ids = val.map((item) => { |
| | | -+ return item.ruleStandId; |
| | | -+ }); |
| | | -+ }; |
| | | -+ |
| | | - const openApproveBasicDialog = (type: string, value: {}) => { |
| | | - approveBasicDialogRef.value.showApproveBasicDialog(type, value); |
| | | - }; |
| | | -@@ -281,6 +278,7 @@ |
| | | - Plus, |
| | | - reset, |
| | | - parseNumber, |
| | | -+ handleSelectionChange, |
| | | - deleteApproveBasic, |
| | | - getInspectionTask, |
| | | - onHandleSizeChange, |
| | | -Index: .env.development |
| | | -IDEA additional info: |
| | | -Subsystem: com.intellij.openapi.diff.impl.patch.BaseRevisionTextPatchEP |
| | | -<+># 本地环境\r\nENV = 'development'\r\n\r\nVITE_API_URL = 'http://192.168.0.35:8008'\r\n#李宇飞接口地址\r\n\r\nVITE_API_URL = 'http://192.168.0.50:8008'\r\n#张凤接口地址\r\n\r\n#VITE_API_URL = 'http://192.168.0.29:8008'\r\n#黄振接口地址\r\n\r\n#VITE_API_URL = 'http://192.168.0.179:8008'\r\n#施正红接口地址\r\n\r\n#VITE_API_URL = 'http://192.168.0.69:8008'\r\n#戚会山接口地址\r\n\r\n#VITE_API_URL = 'http://192.168.0.52:8011/safeplatform'\r\n#本地测试接口地址\r\n\r\n#VITE_API_URL_OUT = 'http://192.168.0.52:8011/safeplatform-out'\r\n#本地外包测试接口地址\r\n\r\n#VITE_API_URL = 'http://121.239.169.27:16006/safeplatform'\r\n#线上正式环境接口地址\r\n\r\n#VITE_API_URL_OUT = 'http://121.239.169.27:16006/safeplatform-out'\r\n#线上正式环境外包接口地址\r\n\r\nVITE_API_URL_SOCKET = 'http://192.168.0.29:8018'\r\n#黄振websocket接口地址 |
| | | -Subsystem: com.intellij.openapi.diff.impl.patch.CharsetEP |
| | | -<+>UTF-8 |
| | | -=================================================================== |
| | | -diff --git a/.env.development b/.env.development |
| | | ---- a/.env.development (revision a1d03a0e810219f8353748f6e55699bf2e1a77a6) |
| | | -+++ b/.env.development (date 1660616346693) |
| | | -@@ -1,7 +1,7 @@ |
| | | - # 本地环境 |
| | | - ENV = 'development' |
| | | - |
| | | --VITE_API_URL = 'http://192.168.0.35:8008' |
| | | -+#VITE_API_URL = 'http://192.168.0.35:8008' |
| | | - #李宇飞接口地址 |
| | | - |
| | | - VITE_API_URL = 'http://192.168.0.50:8008' |
| | | -@@ -29,4 +29,4 @@ |
| | | - #线上正式环境外包接口地址 |
| | | - |
| | | - VITE_API_URL_SOCKET = 'http://192.168.0.29:8018' |
| | | --#黄振websocket接口地址 |
| | | -\ No newline at end of file |
| | | -+#黄振websocket接口地址 |
| | | -Index: src/views/doublePrevent/dpIndex/index.vue |
| | | -IDEA additional info: |
| | | -Subsystem: com.intellij.openapi.diff.impl.patch.BaseRevisionTextPatchEP |
| | | -<+><template>\r\n <div class=\"home-container\">\r\n <div class=\"main-cont\">\r\n <div class=\"table-item\">\r\n <div class=\"item-head\">\r\n <span>告警风险事件概括</span>\r\n <div @click=\"toRiskEve\">查看更多>></div>\r\n </div>\r\n <el-table :data=\"eventData\" style=\"width: 100%\" :header-cell-style=\"{ background: '#fafafa' }\">\r\n <el-table-column prop=\"riskEventName\" label=\"风险事件名称\" show-overflow-tooltip></el-table-column>\r\n <el-table-column prop=\"riskUnitName\" label=\"风险分析单元名称\" show-overflow-tooltip></el-table-column>\r\n <el-table-column prop=\"createByUserName\" label=\"创建人\" show-overflow-tooltip></el-table-column>\r\n <el-table-column prop=\"gmtCreate\" label=\"创建时间\" show-overflow-tooltip></el-table-column>\r\n </el-table>\r\n </div>\r\n <div class=\"table-item table-item2\">\r\n <div class=\"item-head\">\r\n <span>隐患状态详情</span>\r\n <div @click=\"toRiskStatus\">查看更多>></div>\r\n </div>\r\n <el-table :data=\"riskStatusData\" style=\"width: 100%\" :header-cell-style=\"{ background: '#fafafa' }\">\r\n <el-table-column type=\"index\" label=\"序号\" width=\"60\" />\r\n<!-- <el-table-column prop=\"reportTime\" label=\"上报时间\" show-overflow-tooltip width=\"170px\"></el-table-column>-->\r\n <el-table-column prop=\"dangerCode\" label=\"隐患名称\" show-overflow-tooltip></el-table-column>\r\n <el-table-column prop=\"dangerLevel\" label=\"隐患等级\" show-overflow-tooltip>\r\n <template #default=\"scope\">\r\n <div :style=\"{color: scope.row.dangerLevel==1?'#409eff':'#ff0000'}\">\r\n {{scope.row.dangerLevel==1?'一般隐患':'重大隐患'}}\r\n </div>\r\n </template>\r\n </el-table-column>\r\n <el-table-column prop=\"reportTime\" label=\"上报时间\" show-overflow-tooltip></el-table-column>\r\n <el-table-column prop=\"dangerStatus\" label=\"隐患状态\" show-overflow-tooltip>\r\n <template #default=\"scope\">\r\n <div :style=\"{color: scope.row.dangerStatus==0 || scope.row.dangerStatus==1 ?'#67C23A':(scope.row.dangerStatus==2 || scope.row.dangerStatus==3?'#F56C6C':'#409EFF')}\">\r\n {{scope.row.dangerStatus==0?'整改中':(scope.row.dangerStatus==1?'待验收':(scope.row.dangerStatus==2?'延期整改':(scope.row.dangerStatus==3?'超期未整改':'已验收')))}}\r\n </div>\r\n </template>\r\n </el-table-column>\r\n </el-table>\r\n </div>\r\n <div class=\"table-item\">\r\n <div class=\"item-head\">\r\n <span>隐患整改情况</span>\r\n </div>\r\n <div id=\"riskFix\"></div>\r\n </div>\r\n <div class=\"table-item\">\r\n <div class=\"item-head\">\r\n <span>风险装置列表</span>\r\n <div @click=\"toRevice\">查看更多>></div>\r\n </div>\r\n <el-table class=\"deviceTable\" :data=\"deviceData\" style=\"width: 100%\" :header-cell-style=\"{ background: '#fafafa' }\">\r\n <el-table-column prop=\"produceDeviceName\" label=\"装置名称\" show-overflow-tooltip></el-table-column>\r\n <el-table-column prop=\"riskLevel\" label=\"风险等级\" show-overflow-tooltip>\r\n <template #default=\"scope\">\r\n <div :style=\"{color: scope.row.riskLevel==1?'#409EFF':(scope.row.riskLevel==2?'#67C23A':(scope.row.riskLevel==3?'#E6A23C':'#F56C6C'))}\">\r\n {{scope.row.riskLevel==1?'低风险':(scope.row.riskLevel==2?'一般风险':(scope.row.riskLevel==3?'较大风险':'重大风险'))}}\r\n </div>\r\n </template>\r\n </el-table-column>\r\n </el-table>\r\n <div class=\"deviceLevel\">\r\n <div class=\"levelItem red\">\r\n <span>0</span>\r\n <div>重大风险</div>\r\n </div>\r\n <div class=\"levelItem orange\">\r\n <span>2</span>\r\n <div>较大风险</div>\r\n </div>\r\n <div class=\"levelItem green\">\r\n <span>8</span>\r\n <div>一般风险</div>\r\n </div>\r\n <div class=\"levelItem blue\">\r\n <span>10</span>\r\n <div>低风险</div>\r\n </div>\r\n </div>\r\n </div>\r\n <div class=\"table-item\">\r\n <div class=\"item-head\">\r\n <span>隐患等级分布</span>\r\n </div>\r\n <div id=\"riskLevel\"></div>\r\n </div>\r\n </div>\r\n </div>\r\n</template>\r\n\r\n<script lang=\"ts\">\r\n import { toRefs, reactive, ref, onMounted } from 'vue';\r\n import { storeToRefs } from 'pinia';\r\n import { initBackEndControlRoutes } from '/@/router/backEnd';\r\n import { useUserInfo } from '/@/stores/userInfo';\r\n import { Session } from '/@/utils/storage';\r\n import { Edit, View, Plus, Delete, Refresh, Search, Download } from '@element-plus/icons-vue';\r\n import { ElTable } from 'element-plus';\r\n import { FormInstance, FormRules, ElMessage } from 'element-plus';\r\n import { safetyRiskEventApi } from '/@/api/doublePreventSystem/safetyRiskEvent/index.ts';\r\n import { useRouter } from 'vue-router';\r\n import {hiddenReportApi} from \"/@/api/doublePreventSystem/report\";\r\n import { productionDeviceApi } from '/@/api/doublePreventSystem/productionDevice/index.ts';\r\n import * as echarts from 'echarts/core';\r\n import {TooltipComponent, TooltipComponentOption, LegendComponent, LegendComponentOption} from 'echarts/components';\r\n import {PieChart, PieSeriesOption} from 'echarts/charts';\r\n import {LabelLayout} from 'echarts/features';\r\n import {CanvasRenderer} from 'echarts/renderers';\r\n echarts.use([TooltipComponent, LegendComponent, PieChart, CanvasRenderer, LabelLayout]);\r\n // 定义接口来定义对象的类型\r\n interface stateType {\r\n eventData: Array<any>;\r\n riskStatusData: Array<any>;\r\n deviceData: Array<any>;\r\n pageIndex: number;\r\n pageSize: number;\r\n totalSize: number;\r\n departmentList: [];\r\n classGroupList: Array<classGroup>;\r\n inspectPointAllList: [];\r\n }\r\n interface type {\r\n id: number;\r\n name: string;\r\n }\r\n interface classGroup {\r\n id: number;\r\n groupName: string;\r\n }\r\n export default {\r\n name: 'workingHours',\r\n components: {},\r\n setup() {\r\n const router = useRouter();\r\n const state = reactive<stateType>({\r\n pageIndex: 1,\r\n pageSize: 5,\r\n totalSize: 0,\r\n eventData: [],\r\n riskStatusData: [],\r\n deviceData: [],\r\n departmentList: [],\r\n classGroupList: [],\r\n inspectPointAllList: []\r\n });\r\n\r\n // 页面载入时执行方法\r\n onMounted(() => {\r\n getEventRecord();\r\n getRiskStatusRecord();\r\n getDeviceRecord();\r\n initRiskFix();\r\n initRiskLevel()\r\n });\r\n\r\n // 告警列表\r\n const getEventRecord = async () => {\r\n const data = { pageSize: state.pageSize, pageIndex: state.pageIndex};\r\n let res = await safetyRiskEventApi().getSafetyRiskEventList(data)\r\n if (res.data.code === '200'){\r\n state.eventData = res.data.data\r\n } else {\r\n ElMessage({\r\n type: 'warning',\r\n message: res.data.msg\r\n });\r\n }\r\n };\r\n\r\n // 隐患状态列表\r\n const getRiskStatusRecord = async () => {\r\n const data = { pageSize: state.pageSize, pageIndex: state.pageIndex};\r\n let res = await hiddenReportApi().getHiddenReportList(data)\r\n if (res.data.code === '200'){\r\n state.riskStatusData = res.data.data\r\n } else {\r\n ElMessage({\r\n type: 'warning',\r\n message: res.data.msg\r\n });\r\n }\r\n };\r\n\r\n // 隐患状态列表\r\n const getDeviceRecord = async () => {\r\n const data = { pageSize: state.pageSize, pageIndex: state.pageIndex};\r\n let res = await productionDeviceApi().getProductionDeviceList(data)\r\n if (res.data.code === '200'){\r\n state.deviceData = res.data.data\r\n } else {\r\n ElMessage({\r\n type: 'warning',\r\n message: res.data.msg\r\n });\r\n }\r\n };\r\n\r\n // 隐患整改情况\r\n const initRiskFix =()=>{\r\n var dom = document.getElementById('riskFix');\r\n var myChart = echarts.init(dom, null, {\r\n renderer: 'canvas',\r\n useDirtyRect: false\r\n });\r\n var app = {};\r\n\r\n var option;\r\n\r\n option = {\r\n tooltip: {\r\n trigger: 'item'\r\n },\r\n legend: {\r\n bottom: '10%',\r\n left: 'center'\r\n },\r\n series: [\r\n {\r\n name: 'Access From',\r\n type: 'pie',\r\n radius: ['35%', '60%'],\r\n avoidLabelOverlap: false,\r\n itemStyle: {\r\n borderRadius: 6,\r\n borderColor: '#fff',\r\n borderWidth: 2\r\n },\r\n label: {\r\n show: false,\r\n position: 'center'\r\n },\r\n emphasis: {\r\n label: {\r\n show: true,\r\n fontSize: '40',\r\n fontWeight: 'bold'\r\n }\r\n },\r\n labelLine: {\r\n show: false\r\n },\r\n data: [\r\n { value: 1048, name: '整改中' },\r\n { value: 735, name: '待验收' },\r\n { value: 580, name: '延期整改' },\r\n { value: 484, name: '超期未整改' },\r\n { value: 300, name: '已验收' }\r\n ],\r\n center: ['50%','35%']\r\n }\r\n ]\r\n };\r\n\r\n if (option && typeof option === 'object') {\r\n myChart.setOption(option);\r\n }\r\n\r\n window.addEventListener('resize', myChart.resize);\r\n }\r\n\r\n // 隐患整改情况\r\n const initRiskLevel =()=>{\r\n var dom = document.getElementById('riskLevel');\r\n var myChart = echarts.init(dom, null, {\r\n renderer: 'canvas',\r\n useDirtyRect: false\r\n });\r\n var app = {};\r\n\r\n var option;\r\n\r\n option = {\r\n tooltip: {\r\n trigger: 'item'\r\n },\r\n legend: {\r\n bottom: '10%',\r\n left: 'center'\r\n },\r\n series: [\r\n {\r\n name: 'Access From',\r\n type: 'pie',\r\n radius: ['35%', '60%'],\r\n avoidLabelOverlap: false,\r\n itemStyle: {\r\n borderRadius: 6,\r\n borderColor: '#fff',\r\n borderWidth: 2\r\n },\r\n label: {\r\n show: false,\r\n position: 'center'\r\n },\r\n emphasis: {\r\n label: {\r\n show: true,\r\n fontSize: '40',\r\n fontWeight: 'bold'\r\n }\r\n },\r\n labelLine: {\r\n show: false\r\n },\r\n data: [\r\n { value: 1048, name: '一般隐患' },\r\n { value: 235, name: '重大隐患' }\r\n ],\r\n center: ['50%','35%']\r\n }\r\n ]\r\n };\r\n\r\n if (option && typeof option === 'object') {\r\n myChart.setOption(option);\r\n }\r\n\r\n window.addEventListener('resize', myChart.resize);\r\n }\r\n\r\n const toRiskEve = ()=>{\r\n router.push({\r\n path: 'event',\r\n });\r\n }\r\n\r\n const toRiskStatus = ()=>{\r\n router.push({\r\n path: 'hiddenReport',\r\n });\r\n }\r\n\r\n const toRevice = ()=>{\r\n router.push({\r\n path: 'device',\r\n });\r\n }\r\n\r\n return {\r\n View,\r\n Edit,\r\n Delete,\r\n Refresh,\r\n Plus,\r\n router,\r\n toRiskEve,\r\n toRiskStatus,\r\n toRevice,\r\n ...toRefs(state)\r\n };\r\n }\r\n };\r\n</script>\r\n\r\n<style scoped lang=\"scss\">\r\n $homeNavLengh: 8;\r\n .home-container {\r\n /*height: calc(100vh - 144px);*/\r\n height: 100%;\r\n padding: 20px;\r\n box-sizing: border-box;\r\n overflow: hidden;\r\n .main-cont {\r\n width: 100%;\r\n height: 100%;\r\n display: grid;\r\n grid-gap: 20px;\r\n grid-template-columns: repeat(3, 1fr);\r\n grid-template-rows: repeat(2, 1fr);\r\n grid-auto-flow: row;\r\n justify-content: center;\r\n .table-item{\r\n border-radius: 8px;\r\n background: #fff;\r\n padding: 20px;\r\n\r\n .item-head{\r\n display: flex;\r\n align-items: center;\r\n justify-content: space-between;\r\n height: 30px;\r\n margin-bottom: 20px;\r\n span{\r\n font-size: 20px;\r\n color: #333;\r\n font-weight: bolder;\r\n }\r\n div{\r\n cursor: pointer;\r\n\r\n &:hover{\r\n color: #409eff;\r\n }\r\n }\r\n }\r\n #riskFix{\r\n height: calc(50vh - 80px);\r\n }\r\n #riskLevel{\r\n height: calc(50vh - 80px);\r\n }\r\n .deviceTable{\r\n height: calc((50vh - 100px) / 3 * 2);\r\n }\r\n .deviceLevel{\r\n height: calc((50vh - 100px) / 3);\r\n display: grid;\r\n grid-gap: 10px;\r\n grid-template-columns: repeat(4, 1fr);\r\n align-items: center;\r\n justify-content: space-between;\r\n\r\n .levelItem{\r\n display: flex;\r\n margin-top: 20px;\r\n flex-direction: column;\r\n align-items: center;\r\n padding: 15px;\r\n box-sizing: border-box;\r\n border-radius: 8px;\r\n color: #fff;\r\n font-size: 16px;\r\n\r\n span{\r\n margin-bottom: 10px;\r\n font-size: 24px;\r\n font-weight: bolder;\r\n }\r\n }\r\n .red{\r\n background: #F56C6C;\r\n }\r\n .orange{\r\n background: #E6A23C;\r\n }\r\n .green{\r\n background: #67C23A;\r\n }\r\n .blue{\r\n background: #409EFF;\r\n }\r\n }\r\n }\r\n .table-item2{\r\n grid-column-start: 2;\r\n grid-column-end: 4;\r\n }\r\n }\r\n .el-row {\r\n display: flex;\r\n align-items: center;\r\n margin-bottom: 20px;\r\n &:last-child {\r\n margin-bottom: 0;\r\n }\r\n .grid-content {\r\n align-items: center;\r\n min-height: 36px;\r\n }\r\n\r\n .topInfo {\r\n display: flex;\r\n align-items: center;\r\n font-size: 16px;\r\n font-weight: bold;\r\n\r\n & > div {\r\n white-space: nowrap;\r\n margin-right: 20px;\r\n }\r\n }\r\n }\r\n }\r\n .el-input {\r\n width: 100% !important;\r\n }\r\n .el-date-editor::v-deep {\r\n width: 100%;\r\n }\r\n .el-select {\r\n width: 100%;\r\n }\r\n</style> |
| | | -Subsystem: com.intellij.openapi.diff.impl.patch.CharsetEP |
| | | -<+>UTF-8 |
| | | -=================================================================== |
| | | -diff --git a/src/views/doublePrevent/dpIndex/index.vue b/src/views/doublePrevent/dpIndex/index.vue |
| | | ---- a/src/views/doublePrevent/dpIndex/index.vue (revision a1d03a0e810219f8353748f6e55699bf2e1a77a6) |
| | | -+++ b/src/views/doublePrevent/dpIndex/index.vue (date 1660564801420) |
| | | -@@ -212,14 +212,14 @@ |
| | | - trigger: 'item' |
| | | - }, |
| | | - legend: { |
| | | -- bottom: '10%', |
| | | -+ bottom: '35%', |
| | | - left: 'center' |
| | | - }, |
| | | - series: [ |
| | | - { |
| | | - name: 'Access From', |
| | | - type: 'pie', |
| | | -- radius: ['35%', '60%'], |
| | | -+ radius: ['30%', '50%'], |
| | | - avoidLabelOverlap: false, |
| | | - itemStyle: { |
| | | - borderRadius: 6, |
| | | -@@ -247,7 +247,7 @@ |
| | | - { value: 484, name: '超期未整改' }, |
| | | - { value: 300, name: '已验收' } |
| | | - ], |
| | | -- center: ['50%','35%'] |
| | | -+ center: ['50%','30%'] |
| | | - } |
| | | - ] |
| | | - }; |
| | | -@@ -275,14 +275,14 @@ |
| | | - trigger: 'item' |
| | | - }, |
| | | - legend: { |
| | | -- bottom: '10%', |
| | | -+ bottom: '35%', |
| | | - left: 'center' |
| | | - }, |
| | | - series: [ |
| | | - { |
| | | - name: 'Access From', |
| | | - type: 'pie', |
| | | -- radius: ['35%', '60%'], |
| | | -+ radius: ['30%', '50%'], |
| | | - avoidLabelOverlap: false, |
| | | - itemStyle: { |
| | | - borderRadius: 6, |
| | | -@@ -307,7 +307,7 @@ |
| | | - { value: 1048, name: '一般隐患' }, |
| | | - { value: 235, name: '重大隐患' } |
| | | - ], |
| | | -- center: ['50%','35%'] |
| | | -+ center: ['50%','30%'] |
| | | - } |
| | | - ] |
| | | - }; |
| | | -@@ -357,8 +357,7 @@ |
| | | - $homeNavLengh: 8; |
| | | - .home-container { |
| | | - /*height: calc(100vh - 144px);*/ |
| | | -- height: 100%; |
| | | -- padding: 20px; |
| | | -+ height: calc(100vh - 144px); |
| | | - box-sizing: border-box; |
| | | - overflow: hidden; |
| | | - .main-cont { |
| | | -@@ -395,16 +394,16 @@ |
| | | - } |
| | | - } |
| | | - #riskFix{ |
| | | -- height: calc(50vh - 80px); |
| | | -+ height: calc(50vh - 42px); |
| | | - } |
| | | - #riskLevel{ |
| | | -- height: calc(50vh - 80px); |
| | | -+ height: calc(50vh - 42px); |
| | | - } |
| | | - .deviceTable{ |
| | | -- height: calc((50vh - 100px) / 3 * 2); |
| | | -+ height: calc((50vh - 172px) / 3 * 2); |
| | | - } |
| | | - .deviceLevel{ |
| | | -- height: calc((50vh - 100px) / 3); |
| | | -+ height: calc((50vh - 172px) / 3); |
| | | - display: grid; |
| | | - grid-gap: 10px; |
| | | - grid-template-columns: repeat(4, 1fr); |
| | | -@@ -481,4 +480,4 @@ |
| | | - .el-select { |
| | | - width: 100%; |
| | | - } |
| | | --</style> |
| | | -\ No newline at end of file |
| | | -+</style> |
| | | -Index: src/utils/request.ts |
| | | -IDEA additional info: |
| | | -Subsystem: com.intellij.openapi.diff.impl.patch.BaseRevisionTextPatchEP |
| | | -<+>import axios from 'axios';\r\nimport { ElMessage, ElMessageBox } from 'element-plus';\r\nimport JSONbig from 'json-bigint';\r\nimport Cookies from 'js-cookie';\r\nimport {useLoginApi} from \"/@/api/login\";\r\nimport { Session, } from '/@/utils/storage';\r\n\r\n// var jsonBig = require('json-bigint')({ \"storeAsString\": true });\r\n// 配置新建一个 axios 实例\r\nconst service = axios.create({\r\n // baseURL: import.meta.env.VITE_API_URL as any,\r\n timeout: 50000,\r\n headers: { 'Content-Type': 'application/json' }\r\n});\r\n\r\nservice.interceptors.request.use(\r\n (config) => {\r\n for (let key in config.data) {\r\n if (config.data[key] == '' && config.data[key] !== 0) {\r\n config.data[key] = null;\r\n }\r\n }\r\n if (Cookies.get('token')) {\r\n (<any>config.headers).common['Authorization'] = `${Cookies.get('token')}`;\r\n (<any>config.headers).common['uid'] = `${Cookies.get('uid')}`;\r\n }\r\n return config;\r\n },\r\n (error) => {\r\n // 对请求错误做些什么\r\n return Promise.reject(error);\r\n }\r\n);\r\n\r\nservice.defaults.transformResponse = [\r\n function (data) {\r\n try {\r\n // 正常同通过return JSON.parse(data)对数据进行转换\r\n // 但是转化完成的数据可能超出安全数据长度\r\n // 因此我们定制使用第三包来转化\r\n return JSONbig.parse(data);\r\n } catch (err) {\r\n console.log(err);\r\n // 转换失败返回一个空对象\r\n return {};\r\n }\r\n }\r\n];\r\n\r\nservice.interceptors.response.use(\r\n (response) => {\r\n // 对响应数据做点什么\r\n if (response.data.code && response.data.code === 'A0213') {\r\n ElMessage.error('用户uid不存在');\r\n setTimeout(() => {\r\n Session.clear();\r\n window.location.href = '/';\r\n }, 1000);\r\n } else if (response.data.code && response.data.code === 'A0215') {\r\n ElMessage.error('token失效');\r\n // logOut;\r\n useLoginApi().signOut().then(()=>{\r\n setTimeout(() => {\r\n Session.clear();\r\n window.location.href = '/';\r\n }, 1000);\r\n })\r\n }\r\n // if(response.data.code && response.data.code !== '200'){\r\n return Promise.resolve(response);\r\n // }\r\n // Session.clear()\r\n // window.location.href = '/'\r\n // return Promise.reject(response)\r\n // const res = response.data;\r\n // debugger\r\n // if (res.code && res.code !== 0) {\r\n // \t// `token` 过期或者账号已在别处登录\r\n // \tif (res.code === 401 || res.code === 4001) {\r\n // \t\tSession.clear(); // 清除浏览器全部临时缓存\r\n // \t\twindow.location.href = '/'; // 去登录页\r\n // \t\tElMessageBox.alert('你已被登出,请重新登录', '提示', {})\r\n // \t\t\t.then(() => {})\r\n // \t\t\t.catch(() => {});\r\n // }\r\n // \treturn Promise.reject(service.interceptors.response);\r\n // } else {\r\n // \treturn response.data;\r\n // }\r\n },\r\n (error) => {\r\n // 对响应错误做点什么\r\n if (error.message.indexOf('timeout') != -1) {\r\n ElMessage.error('网络超时');\r\n setTimeout(() => {\r\n // Session.clear();\r\n window.location.href = '/';\r\n }, 1000);\r\n } else if (error.message == 'Network Error') {\r\n ElMessage.error('网络连接错误');\r\n // setTimeout(() => {\r\n // Session.clear();\r\n // window.location.href = '/';\r\n // }, 1000);\r\n } else {\r\n if (error.response.data) ElMessage.error(error.response.data.error);\r\n else ElMessage.error('接口路径找不到');\r\n }\r\n return Promise.reject(error);\r\n }\r\n);\r\n\r\nexport default service;\r\n |
| | | -Subsystem: com.intellij.openapi.diff.impl.patch.CharsetEP |
| | | -<+>UTF-8 |
| | | -=================================================================== |
| | | -diff --git a/src/utils/request.ts b/src/utils/request.ts |
| | | ---- a/src/utils/request.ts (revision a1d03a0e810219f8353748f6e55699bf2e1a77a6) |
| | | -+++ b/src/utils/request.ts (date 1660615601526) |
| | | -@@ -52,18 +52,14 @@ |
| | | - // 对响应数据做点什么 |
| | | - if (response.data.code && response.data.code === 'A0213') { |
| | | - ElMessage.error('用户uid不存在'); |
| | | -- setTimeout(() => { |
| | | - Session.clear(); |
| | | - window.location.href = '/'; |
| | | -- }, 1000); |
| | | - } else if (response.data.code && response.data.code === 'A0215') { |
| | | - ElMessage.error('token失效'); |
| | | - // logOut; |
| | | - useLoginApi().signOut().then(()=>{ |
| | | -- setTimeout(() => { |
| | | -- Session.clear(); |
| | | -- window.location.href = '/'; |
| | | -- }, 1000); |
| | | -+ Session.clear(); |
| | | -+ window.location.href = '/'; |
| | | - }) |
| | | - } |
| | | - // if(response.data.code && response.data.code !== '200'){ |
| | | -Index: src/api/specialWorkSystem/safetyAction/index.ts |
| | | -IDEA additional info: |
| | | -Subsystem: com.intellij.openapi.diff.impl.patch.CharsetEP |
| | | -<+>UTF-8 |
| | | -=================================================================== |
| | | -diff --git a/src/api/specialWorkSystem/safetyAction/index.ts b/src/api/specialWorkSystem/safetyAction/index.ts |
| | | -new file mode 100644 |
| | | ---- /dev/null (date 1660632499860) |
| | | -+++ b/src/api/specialWorkSystem/safetyAction/index.ts (date 1660632499860) |
| | | -@@ -0,0 +1,45 @@ |
| | | -+import request from '/@/utils/request'; |
| | | -+ |
| | | -+export function safetyActionApi() { |
| | | -+ return { |
| | | -+ // v1 |
| | | -+ getSafetyActionList: (data: object) => { |
| | | -+ return request({ |
| | | -+ url: import.meta.env.VITE_API_URL + `/rule/measure/page/list`, |
| | | -+ method: 'post', |
| | | -+ data: data |
| | | -+ }); |
| | | -+ }, |
| | | -+ // v1 |
| | | -+ addSafetyAction: (data: object) => { |
| | | -+ return request({ |
| | | -+ url: import.meta.env.VITE_API_URL + `/rule/measure/save`, |
| | | -+ method: 'post', |
| | | -+ data: data |
| | | -+ }); |
| | | -+ }, |
| | | -+ // v1 |
| | | -+ modSafetyAction: (data: object) => { |
| | | -+ return request({ |
| | | -+ url: import.meta.env.VITE_API_URL + `/rule/measure/mod`, |
| | | -+ method: 'post', |
| | | -+ data: data |
| | | -+ }); |
| | | -+ }, |
| | | -+ // v1 |
| | | -+ deleteSafetyAction: (data: object) => { |
| | | -+ return request({ |
| | | -+ url: import.meta.env.VITE_API_URL + `/rule/measure/delete`, |
| | | -+ method: 'post', |
| | | -+ data: data |
| | | -+ }); |
| | | -+ }, |
| | | -+ // v1 |
| | | -+ getAllSafetyActionList: () => { |
| | | -+ return request({ |
| | | -+ url: import.meta.env.VITE_API_URL + `/rule/measure/list`, |
| | | -+ method: 'post' |
| | | -+ }); |
| | | -+ } |
| | | -+ }; |
| | | -+} |
| | | -Index: src/views/specialWorkSystem/foundationSet/safetyAction/components/safetyActionDialog.vue |
| | | -IDEA additional info: |
| | | -Subsystem: com.intellij.openapi.diff.impl.patch.CharsetEP |
| | | -<+>UTF-8 |
| | | -=================================================================== |
| | | -diff --git a/src/views/specialWorkSystem/foundationSet/safetyAction/components/safetyActionDialog.vue b/src/views/specialWorkSystem/foundationSet/safetyAction/components/safetyActionDialog.vue |
| | | -new file mode 100644 |
| | | ---- /dev/null (date 1660633049658) |
| | | -+++ b/src/views/specialWorkSystem/foundationSet/safetyAction/components/safetyActionDialog.vue (date 1660633049658) |
| | | -@@ -0,0 +1,214 @@ |
| | | -+<template> |
| | | -+ <div class="system-add-menu-container"> |
| | | -+ <el-dialog :title="title" v-model="isShowApproveBasicDialog" width="600px" :close-on-click-modal="false"> |
| | | -+ <el-form :model="approveBasicForm" :rules="approveBasicFormRules" ref="approveBasicFormRef" size="default" label-width="120px"> |
| | | -+ <el-row :gutter="35"> |
| | | -+ <el-col :xs="24" :sm="24" :md="24" :lg="24" :xl="24" class="mb20"> |
| | | -+ <el-form-item label="安全措施" prop="title"> |
| | | -+ <el-input class="input-add" :disabled="!disabled" v-model.trim="approveBasicForm.title" placeholder="请输入标题名称" clearable></el-input> |
| | | -+ </el-form-item> |
| | | -+ </el-col> |
| | | -+ <el-col :xs="24" :sm="24" :md="24" :lg="24" :xl="24" class="mb20"> |
| | | -+ <el-form-item label="标准类型" prop="ruleStandType"> |
| | | -+ <el-select class="input-add" :disabled="!disabled" v-model="approveBasicForm.ruleStandType" placeholder="请选择标准类型" clearable filterable> |
| | | -+ <el-option v-for="item in ruleStandTypeList" :key="item.id" :label="item.name" :value="item.id"></el-option> |
| | | -+ </el-select> |
| | | -+ </el-form-item> |
| | | -+ </el-col> |
| | | -+ <el-col :xs="24" :sm="24" :md="24" :lg="24" :xl="24" class="mb20"> |
| | | -+ <el-form-item label="描述" prop="info"> |
| | | -+ <el-input class="input-add" :rows="3" v-model.trim="approveBasicForm.info" type="textarea" placeholder="请输入描述"></el-input> |
| | | -+ </el-form-item> |
| | | -+ </el-col> |
| | | -+ <el-col :xs="24" :sm="24" :md="24" :lg="24" :xl="24" class="mb20" v-show="personTime"> |
| | | -+ <el-form-item label="创建人" prop="location"> |
| | | -+ <el-input class="input-add" :disabled="!disabled" v-model.trim="approveBasicForm.createByUserName"></el-input> |
| | | -+ </el-form-item> |
| | | -+ </el-col> |
| | | -+ <el-col :xs="24" :sm="24" :md="24" :lg="24" :xl="24" class="mb20" v-show="personTime"> |
| | | -+ <el-form-item label="创建时间" prop="location"> |
| | | -+ <el-input class="input-add" :disabled="!disabled" v-model.trim="approveBasicForm.gmtCreate"></el-input> |
| | | -+ </el-form-item> |
| | | -+ </el-col> |
| | | -+ <el-col :xs="24" :sm="24" :md="24" :lg="24" :xl="24" class="mb20" v-show="personTime"> |
| | | -+ <el-form-item label="最后修改人" prop="location"> |
| | | -+ <el-input class="input-add" :disabled="!disabled" v-model.trim="approveBasicForm.lastEditUserName"></el-input> |
| | | -+ </el-form-item> |
| | | -+ </el-col> |
| | | -+ <el-col :xs="24" :sm="24" :md="24" :lg="24" :xl="24" class="mb20" v-show="personTime"> |
| | | -+ <el-form-item label="最后修改时间" prop="location"> |
| | | -+ <el-input class="input-add" :disabled="!disabled" v-model.trim="approveBasicForm.gmtModitify"></el-input> |
| | | -+ </el-form-item> |
| | | -+ </el-col> |
| | | -+ </el-row> |
| | | -+ </el-form> |
| | | -+ <template #footer> |
| | | -+ <span class="dialog-footer" v-show="disabled"> |
| | | -+ <el-button @click="isShowApproveBasicDialog = !isShowApproveBasicDialog" size="default">取 消</el-button> |
| | | -+ <el-button type="primary" @click="submitApproveBasic" v-throttle size="default">确 定</el-button> |
| | | -+ </span> |
| | | -+ </template> |
| | | -+ </el-dialog> |
| | | -+ </div> |
| | | -+</template> |
| | | -+ |
| | | -+<script lang="ts"> |
| | | -+interface stateType { |
| | | -+ isShowApproveBasicDialog: Boolean; |
| | | -+ disabled: Boolean; |
| | | -+ personTime: Boolean; |
| | | -+ approveBasicForm: { |
| | | -+ workType: number | null; |
| | | -+ type: number | null; |
| | | -+ correctVal: number | null; |
| | | -+ context: string | null; |
| | | -+ }; |
| | | -+ title: string; |
| | | -+ departmentList: []; |
| | | -+ ruleStandTypeList: Array<levelListState>; |
| | | -+ typeList: Array<levelListState>; |
| | | -+ typeTwoList: Array<levelListState>; |
| | | -+ approveBasicFormRules: {}; |
| | | -+} |
| | | -+interface levelListState { |
| | | -+ id: number; |
| | | -+ name: string; |
| | | -+} |
| | | -+ |
| | | -+import { reactive, toRefs, ref } from 'vue'; |
| | | -+import { approveBasicApi } from '/@/api/specialWorkSystem/approveBasic'; |
| | | -+import { ElMessage } from 'element-plus'; |
| | | -+export default { |
| | | -+ name: 'approveBasicDialog', |
| | | -+ setup(props: any, context: any) { |
| | | -+ const approveBasicFormRef = ref(); |
| | | -+ const state = reactive<stateType>({ |
| | | -+ title: '', |
| | | -+ disabled: false, |
| | | -+ personTime: false, |
| | | -+ departmentList: [], |
| | | -+ isShowApproveBasicDialog: false, |
| | | -+ ruleStandTypeList: [ |
| | | -+ { id: 1, name: '可燃气浓度' }, |
| | | -+ { id: 2, name: '氧气浓度' }, |
| | | -+ { id: 3, name: '一氧化碳浓度' }, |
| | | -+ { id: 4, name: '硫化氢浓度' }, |
| | | -+ { id: 5, name: '温度' }, |
| | | -+ { id: 6, name: '压力' }, |
| | | -+ { id: 7, name: '震动' } |
| | | -+ ], |
| | | -+ typeList: [ |
| | | -+ { id: 1, name: '大于' }, |
| | | -+ { id: 2, name: '等于' }, |
| | | -+ { id: 4, name: '大于等于' } |
| | | -+ ], |
| | | -+ typeTwoList: [ |
| | | -+ { id: 3, name: '小于' }, |
| | | -+ { id: 2, name: '等于' }, |
| | | -+ { id: 5, name: '小于等于' } |
| | | -+ ], |
| | | -+ approveBasicForm: { |
| | | -+ workType: null, |
| | | -+ type: null, |
| | | -+ correctVal: null, |
| | | -+ context: null |
| | | -+ }, |
| | | -+ approveBasicFormRules: { |
| | | -+ ruleStandType: [{ required: true, message: '请选择标准类型', trigger: 'change' }], |
| | | -+ minVal: [{ required: true, message: '请填写标最低值', trigger: 'blur' }], |
| | | -+ maxVal: [{ required: true, message: '请填写标最高值', trigger: 'blur' }], |
| | | -+ title: [{ required: true, message: '请选择风险等级', trigger: 'blur' }], |
| | | -+ info: [{ required: true, message: '请填写描述信息', trigger: 'blur' }] |
| | | -+ } |
| | | -+ }); |
| | | -+ |
| | | -+ //打开模态框 |
| | | -+ const showSafetyActionDialog = (type: string, value: object, department: []) => { |
| | | -+ state.isShowApproveBasicDialog = true; |
| | | -+ state.departmentList = department; |
| | | -+ setTimeout(() => { |
| | | -+ approveBasicFormRef.value.clearValidate(); |
| | | -+ }); |
| | | -+ if (type === '新增') { |
| | | -+ state.disabled = true; |
| | | -+ state.personTime = false; |
| | | -+ state.title = '新增审批标准'; |
| | | -+ state.approveBasicForm = { |
| | | -+ workType: null, |
| | | -+ type: null, |
| | | -+ correctVal: null, |
| | | -+ context: null |
| | | -+ }; |
| | | -+ } else if (type === '查看') { |
| | | -+ state.disabled = false; |
| | | -+ state.personTime = true; |
| | | -+ state.title = '查看审批标准'; |
| | | -+ state.approveBasicForm = JSON.parse(JSON.stringify(value)); |
| | | -+ } else { |
| | | -+ state.disabled = true; |
| | | -+ state.personTime = false; |
| | | -+ state.title = '修改审批标准'; |
| | | -+ state.approveBasicForm = JSON.parse(JSON.stringify(value)); |
| | | -+ // for (let i in state.approveBasicForm) { |
| | | -+ // state.approveBasicForm[i] = approveBasicForm[i]; |
| | | -+ // } |
| | | -+ } |
| | | -+ }; |
| | | -+ |
| | | -+ //新增修改提交 |
| | | -+ const submitApproveBasic = async () => { |
| | | -+ approveBasicFormRef.value.validate(async (valid: Boolean) => { |
| | | -+ if (valid) { |
| | | -+ if (state.title === '新增审批标准') { |
| | | -+ let res = await approveBasicApi().addApproveBasic(state.approveBasicForm); |
| | | -+ if (res.data.code === '200') { |
| | | -+ ElMessage({ |
| | | -+ type: 'success', |
| | | -+ message: '审批标准新增成功', |
| | | -+ duration: 2000 |
| | | -+ }); |
| | | -+ state.isShowApproveBasicDialog = false; |
| | | -+ context.emit('refreshApproveBasic'); |
| | | -+ } else { |
| | | -+ ElMessage({ |
| | | -+ type: 'warning', |
| | | -+ message: res.data.msg |
| | | -+ }); |
| | | -+ } |
| | | -+ } else { |
| | | -+ let res = await approveBasicApi().modApproveBasic(state.approveBasicForm); |
| | | -+ if (res.data.code === '200') { |
| | | -+ ElMessage({ |
| | | -+ type: 'success', |
| | | -+ message: '审批标准修改成功', |
| | | -+ duration: 2000 |
| | | -+ }); |
| | | -+ state.isShowApproveBasicDialog = false; |
| | | -+ context.emit('refreshApproveBasic'); |
| | | -+ } else { |
| | | -+ ElMessage({ |
| | | -+ type: 'warning', |
| | | -+ message: res.data.msg |
| | | -+ }); |
| | | -+ } |
| | | -+ } |
| | | -+ } else { |
| | | -+ ElMessage({ |
| | | -+ type: 'warning', |
| | | -+ message: '请完善基本信息' |
| | | -+ }); |
| | | -+ } |
| | | -+ }); |
| | | -+ }; |
| | | -+ |
| | | -+ return { |
| | | -+ ...toRefs(state), |
| | | -+ approveBasicFormRef, |
| | | -+ submitApproveBasic, |
| | | -+ showSafetyActionDialog |
| | | -+ }; |
| | | -+ } |
| | | -+}; |
| | | -+</script> |
| | | -+ |
| | | -+<style scoped></style> |
| | | -Index: src/views/intellectInspect/intelligentLine/index.vue |
| | | -IDEA additional info: |
| | | -Subsystem: com.intellij.openapi.diff.impl.patch.BaseRevisionTextPatchEP |
| | | -<+><template>\r\n <div class=\"container\">\r\n <div class=\"big-title\" @click=\"goBack()\">国泰新华智能巡检系统</div>\r\n <div style=\"height: 20px;font-size: 14px;line-height: 20px; color: #00ffff; margin-top: 4px\">{{ present }}</div>\r\n <div class=\"btns\">\r\n <div class=\"fullbtn\" @click=\"onScreenfullClick\">\r\n <div class=\"toFull\">\r\n <i class=\"iconfont\" :title=\"isScreenfull ? $t('message.user.title6') : $t('message.user.title5')\" :class=\"!isScreenfull ? 'icon-fullscreen' : 'icon-tuichuquanping'\"></i>\r\n </div>\r\n <div>全屏</div>\r\n </div>\r\n <div class=\"backBtn\" @click=\"goBack()\">\r\n <img src=\"../../../assets/loginPage/back-icon.png\"/>\r\n <div>退出</div>\r\n </div>\r\n </div>\r\n <div class=\"blocks\">\r\n <div>\r\n <div class=\"star-pic\">\r\n <div class=\"star-bg\"><img src=\"../../../assets/loginPage/star-bg.png\" /></div>\r\n <div class=\"star\"><img src=\"../../../assets/loginPage/device-pic.png\" /></div>\r\n </div>\r\n <div class=\"line-map\" v-if=\"dataList && dataList.length > 0\">\r\n <div class=\"line-item\" v-for=\"(item, index) in dataList\" :key=\"index\">\r\n <div class=\"picbox\">\r\n <img src=\"../../../assets/loginPage/equipment.jpg\"/>\r\n <p>\r\n RFID: <span>{{ item.rfid }}</span>\r\n </p>\r\n <p>\r\n 位置: <span>{{ item.region.toString() }}</span>\r\n </p>\r\n </div>\r\n <div class=\"area-head\">\r\n <div class=\"indicator\" :class=\"item.points.some((e) => e.reportResult == 1) ? 'somewarning' : (item.points.some((e) => e.reportResult == null) ? 'someUndone' : '')\">\r\n <div class=\"indi-dot\"></div>\r\n <!-- <div class=\"indi-pulse\"></div>-->\r\n <!-- <div class=\"indi-pulse1\"></div>-->\r\n </div>\r\n <div class=\"arrow\" v-if=\"item.points.some((e) => e.reportResult != null)\"></div>\r\n <div class=\"top-line\" :class=\"item.points.some((e) => e.reportResult !== null) ? '' : 'fadeLine'\"></div>\r\n </div>\r\n <div class=\"more-info\">\r\n <div class=\"item\" v-for=\"(t, i) in item.points\" :key=\"i\" :class=\"t.reportResult == null ? 'undone' : t.reportResult == 1 ? 'warning' : ''\">\r\n <section>\r\n <div class=\"dot\"></div>\r\n <div class=\"pulse\"></div>\r\n <div class=\"pulse1\"></div>\r\n </section>\r\n <div :class=\"t.reportResult == null ? 'noBorder' : t.reportResult == 1 ? 'redBorder' : ''\">\r\n <div>\r\n <span>巡检点:</span><span>{{ t.point }}</span>\r\n </div>\r\n <div>\r\n <span>巡检状态:</span><span>{{ t.pointCheckStatus == 1 ? '未完成' : '已完成' }}</span>\r\n </div>\r\n <div v-if=\"t.reportResult != null\">\r\n <span>巡检指标:</span><span>{{ t.quotaContent }}</span>\r\n </div>\r\n <div v-if=\"(t.dataReportType == 2 || t.dataReportType == 3) && t.secondReferenceResult\">\r\n <span>参数:</span><span class=\"target\">{{ t.secondReferenceResult + t.quotaUnit }}</span>\r\n </div>\r\n <div>\r\n <span>巡检结果:</span><span class=\"target\">{{ t.reportResult == null ? '--' : t.reportResult == 0 ? '正常' : '异常' }}</span>\r\n </div>\r\n </div>\r\n </div>\r\n </div>\r\n </div>\r\n <div class=\"line-item finish\">\r\n <div class=\"picbox\"></div>\r\n <div class=\"area-head\">\r\n <div class=\"finish-point\">\r\n <div>完成巡检</div>\r\n </div>\r\n </div>\r\n </div>\r\n </div>\r\n <div class=\"tip\" v-else>抱歉,暂时查询不到巡检路线...</div>\r\n </div>\r\n </div>\r\n </div>\r\n</template>\r\n\r\n<script lang=\"ts\">\r\nimport screenfull from 'screenfull';\r\nimport { lineApi } from '/@/api/intelligentLine';\r\nimport { toRefs, reactive, ref, onMounted, onUnmounted, computed } from 'vue';\r\nimport {useRoute} from 'vue-router';\r\nimport { storeToRefs } from 'pinia';\r\nimport { initBackEndControlRoutes } from '/@/router/backEnd';\r\nimport { Session } from '/@/utils/storage';\r\nimport { Edit, View, Plus, Delete, Refresh, Search, Download } from '@element-plus/icons-vue';\r\nimport { ElTable } from 'element-plus';\r\nimport { FormInstance, FormRules, ElMessage } from 'element-plus';\r\nimport { useUserInfo } from '/@/stores/userInfo';\r\n\r\n// 定义接口来定义对象的类型\r\ninterface stateType {\r\n present: string;\r\n isScreenfull: boolean;\r\n path: string;\r\n socket: any;\r\n socketData: string;\r\n data: Array<any>;\r\n id: string\r\n}\r\nexport default {\r\n name: 'intelligentLine',\r\n components: {},\r\n setup() {\r\n const userInfo = useUserInfo();\r\n const { userInfos } = storeToRefs(userInfo);\r\n const route = useRoute();\r\n const state = reactive<stateType>({\r\n present: '',\r\n isScreenfull: false,\r\n path: '',\r\n socketData: '',\r\n socket: null,\r\n data: [],\r\n id: ''\r\n });\r\n\r\n onMounted(() => {\r\n setInterval(() => {\r\n state.present = new Date().toLocaleString();\r\n }, 1000);\r\n let curId = route.query.id\r\n state.id = curId.toString()\r\n getLine(state.id)\r\n getUrl(state.id)\r\n });\r\n\r\n const dataList = computed(() => {\r\n return userInfos.value.dataList;\r\n });\r\n\r\n // 获取url\r\n\r\n const getUrl =async (id:string)=>{\r\n const res = await lineApi().getUrl();\r\n if (res.data.code === '200') {\r\n state.path = 'http://' + res.data.data.ip + ':' + res.data.data.port + '/ws/test/'\r\n if (typeof window.WebSocket === 'undefined') {\r\n alert('您的浏览器不支持socket');\r\n } else {\r\n // 实例化socket\r\n // debugger\r\n let uid = userInfos.value.uid.toString()\r\n var url = state.path + uid + '*' + id;\r\n console.log(url,'url',uid,'uid')\r\n url = url.replace('https', 'ws').replace('http', 'ws');\r\n console.log(url, '获取地址');\r\n state.socket = new window.WebSocket(url);\r\n // 监听socket连接\r\n state.socket.onopen = () => {\r\n console.log('socket连接成功');\r\n };\r\n // 监听socket错误信息\r\n state.socket.onerror = () => {\r\n console.log('socket连接错误');\r\n };\r\n // 监听socket消息\r\n state.socket.onmessage = (msg) => {\r\n if (msg.data === '连接成功') return;\r\n console.log(msg.data,'data')\r\n userInfos.value.dataList = JSON.parse(msg.data);\r\n };\r\n }\r\n } else {\r\n ElMessage({\r\n type: 'warning',\r\n message: res.data.msg\r\n });\r\n }\r\n }\r\n\r\n // const send = () => {\r\n // state.socket.send(params);\r\n // };\r\n\r\n // 接口获取数据\r\n const getLine = async (id:string) => {\r\n let res = await lineApi().getLine({ id: id });\r\n if (res.data.code === '200') {\r\n console.log(res.data.data, '获取巡检点');\r\n userInfos.value.dataList = res.data.data;\r\n } else {\r\n ElMessage({\r\n type: 'warning',\r\n message: res.data.msg\r\n });\r\n }\r\n };\r\n\r\n // 全屏\r\n const onScreenfullClick = () => {\r\n if (!screenfull.isEnabled) {\r\n ElMessage.warning('暂不不支持全屏');\r\n return false;\r\n }\r\n screenfull.toggle();\r\n screenfull.on('change', () => {\r\n if (screenfull.isFullscreen) {\r\n state.isScreenfull = true;\r\n } else {\r\n state.isScreenfull = false;\r\n }\r\n });\r\n };\r\n\r\n // 返回\r\n const goBack = () => {\r\n window.history.go(-1);\r\n };\r\n\r\n // 页面关闭处理\r\n onUnmounted(() => {\r\n // 销毁监听\r\n state.socket.onclose = () => {\r\n console.log('socket已经关闭');\r\n };\r\n });\r\n return {\r\n dataList,\r\n goBack,\r\n onScreenfullClick,\r\n ...toRefs(state)\r\n };\r\n }\r\n};\r\n// export default {\r\n// name: 'NewForm',\r\n// props: {\r\n//\r\n// },\r\n// data(){\r\n// return{\r\n// present: '',\r\n// isScreenfull: false,\r\n// path: \"http://192.168.0.29:8008/ws/test/\",\r\n// socket: null,\r\n// socketData: '',\r\n// data: []\r\n// }\r\n// },\r\n// created() {\r\n// setInterval(() => {\r\n// this.present = new Date().toLocaleString()\r\n// }, 1000)\r\n// },\r\n// mounted () {\r\n// // 初始化\r\n// this.init()\r\n// // this.getLine()\r\n// },\r\n// methods:{\r\n// goBack(){\r\n// window.history.go(-1)\r\n// },\r\n//\r\n// async getLine (){\r\n// let res = await lineApi().getLine({ id: '80647416891768832' });\r\n// if (res.data.code === '200') {\r\n// console.log(res.data.data,'获取巡检点')\r\n// this.data = res.data.data\r\n// console.log(this.data,'---')\r\n// } else {\r\n// ElMessage({\r\n// type: 'warning',\r\n// message: res.data.msg\r\n// });\r\n// }\r\n// },\r\n//\r\n// // 全屏点击时\r\n// onScreenfullClick(){\r\n// const t = this\r\n// if (!screenfull.isEnabled) {\r\n// ElMessage.warning('暂不不支持全屏');\r\n// return false;\r\n// }\r\n// screenfull.toggle();\r\n// screenfull.on('change', () => {\r\n// if (screenfull.isFullscreen) {\r\n// t.isScreenfull = true\r\n// }\r\n// else{\r\n// t.isScreenfull = false\r\n// }\r\n// });\r\n// },\r\n//\r\n// // socket获取数据\r\n// init: function () {\r\n// if(typeof(window.WebSocket) === \"undefined\"){\r\n// alert(\"您的浏览器不支持socket\")\r\n// }else{\r\n// // 实例化socket\r\n// var url = this.path + '80938081556545536'\r\n// url = url.replace(\"https\",\"ws\").replace(\"http\",\"ws\");\r\n// console.log(url,'获取地址')\r\n// this.socket = new window.WebSocket(url)\r\n// // 监听socket连接\r\n// this.socket.onopen = this.open\r\n// // 监听socket错误信息\r\n// this.socket.onerror = this.error\r\n// // 监听socket消息\r\n// this.socket.onmessage = this.getMessage\r\n// }\r\n// },\r\n// open: function () {\r\n// console.log(\"socket连接成功\")\r\n// },\r\n// error: function () {\r\n// console.log(\"连接错误\")\r\n// },\r\n// getMessage: function (msg) {\r\n// console.log(typeof msg.data,'type')\r\n// if(msg.data =='连接成功') return\r\n// this.socketData = msg.data\r\n// console.log(JSON.parse(this.socketData),'------------------',)\r\n// if(typeof JSON.parse(this.socketData) == Array){\r\n// this.data = JSON.parse(this.socketData)\r\n// console.log(this.data)\r\n// }\r\n// // console.log(msg,'msg')\r\n// // console.log(this.data,'data-------')\r\n// },\r\n// send: function () {\r\n// this.socket.send(params)\r\n// },\r\n// close: function () {\r\n// console.log(\"socket已经关闭\")\r\n// }\r\n// },\r\n// destroyed () {\r\n// // 销毁监听\r\n// this.socket.onclose = this.close\r\n// }\r\n// }\r\n</script>\r\n\r\n<!-- Add \"scoped\" attribute to limit CSS to this component only -->\r\n<style scoped lang=\"scss\">\r\n@keyframes warn {\r\n 0% {\r\n transform: scale(0.3);\r\n -webkit-transform: scale(0.3);\r\n opacity: 0;\r\n }\r\n\r\n 25% {\r\n transform: scale(0.3);\r\n -webkit-transform: scale(0.3);\r\n opacity: 0.1;\r\n }\r\n\r\n 50% {\r\n transform: scale(0.5);\r\n -webkit-transform: scale(0.5);\r\n opacity: 0.3;\r\n }\r\n\r\n 75% {\r\n transform: scale(0.8);\r\n -webkit-transform: scale(0.8);\r\n opacity: 0.6;\r\n }\r\n\r\n 100% {\r\n transform: scale(1);\r\n -webkit-transform: scale(1);\r\n opacity: 0;\r\n }\r\n}\r\n\r\n@keyframes warn1 {\r\n 0% {\r\n transform: scale(0.3);\r\n -webkit-transform: scale(0.3);\r\n opacity: 0;\r\n }\r\n\r\n 25% {\r\n transform: scale(0.3);\r\n -webkit-transform: scale(0.3);\r\n opacity: 0.1;\r\n }\r\n\r\n 50% {\r\n transform: scale(0.3);\r\n -webkit-transform: scale(0.3);\r\n opacity: 0.3;\r\n }\r\n\r\n 75% {\r\n transform: scale(0.5);\r\n -webkit-transform: scale(0.5);\r\n opacity: 0.6;\r\n }\r\n\r\n 100% {\r\n transform: scale(0.8);\r\n -webkit-transform: scale(0.8);\r\n opacity: 0;\r\n }\r\n}\r\n\r\n@keyframes circle {\r\n 0% {\r\n transform: rotate(0);\r\n -webkit-transform: rotate(0);\r\n }\r\n 100% {\r\n transform: rotate(360deg);\r\n -webkit-transform: rotate(360deg);\r\n }\r\n}\r\n@keyframes run {\r\n to {\r\n transform: translateX(calc((100vw - 180px) / 6 - 80px));\r\n }\r\n}\r\n.container {\r\n width: 100%;\r\n height: 100%;\r\n position: relative;\r\n display: flex;\r\n flex-direction: column;\r\n align-items: center;\r\n background: url('../../../assets/loginPage/map-bg.jpg') no-repeat center;\r\n background-size: 100% 100%;\r\n .big-title {\r\n height: 40px;\r\n line-height: 40px;\r\n font-size: 28px;\r\n font-weight: bold;\r\n margin: 10px 0 20px;\r\n text-align: center;\r\n color: #fff;\r\n display: flex;\r\n align-items: center;\r\n justify-content: center;\r\n }\r\n .btns {\r\n position: absolute;\r\n z-index: 99999;\r\n right: 60px;\r\n top: 40px;\r\n display: flex;\r\n align-items: center;\r\n .fullbtn {\r\n cursor: pointer;\r\n display: flex;\r\n align-items: center;\r\n margin-right: 20px;\r\n .toFull {\r\n font-weight: bolder;\r\n color: #00ffff;\r\n margin-right: 10px;\r\n }\r\n div {\r\n font-size: 16px;\r\n color: #00ffff;\r\n }\r\n }\r\n\r\n .backBtn {\r\n cursor: pointer;\r\n display: flex;\r\n align-items: center;\r\n img {\r\n width: 14px;\r\n height: 14px;\r\n margin-right: 10px;\r\n }\r\n div {\r\n font-size: 16px;\r\n color: #00ffff;\r\n }\r\n }\r\n }\r\n .blocks {\r\n width: 100%;\r\n height: calc(100% - 90px);\r\n padding: 10px 40px 35px;\r\n box-sizing: border-box;\r\n\r\n &>div{\r\n width: 100%;\r\n height: 100%;\r\n display: flex;\r\n justify-content: center;\r\n align-items: flex-start;\r\n overflow: hidden;\r\n overflow-x: auto;\r\n overflow-y: auto;\r\n }\r\n\r\n .line-map {\r\n display: flex;\r\n justify-content: center;\r\n align-items: flex-start;\r\n\r\n .line-item {\r\n width: calc((100vw - 180px) / 6);\r\n padding-left: 20px;\r\n display: flex;\r\n flex-direction: column;\r\n align-items: flex-start;\r\n margin-right: 20px;\r\n flex-wrap: nowrap;\r\n\r\n .picbox {\r\n width: 100%;\r\n height: calc((100vh - 130px) / 5);\r\n padding: 10px;\r\n margin-bottom: 40px;\r\n box-sizing: border-box;\r\n\r\n img {\r\n display: block;\r\n width: 100%;\r\n height: 100px;\r\n margin-bottom: 10px;\r\n border-radius: 4px;\r\n }\r\n p {\r\n font-size: 14px;\r\n color: rgba(255, 255, 255, 0.8);\r\n margin-top: 10px;\r\n span {\r\n color: #fff;\r\n }\r\n }\r\n }\r\n .area-head {\r\n position: relative;\r\n width: 100%;\r\n height: 80px;\r\n padding-left: 38px;\r\n border-left: 1px solid #36fcfc;\r\n\r\n .indicator {\r\n width: 36px;\r\n height: 36px;\r\n border-radius: 50%;\r\n position: absolute;\r\n border: 1px solid #00ff66;\r\n top: -18px;\r\n left: -18px;\r\n\r\n .indi-dot {\r\n position: absolute;\r\n width: 20px;\r\n height: 20px;\r\n left: 7px;\r\n top: 7px;\r\n -webkit-border-radius: 50%;\r\n -moz-border-radius: 50%;\r\n border: 1px solid #00ff66;\r\n border-radius: 50%;\r\n background-color: #00ff66;\r\n z-index: 2;\r\n }\r\n .indi-pulse {\r\n position: absolute;\r\n width: 56px;\r\n height: 56px;\r\n left: -11px;\r\n top: -11px;\r\n border: 1px solid #00ff66;\r\n -webkit-border-radius: 50%;\r\n -moz-border-radius: 50%;\r\n border-radius: 50%;\r\n z-index: 1;\r\n opacity: 0;\r\n -webkit-animation: warn 2s ease-out;\r\n -moz-animation: warn 2s ease-out;\r\n animation: warn 2s ease-out;\r\n -webkit-animation-iteration-count: infinite;\r\n -moz-animation-iteration-count: infinite;\r\n animation-iteration-count: infinite;\r\n box-shadow: 1px 1px 30px #00ff66;\r\n }\r\n .indi-pulse1 {\r\n position: absolute;\r\n width: 56px;\r\n height: 56px;\r\n left: -11px;\r\n top: -11px;\r\n border: 1px solid #3399ff;\r\n -webkit-border-radius: 50%;\r\n -moz-border-radius: 50%;\r\n border-radius: 50%;\r\n z-index: 1;\r\n opacity: 0;\r\n -webkit-animation: warn1 2s ease-out;\r\n -moz-animation: warn1 2s ease-out;\r\n animation: warn1 2s ease-out;\r\n -webkit-animation-iteration-count: infinite;\r\n -moz-animation-iteration-count: infinite;\r\n animation-iteration-count: infinite;\r\n box-shadow: 1px 1px 30px #3399ff;\r\n }\r\n }\r\n .someUndone {\r\n width: 36px;\r\n height: 36px;\r\n border-radius: 50%;\r\n position: absolute;\r\n border: 1px solid #ccc;\r\n top: -18px;\r\n left: -18px;\r\n\r\n .indi-dot {\r\n position: absolute;\r\n width: 20px;\r\n height: 20px;\r\n left: 7px;\r\n top: 7px;\r\n -webkit-border-radius: 50%;\r\n -moz-border-radius: 50%;\r\n border: 1px solid #ccc;\r\n border-radius: 50%;\r\n background-color: #ccc;\r\n z-index: 2;\r\n }\r\n }\r\n .somewarning {\r\n width: 36px;\r\n height: 36px;\r\n border-radius: 50%;\r\n position: absolute;\r\n border: 1px solid #ff0000;\r\n top: -18px;\r\n left: -18px;\r\n\r\n .indi-dot {\r\n position: absolute;\r\n width: 20px;\r\n height: 20px;\r\n left: 7px;\r\n top: 7px;\r\n -webkit-border-radius: 50%;\r\n -moz-border-radius: 50%;\r\n border: 1px solid #ff0000;\r\n border-radius: 50%;\r\n background-color: #ff0000;\r\n z-index: 2;\r\n }\r\n }\r\n .arrow {\r\n position: absolute;\r\n width: 58px;\r\n height: 20px;\r\n left: 38px;\r\n top: -10px;\r\n background: url('../../../assets/loginPage/arrow-r.png') 0 / cover no-repeat;\r\n animation: run 2s steps(4) 0s infinite;\r\n }\r\n .top-line {\r\n width: 100%;\r\n border-top: 2px solid #36fcfc;\r\n }\r\n .fadeLine {\r\n width: 100%;\r\n border-top: 1px solid rgba(54,252,252,.6);\r\n }\r\n }\r\n .fadeBorder {\r\n border-left: 1px solid #ccc;\r\n }\r\n .more-info {\r\n width: 100%;\r\n\r\n .item {\r\n width: calc((100vw - 120px) / 6);\r\n height: calc((100vh - 130px) / 5);\r\n padding: 0 50px 20px;\r\n position: relative;\r\n box-sizing: border-box;\r\n border-left: 1px solid #36fcfc;\r\n\r\n &:last-of-type {\r\n border: none;\r\n }\r\n\r\n section {\r\n width: 24px;\r\n height: 24px;\r\n border-radius: 50%;\r\n position: absolute;\r\n border: 1px solid rgba(0, 225, 255, 0.6);\r\n top: -12px;\r\n left: 10px;\r\n\r\n .dot {\r\n position: absolute;\r\n width: 12px;\r\n height: 12px;\r\n left: 5px;\r\n top: 5px;\r\n -webkit-border-radius: 50%;\r\n -moz-border-radius: 50%;\r\n border: 1px solid #0072ff;\r\n border-radius: 50%;\r\n background-color: #00e1ff;\r\n z-index: 2;\r\n }\r\n .pulse {\r\n position: absolute;\r\n width: 48px;\r\n height: 48px;\r\n left: -13px;\r\n top: -13px;\r\n border: 1px solid #00e1ff;\r\n -webkit-border-radius: 50%;\r\n -moz-border-radius: 50%;\r\n border-radius: 50%;\r\n z-index: 1;\r\n opacity: 0;\r\n -webkit-animation: warn 2s ease-out;\r\n -moz-animation: warn 2s ease-out;\r\n animation: warn 2s ease-out;\r\n -webkit-animation-iteration-count: infinite;\r\n -moz-animation-iteration-count: infinite;\r\n animation-iteration-count: infinite;\r\n box-shadow: 1px 1px 30px #00e1ff;\r\n }\r\n .pulse1 {\r\n position: absolute;\r\n width: 48px;\r\n height: 48px;\r\n left: -13px;\r\n top: -13px;\r\n border: 1px solid #00e1ff;\r\n -webkit-border-radius: 50%;\r\n -moz-border-radius: 50%;\r\n border-radius: 50%;\r\n z-index: 1;\r\n opacity: 0;\r\n -webkit-animation: warn1 2s ease-out;\r\n -moz-animation: warn1 2s ease-out;\r\n animation: warn1 2s ease-out;\r\n -webkit-animation-iteration-count: infinite;\r\n -moz-animation-iteration-count: infinite;\r\n animation-iteration-count: infinite;\r\n box-shadow: 1px 1px 30px #00e1ff;\r\n }\r\n }\r\n & > div {\r\n padding: 10px 0;\r\n transform: translateY(-14px);\r\n border-radius: 8px;\r\n background-image: linear-gradient(to right, rgba(8, 109, 209, 0.4), rgba(11, 255, 255, 0.2));\r\n border: 1px solid rgba(54, 252, 252, 1);\r\n display: flex;\r\n flex-direction: column;\r\n justify-content: center;\r\n\r\n div {\r\n margin-bottom: 5px;\r\n &:last-of-type {\r\n margin-bottom: none;\r\n }\r\n span {\r\n display: inline-block;\r\n width: 50%;\r\n font-size: 13px;\r\n color: #fff;\r\n text-align: left;\r\n\r\n &:first-of-type {\r\n text-align: right;\r\n color: rgba(255, 255, 255, 0.8);\r\n }\r\n }\r\n }\r\n }\r\n .noBorder{\r\n border: 1px solid rgba(54, 252, 252, 0.1);\r\n }\r\n .redBorder{\r\n border: 1px solid #ff0000;\r\n }\r\n p {\r\n width: 140px;\r\n height: 50px;\r\n font-size: 18px;\r\n line-height: 48px;\r\n text-align: center;\r\n color: #fff;\r\n border-radius: 8px;\r\n background-image: linear-gradient(to right, rgba(11, 255, 255, 0.2), rgba(8, 109, 209, 0.4));\r\n border: 1px solid rgba(54, 252, 252, 0.6);\r\n }\r\n }\r\n .warning {\r\n & > section {\r\n border: 1px solid #ff0000;\r\n\r\n .dot {\r\n border: 1px solid #ff0000;\r\n background: #ff0000;\r\n }\r\n .pulse {\r\n border: 1px solid #ff0000;\r\n box-shadow: 1px 1px 30px #ff0000;\r\n }\r\n .pulse1 {\r\n border: 1px solid #ff0000;\r\n box-shadow: 1px 1px 30px #ff0000;\r\n }\r\n }\r\n\r\n & > div {\r\n div {\r\n span.target {\r\n color: #ff2929;\r\n font-weight: bolder;\r\n }\r\n }\r\n }\r\n }\r\n .undone {\r\n & > section {\r\n border: 1px solid #ccc;\r\n\r\n .dot {\r\n border: 1px solid #ccc;\r\n background: #ccc;\r\n }\r\n .pulse {\r\n display: none;\r\n }\r\n .pulse1 {\r\n display: none;\r\n }\r\n }\r\n }\r\n }\r\n }\r\n .finish {\r\n .area-head {\r\n position: relative;\r\n width: 100%;\r\n height: 80px;\r\n border-left: none;\r\n .finish-point {\r\n position: absolute;\r\n width: 90px;\r\n height: 90px;\r\n border: 2px solid #0072ff;\r\n left: -30px;\r\n top: -45px;\r\n border-radius: 50%;\r\n\r\n & > div {\r\n width: 80px;\r\n height: 80px;\r\n position: absolute;\r\n left: 3px;\r\n top: 3px;\r\n background: #0072ff;\r\n border-radius: 50%;\r\n color: #fff;\r\n font-size: 16px;\r\n line-height: 80px;\r\n text-align: center;\r\n font-weight: bolder;\r\n }\r\n }\r\n }\r\n }\r\n .pic-tit {\r\n display: flex;\r\n width: calc((100vw - 120px) / 7);\r\n height: 160px;\r\n padding: 20px;\r\n transform: translate(-20px, -40%);\r\n flex-direction: column;\r\n align-items: flex-start;\r\n\r\n img {\r\n width: calc((100vw - 120px) / 7 - 40px);\r\n height: 90px;\r\n margin-bottom: 10px;\r\n border-radius: 4px;\r\n }\r\n p {\r\n font-size: 16px;\r\n color: #00ffff;\r\n font-weight: bold;\r\n }\r\n }\r\n\r\n .water {\r\n transform: none;\r\n }\r\n .start {\r\n padding: 40px 0;\r\n p {\r\n margin-top: -21px;\r\n margin-left: 20px;\r\n }\r\n span {\r\n width: 1px;\r\n height: 50px;\r\n background: #36fcfc;\r\n position: absolute;\r\n top: -10px;\r\n left: 0;\r\n }\r\n section {\r\n position: absolute;\r\n top: 30px;\r\n left: -14px;\r\n }\r\n }\r\n }\r\n .tip {\r\n width: 100%;\r\n font-size: 30px;\r\n text-align: center;\r\n margin-top: 100px;\r\n color: #fff;\r\n font-weight: bolder;\r\n }\r\n .current-task {\r\n position: absolute;\r\n width: calc((500vw - 600px) / 7);\r\n z-index: 999999;\r\n top: 0;\r\n right: 0;\r\n padding: 0 60px;\r\n display: flex;\r\n align-items: center;\r\n justify-content: space-between;\r\n\r\n .task-des {\r\n padding: 10px 20px;\r\n display: flex;\r\n align-items: center;\r\n border: 1px solid #36fcfc;\r\n\r\n .task-des-l {\r\n display: flex;\r\n flex-direction: column;\r\n align-items: center;\r\n font-size: 20px;\r\n color: #36fcfc;\r\n border-right: 1px solid #36fcfc;\r\n padding-right: 20px;\r\n img {\r\n margin-bottom: 10px;\r\n }\r\n }\r\n .task-des-r {\r\n width: calc((200vw - 240px) / 7);\r\n display: flex;\r\n flex-direction: column;\r\n align-items: center;\r\n font-size: 20px;\r\n line-height: 28px;\r\n color: #fcfc36;\r\n padding-left: 20px;\r\n }\r\n }\r\n .current-data {\r\n width: 267px;\r\n height: 138px;\r\n padding: 20px 30px;\r\n box-sizing: border-box;\r\n background: url('../../../assets/loginPage/xj-bg.png') no-repeat center;\r\n background-size: 100% 100%;\r\n\r\n .data-area {\r\n display: flex;\r\n align-items: center;\r\n border-bottom: 1px solid #040c3b;\r\n font-weight: bold;\r\n padding-bottom: 10px;\r\n box-sizing: border-box;\r\n\r\n img {\r\n width: 30px;\r\n height: 30px;\r\n margin-right: 10px;\r\n animation: circle 1s ease-in-out infinite;\r\n }\r\n\r\n div {\r\n font-size: 15px;\r\n color: rgba(4, 12, 59, 0.8);\r\n\r\n span {\r\n color: #040c3b;\r\n }\r\n }\r\n }\r\n\r\n .data-spot {\r\n display: flex;\r\n align-items: flex-start;\r\n margin-top: 10px;\r\n\r\n & > div {\r\n display: flex;\r\n flex-direction: column;\r\n align-items: center;\r\n width: 50%;\r\n font-size: 14px;\r\n color: rgba(4, 12, 59, 0.8);\r\n\r\n p {\r\n margin-top: 6px;\r\n color: #040c3b;\r\n }\r\n\r\n &:first-of-type {\r\n border-right: 1px solid #040c3b;\r\n }\r\n }\r\n }\r\n }\r\n }\r\n .star-pic {\r\n position: absolute;\r\n width: calc((100vw - 120px) / 7);\r\n height: calc((100vw - 120px) / 7);\r\n z-index: 999999999;\r\n bottom: 40px;\r\n right: 40px;\r\n padding: 20px;\r\n\r\n .star-bg {\r\n position: inherit;\r\n width: 100%;\r\n height: 100%;\r\n left: 0;\r\n top: 0;\r\n img {\r\n width: 100%;\r\n height: auto;\r\n animation: circle 30s linear infinite;\r\n }\r\n }\r\n\r\n .star {\r\n position: inherit;\r\n width: 100%;\r\n height: 100%;\r\n left: 0;\r\n top: 0;\r\n img {\r\n width: 100%;\r\n height: auto;\r\n }\r\n }\r\n }\r\n }\r\n}\r\n</style>\r\n |
| | | -Subsystem: com.intellij.openapi.diff.impl.patch.CharsetEP |
| | | -<+>UTF-8 |
| | | -=================================================================== |
| | | -diff --git a/src/views/intellectInspect/intelligentLine/index.vue b/src/views/intellectInspect/intelligentLine/index.vue |
| | | ---- a/src/views/intellectInspect/intelligentLine/index.vue (revision a1d03a0e810219f8353748f6e55699bf2e1a77a6) |
| | | -+++ b/src/views/intellectInspect/intelligentLine/index.vue (date 1660566611603) |
| | | -@@ -85,7 +85,7 @@ |
| | | - <script lang="ts"> |
| | | - import screenfull from 'screenfull'; |
| | | - import { lineApi } from '/@/api/intelligentLine'; |
| | | --import { toRefs, reactive, ref, onMounted, onUnmounted, computed } from 'vue'; |
| | | -+import {toRefs, reactive, ref, onMounted, onUnmounted, computed, nextTick} from 'vue'; |
| | | - import {useRoute} from 'vue-router'; |
| | | - import { storeToRefs } from 'pinia'; |
| | | - import { initBackEndControlRoutes } from '/@/router/backEnd'; |
| | | -@@ -218,9 +218,11 @@ |
| | | - // 页面关闭处理 |
| | | - onUnmounted(() => { |
| | | - // 销毁监听 |
| | | -- state.socket.onclose = () => { |
| | | -- console.log('socket已经关闭'); |
| | | -- }; |
| | | -+ nextTick(()=>{ |
| | | -+ state.socket.onclose = () => { |
| | | -+ console.log('socket已经关闭'); |
| | | -+ }; |
| | | -+ }) |
| | | - }); |
| | | - return { |
| | | - dataList, |
| | | -Index: src/views/specialWorkSystem/foundationSet/safetyAction/index.vue |
| | | -IDEA additional info: |
| | | -Subsystem: com.intellij.openapi.diff.impl.patch.CharsetEP |
| | | -<+>UTF-8 |
| | | -=================================================================== |
| | | -diff --git a/src/views/specialWorkSystem/foundationSet/safetyAction/index.vue b/src/views/specialWorkSystem/foundationSet/safetyAction/index.vue |
| | | -new file mode 100644 |
| | | ---- /dev/null (date 1660632779996) |
| | | -+++ b/src/views/specialWorkSystem/foundationSet/safetyAction/index.vue (date 1660632779996) |
| | | -@@ -0,0 +1,436 @@ |
| | | -+<template> |
| | | -+ <div class="home-container"> |
| | | -+ <div style="height: 100%"> |
| | | -+ <el-row class="homeCard"> |
| | | -+ <div class="basic-line"> |
| | | -+ <span>任务类型:</span> |
| | | -+ <el-select v-model="tableData.params.workType" clearable filterable class="input-box" placeholder="任务类型"> |
| | | -+ <!-- <el-option v-for="item in workTypeList" :key="item.id" :label="item.name" :value="item.id"></el-option>--> |
| | | -+ </el-select> |
| | | -+ </div> |
| | | -+ <div class="basic-line"> |
| | | -+ <span>执行班组:</span> |
| | | -+ <el-select v-model="tableData.params.execClassgroupId" clearable filterable class="input-box" placeholder="执行班组"> </el-select> |
| | | -+ </div> |
| | | -+ <div style="padding-bottom: 10px"> |
| | | -+ <el-button type="primary" @click="initSafetyAction">查询</el-button> |
| | | -+ <el-button plain @click="reset">重置</el-button> |
| | | -+ </div> |
| | | -+ </el-row> |
| | | -+ <div class="homeCard"> |
| | | -+ <div class="main-card"> |
| | | -+ <el-row class="cardTop"> |
| | | -+ <el-col :span="12" class="mainCardBtn"> |
| | | -+ <el-button type="primary" :icon="Plus" size="default" @click="openSafetyActionDialog('新增', {})">新建</el-button> |
| | | -+ <!-- <el-button type="danger" :icon="Delete" size="default" plain>删除</el-button>--> |
| | | -+ </el-col> |
| | | -+ <el-button type="primary" :icon="Refresh" size="default" /> |
| | | -+ </el-row> |
| | | -+ <el-table ref="multipleTableRef" :data="tableData.safetyActionData" style="width: 100%" height="calc(100% - 100px)" :header-cell-style="{ background: '#fafafa' }" @selection-change="handleSelectionChange"> |
| | | -+ <el-table-column type="selection" width="55" /> |
| | | -+ <el-table-column property="title" label="标题" /> |
| | | -+ <el-table-column property="ruleStandType" label="标准类型"> |
| | | -+ <template #default="scope"> |
| | | -+ <span> |
| | | -+ {{ parseNumber(scope.row.ruleStandType, '标准类型') }} |
| | | -+ </span> |
| | | -+ </template> |
| | | -+ </el-table-column> |
| | | -+ <el-table-column property="minVal" label="最低值"> |
| | | -+ <template #default="scope"> |
| | | -+ <span> |
| | | -+ {{ parseNumber(scope.row.minValMatchPattern, '最低值') }} |
| | | -+ </span> |
| | | -+ <span> |
| | | -+ {{ scope.row.minVal }} |
| | | -+ </span> |
| | | -+ </template> |
| | | -+ </el-table-column> |
| | | -+ <el-table-column property="maxVal" label="最高值"> |
| | | -+ <template #default="scope"> |
| | | -+ <span> |
| | | -+ {{ parseNumber(scope.row.maxValMatchPattern, '最高值') }} |
| | | -+ </span> |
| | | -+ <span> |
| | | -+ {{ scope.row.maxVal }} |
| | | -+ </span> |
| | | -+ </template> |
| | | -+ </el-table-column> |
| | | -+ <el-table-column property="info" label="描述" /> |
| | | -+ <el-table-column prop="createUserName" label="创建人" show-overflow-tooltip></el-table-column> |
| | | -+ <el-table-column prop="gmtCreate" label="创建时间" show-overflow-tooltip></el-table-column> |
| | | -+ <el-table-column prop="lastEditUserName" label="最后修改人" show-overflow-tooltip></el-table-column> |
| | | -+ <el-table-column prop="gmtModitify" label="最后修改时间" show-overflow-tooltip></el-table-column> |
| | | -+ <el-table-column property="status" label="状态" width="60" /> |
| | | -+ <el-table-column fixed="right" label="操作" align="center" width="300"> |
| | | -+ <template #default="scope"> |
| | | -+ <el-button link type="primary" size="small" :icon="View" @click="openSafetyActionDialog('查看', scope.row)">查看</el-button> |
| | | -+ <el-button link type="primary" size="small" :icon="Edit" @click="openSafetyActionDialog('修改', scope.row)">修改</el-button> |
| | | -+ <el-button link type="danger" size="small" :icon="Delete" @click="deleteSafetyAction(scope.row)">删除</el-button> |
| | | -+ </template> |
| | | -+ </el-table-column> |
| | | -+ </el-table> |
| | | -+ <br /> |
| | | -+ <el-pagination @size-change="onHandleSizeChange" @current-change="onHandleCurrentChange" :pager-count="5" :page-sizes="[10, 20, 30]" v-model:current-page="tableData.params.pageIndex" background v-model:page-size="tableData.params.pageSize" layout="total, sizes, prev, pager, next, jumper" :total="tableData.total" class="page-position"> </el-pagination> |
| | | -+ </div> |
| | | -+ </div> |
| | | -+ </div> |
| | | -+ <safety-action-dialog ref="safetyActionDialogRef" @refreshSafetyAction="initSafetyAction"></safety-action-dialog> |
| | | -+ </div> |
| | | -+</template> |
| | | -+ |
| | | -+<script lang="ts"> |
| | | -+import { toRefs, reactive, ref, onMounted } from 'vue'; |
| | | -+import { Edit, View, Plus, Delete, Refresh, Search, Download } from '@element-plus/icons-vue'; |
| | | -+import { ElTable, ElMessage, ElMessageBox } from 'element-plus'; |
| | | -+import { safetyActionApi } from '/@/api/specialWorkSystem/safetyAction/index.ts'; |
| | | -+import { departmentApi } from '/@/api/systemManage/department'; |
| | | -+import safetyActionDialog from '/@/views/specialWorkSystem/foundationSet/safetyAction/components/safetyActionDialog.vue'; |
| | | -+let global: any = { |
| | | -+ homeChartOne: null, |
| | | -+ homeChartTwo: null, |
| | | -+ homeCharThree: null, |
| | | -+ dispose: [null, '', undefined] |
| | | -+}; |
| | | -+ |
| | | -+interface stateType { |
| | | -+ tableData: { |
| | | -+ safetyActionData: []; |
| | | -+ total: number; |
| | | -+ loading: boolean; |
| | | -+ params: { |
| | | -+ pageIndex: number | null; |
| | | -+ pageSize: number | null; |
| | | -+ searchParams: { |
| | | -+ workType: number | null; |
| | | -+ type: number | null; |
| | | -+ context: string | null; |
| | | -+ }; |
| | | -+ }; |
| | | -+ }; |
| | | -+ ruleStandTypeList: Array<type>; |
| | | -+ typeList: Array<type>; |
| | | -+ typeTwoList: Array<type>; |
| | | -+ deleteList: { |
| | | -+ ids: Array<number>; |
| | | -+ }; |
| | | -+} |
| | | -+interface type { |
| | | -+ id: number; |
| | | -+ name: string; |
| | | -+} |
| | | -+interface ruleType { |
| | | -+ ruleStandId: number; |
| | | -+} |
| | | -+export default { |
| | | -+ name: 'index', |
| | | -+ components: { safetyActionDialog }, |
| | | -+ setup() { |
| | | -+ const safetyActionDialogRef = ref(); |
| | | -+ const state = reactive<stateType>({ |
| | | -+ tableData: { |
| | | -+ safetyActionData: [], |
| | | -+ total: 0, |
| | | -+ loading: false, |
| | | -+ params: { |
| | | -+ pageIndex: 1, |
| | | -+ pageSize: 10, |
| | | -+ searchParams: { |
| | | -+ workType: null, |
| | | -+ type: null, |
| | | -+ context: null |
| | | -+ } |
| | | -+ } |
| | | -+ }, |
| | | -+ ruleStandTypeList: [ |
| | | -+ { id: 1, name: '可燃气浓度' }, |
| | | -+ { id: 2, name: '氧气浓度' }, |
| | | -+ { id: 3, name: '一氧化碳浓度' }, |
| | | -+ { id: 4, name: '硫化氢浓度' }, |
| | | -+ { id: 5, name: '温度' }, |
| | | -+ { id: 6, name: '压力' }, |
| | | -+ { id: 7, name: '震动' } |
| | | -+ ], |
| | | -+ typeList: [ |
| | | -+ { id: 1, name: '大于' }, |
| | | -+ { id: 2, name: '等于' }, |
| | | -+ { id: 4, name: '大于等于' } |
| | | -+ ], |
| | | -+ typeTwoList: [ |
| | | -+ { id: 3, name: '小于' }, |
| | | -+ { id: 2, name: '等于' }, |
| | | -+ { id: 5, name: '小于等于' } |
| | | -+ ], |
| | | -+ deleteList: { |
| | | -+ ids: [] |
| | | -+ } |
| | | -+ }); |
| | | -+ |
| | | -+ //获取巡检任务数据 |
| | | -+ const initSafetyAction = async () => { |
| | | -+ let res = await safetyActionApi().getSafetyActionList(state.tableData.params); |
| | | -+ if (res.data.code === '200') { |
| | | -+ state.tableData.safetyActionData = res.data.data; |
| | | -+ state.tableData.total = res.data.total; |
| | | -+ } else { |
| | | -+ ElMessage({ |
| | | -+ type: 'warning', |
| | | -+ message: res.data.msg |
| | | -+ }); |
| | | -+ } |
| | | -+ }; |
| | | -+ |
| | | -+ // //获取部门 |
| | | -+ // const getDepartmentData = async () => { |
| | | -+ // let res = await departmentApi().getDepartmentList(); |
| | | -+ // if (res.data.code === '200') { |
| | | -+ // state.departmentList = res.data.data; |
| | | -+ // } else { |
| | | -+ // ElMessage({ |
| | | -+ // type: 'warning', |
| | | -+ // message: res.data.msg |
| | | -+ // }); |
| | | -+ // } |
| | | -+ // }; |
| | | -+ |
| | | -+ // 删除 |
| | | -+ const deleteSafetyAction = (row: any) => { |
| | | -+ ElMessageBox.confirm(`此操作将永久删除该任务:“${row.title}”,是否继续?`, '提示', { |
| | | -+ confirmButtonText: '确认', |
| | | -+ cancelButtonText: '取消', |
| | | -+ type: 'warning' |
| | | -+ }) |
| | | -+ .then(async () => { |
| | | -+ let res = await safetyActionApi().deleteSafetyAction(state.deleteList); |
| | | -+ if (res.data.code === '200') { |
| | | -+ ElMessage({ |
| | | -+ type: 'success', |
| | | -+ duration: 2000, |
| | | -+ message: '删除成功' |
| | | -+ }); |
| | | -+ await initSafetyAction(); |
| | | -+ } else { |
| | | -+ ElMessage({ |
| | | -+ type: 'warning', |
| | | -+ message: res.data.msg |
| | | -+ }); |
| | | -+ } |
| | | -+ }) |
| | | -+ .catch(() => {}); |
| | | -+ }; |
| | | -+ |
| | | -+ const handleSelectionChange = (val: Array<ruleType>) => { |
| | | -+ state.deleteList.ids = val.map((item) => { |
| | | -+ return item.ruleStandId; |
| | | -+ }); |
| | | -+ }; |
| | | -+ |
| | | -+ const openSafetyActionDialog = (type: string, value: {}) => { |
| | | -+ safetyActionDialogRef.value.showSafetyActionDialog(type, value); |
| | | -+ }; |
| | | -+ |
| | | -+ const parseNumber = (value: number, type: string) => { |
| | | -+ if (type === '标准类型') { |
| | | -+ return state.ruleStandTypeList.find((item) => item.id === value)?.name; |
| | | -+ } else if (type === '最高值') { |
| | | -+ return state.typeTwoList.find((item) => item.id == value)?.name; |
| | | -+ } else { |
| | | -+ return state.typeList.find((item) => item.id == value)?.name; |
| | | -+ } |
| | | -+ }; |
| | | -+ |
| | | -+ // 分页改变 |
| | | -+ const onHandleSizeChange = (val: number) => { |
| | | -+ state.tableData.params.pageSize = val; |
| | | -+ initSafetyAction(); |
| | | -+ }; |
| | | -+ // 分页改变 |
| | | -+ const onHandleCurrentChange = (val: number) => { |
| | | -+ state.tableData.params.pageIndex = val; |
| | | -+ initSafetyAction(); |
| | | -+ }; |
| | | -+ |
| | | -+ const reset = () => { |
| | | -+ state.tableData.params = { |
| | | -+ pageIndex: 1, |
| | | -+ pageSize: 10, |
| | | -+ searchParams: { |
| | | -+ workType: null, |
| | | -+ type: null, |
| | | -+ context: null |
| | | -+ } |
| | | -+ }; |
| | | -+ }; |
| | | -+ |
| | | -+ // 页面加载时 |
| | | -+ onMounted(() => { |
| | | -+ initSafetyAction(); |
| | | -+ }); |
| | | -+ |
| | | -+ return { |
| | | -+ View, |
| | | -+ Edit, |
| | | -+ Delete, |
| | | -+ Refresh, |
| | | -+ Plus, |
| | | -+ reset, |
| | | -+ parseNumber, |
| | | -+ handleSelectionChange, |
| | | -+ deleteSafetyAction, |
| | | -+ initSafetyAction, |
| | | -+ onHandleSizeChange, |
| | | -+ onHandleCurrentChange, |
| | | -+ safetyActionDialogRef, |
| | | -+ openSafetyActionDialog, |
| | | -+ ...toRefs(state) |
| | | -+ }; |
| | | -+ } |
| | | -+}; |
| | | -+</script> |
| | | -+ |
| | | -+<style scoped lang="scss"> |
| | | -+$homeNavLengh: 8; |
| | | -+.home-container { |
| | | -+ height: calc(100vh - 114px); |
| | | -+ box-sizing: border-box; |
| | | -+ overflow: hidden; |
| | | -+ .homeCard { |
| | | -+ width: 100%; |
| | | -+ padding: 20px; |
| | | -+ box-sizing: border-box; |
| | | -+ background: #fff; |
| | | -+ border-radius: 4px; |
| | | -+ |
| | | -+ .main-card { |
| | | -+ width: 100%; |
| | | -+ height: 100%; |
| | | -+ .cardTop { |
| | | -+ display: flex; |
| | | -+ align-items: center; |
| | | -+ justify-content: space-between; |
| | | -+ margin-bottom: 20px; |
| | | -+ .mainCardBtn { |
| | | -+ margin: 0; |
| | | -+ } |
| | | -+ } |
| | | -+ .pageBtn { |
| | | -+ height: 60px; |
| | | -+ display: flex; |
| | | -+ align-items: center; |
| | | -+ justify-content: right; |
| | | -+ |
| | | -+ .demo-pagination-block + .demo-pagination-block { |
| | | -+ margin-top: 10px; |
| | | -+ } |
| | | -+ .demo-pagination-block .demonstration { |
| | | -+ margin-bottom: 16px; |
| | | -+ } |
| | | -+ } |
| | | -+ } |
| | | -+ &:last-of-type { |
| | | -+ height: calc(100% - 100px); |
| | | -+ } |
| | | -+ } |
| | | -+ .el-row { |
| | | -+ display: flex; |
| | | -+ align-items: center; |
| | | -+ margin-bottom: 20px; |
| | | -+ &:last-child { |
| | | -+ margin-bottom: 0; |
| | | -+ } |
| | | -+ .grid-content { |
| | | -+ align-items: center; |
| | | -+ min-height: 36px; |
| | | -+ } |
| | | -+ |
| | | -+ .topInfo { |
| | | -+ display: flex; |
| | | -+ align-items: center; |
| | | -+ font-size: 16px; |
| | | -+ font-weight: bold; |
| | | -+ |
| | | -+ & > div { |
| | | -+ white-space: nowrap; |
| | | -+ margin-right: 20px; |
| | | -+ } |
| | | -+ } |
| | | -+ } |
| | | -+} |
| | | -+.stepItem { |
| | | -+ width: 100%; |
| | | -+ display: flex; |
| | | -+ align-items: flex-start; |
| | | -+ margin-bottom: 30px; |
| | | -+ margin-left: 30px; |
| | | -+ padding-bottom: 30px; |
| | | -+ border-left: 2px solid #ccc; |
| | | -+ &:first-of-type { |
| | | -+ margin-top: 30px; |
| | | -+ } |
| | | -+ &:last-of-type { |
| | | -+ margin-bottom: 0; |
| | | -+ border-left: none; |
| | | -+ } |
| | | -+ .stepNum { |
| | | -+ width: 30px; |
| | | -+ height: 30px; |
| | | -+ border-radius: 15px; |
| | | -+ box-sizing: border-box; |
| | | -+ color: #333; |
| | | -+ border: 1px solid #999; |
| | | -+ line-height: 28px; |
| | | -+ text-align: center; |
| | | -+ margin-right: 10px; |
| | | -+ margin-left: -16px; |
| | | -+ margin-top: -30px; |
| | | -+ } |
| | | -+ .stepCard { |
| | | -+ width: 100%; |
| | | -+ margin-top: -30px; |
| | | -+ |
| | | -+ .box-card { |
| | | -+ width: 100%; |
| | | -+ &:deep(.el-card__header) { |
| | | -+ padding: 10px 15px; |
| | | -+ } |
| | | -+ .card-header { |
| | | -+ width: 100%; |
| | | -+ display: flex; |
| | | -+ justify-content: space-between; |
| | | -+ align-items: center; |
| | | -+ & > div:first-of-type { |
| | | -+ margin-right: 80px; |
| | | -+ font-size: 18px; |
| | | -+ font-weight: bold; |
| | | -+ } |
| | | -+ } |
| | | -+ } |
| | | -+ } |
| | | -+ &:hover .card-header { |
| | | -+ color: #0098f5; |
| | | -+ } |
| | | -+ &:hover .stepNum { |
| | | -+ border: 2px solid #0098f5; |
| | | -+ color: #0098f5; |
| | | -+ } |
| | | -+} |
| | | -+.el-input { |
| | | -+ width: 100% !important; |
| | | -+} |
| | | -+:deep(.el-date-editor) { |
| | | -+ width: 100%; |
| | | -+} |
| | | -+.el-select { |
| | | -+ width: 100%; |
| | | -+} |
| | | -+:deep(.el-textarea.is-disabled .el-textarea__inner) { |
| | | -+ background-color: var(--el-card-bg-color); |
| | | -+ color: var(--el-input-text-color, var(--el-text-color-regular)); |
| | | -+} |
| | | -+:deep(.el-input.is-disabled .el-input__inner) { |
| | | -+ color: var(--el-input-text-color, var(--el-text-color-regular)); |
| | | -+} |
| | | -+:deep(.el-input.is-disabled .el-input__wrapper) { |
| | | -+ background-color: var(--el-card-bg-color); |
| | | -+} |
| | | -+</style> |
对比新文件 |
| | |
| | | <changelist name="Uncommitted_changes_before_Update_at_2022_8_23_17_52_[Default_Changelist]" date="1661248501300" recycled="true" deleted="true"> |
| | | <option name="PATH" value="$PROJECT_DIR$/.idea/shelf/Uncommitted_changes_before_Update_at_2022_8_23_17_52_[Default_Changelist]/shelved.patch" /> |
| | | <option name="DESCRIPTION" value="Uncommitted changes before Update at 2022/8/23 17:52 [Default Changelist]" /> |
| | | </changelist> |
| | |
| | | <el-tabs class="active" v-model="activeName"> |
| | | <el-tab-pane label="巡检链" name="inspectChain"> |
| | | <el-table :data="inspectTaskForm.points" fit style="width: 100%"> |
| | | <el-table-column type="index" label="序号"/> |
| | | <el-table-column type="index" label="序号" /> |
| | | <el-table-column prop="point" label="巡检点" show-overflow-tooltip align="center"></el-table-column> |
| | | <el-table-column prop="region" label="所属设备" show-overflow-tooltip align="center"></el-table-column> |
| | | <el-table-column prop="rfid" label="RFID" show-overflow-tooltip align="center"></el-table-column> |
| | |
| | | import { inspectRecordApi } from '/@/api/intellectInspectSystem/inspectRecord'; |
| | | interface dataState { |
| | | title: string; |
| | | taskAndQuotas: [], |
| | | taskAndQuotas: []; |
| | | pointTitle: string; |
| | | activeName: string; |
| | | inspectPointConfirm: boolean; |
| | |
| | | regionUuid: string | null; |
| | | rfidId: number | null; |
| | | quotaId: number | null; |
| | | quotaUnit: number | null; |
| | | quotaUnit: string | null; |
| | | reportResult: number | null; |
| | | secondReferenceResult: number | null; |
| | | execSequence: number | null; |
| | |
| | | } |
| | | }; |
| | | |
| | | const showInspectRecordDialog = (type: string, item: { id: number; uuid: string; execUserName:string }, workTypeList: [], department: [], timeType: [], classGroupList: [], quotaList: [], inspectPointAllList: []) => { |
| | | const showInspectRecordDialog = (type: string, item: { id: number; uuid: string; execUserName: string }, workTypeList: [], department: [], timeType: [], classGroupList: [], quotaList: [], inspectPointAllList: []) => { |
| | | data.quotaList = JSON.parse(JSON.stringify(quotaList)); |
| | | data.timeList = JSON.parse(JSON.stringify(timeType)); |
| | | data.inspectPointAllList = JSON.parse(JSON.stringify(inspectPointAllList)); |
| | |
| | | data.ifShowInspectTaskDialog = true; |
| | | data.inspectPointConfirm = false; |
| | | data.title = '查看巡检记录'; |
| | | getSum(item.id) |
| | | getSum(item.id); |
| | | inspectRecordApi() |
| | | .getInspectRecordById({ id: item.id, uuid: item.uuid }) |
| | | .then((res) => { |
| | |
| | | // return row.secondReferenceResult==0?'正常':(row.reportResult==1?'异常':'无') |
| | | // } |
| | | |
| | | const getSum = async (id) =>{ |
| | | let res = await inspectRecordApi().getInspectRecordSum({id:id}); |
| | | const getSum = async (id: number) => { |
| | | let res = await inspectRecordApi().getInspectRecordSum({ id: id }); |
| | | if (res.data.code === '200') { |
| | | data.taskAndQuotas = JSON.parse(JSON.stringify(res.data.data.taskAndQuotas)) |
| | | console.log(data.taskAndQuotas,'666666666666') |
| | | data.taskAndQuotas = JSON.parse(JSON.stringify(res.data.data.taskAndQuotas)); |
| | | console.log(data.taskAndQuotas, '666666666666'); |
| | | } else { |
| | | ElMessage({ |
| | | type: 'warning', |
| | | message: res.data.msg |
| | | }); |
| | | } |
| | | } |
| | | }; |
| | | |
| | | const submitInspectPoint = async () => { |
| | | if (data.title === '新增巡检任务' && data.pointTitle === '新增巡检点') { |
| | |
| | | <el-tabs class="active" v-model="activeName"> |
| | | <el-tab-pane label="巡检链" name="inspectChain"> |
| | | <el-table :data="inspectTaskForm.points" fit style="width: 100%"> |
| | | <el-table-column type="index" label="序号"/> |
| | | <el-table-column type="index" label="序号" /> |
| | | <el-table-column prop="point" label="巡检点" show-overflow-tooltip align="center"></el-table-column> |
| | | <el-table-column prop="region" label="所属设备" show-overflow-tooltip align="center"></el-table-column> |
| | | <el-table-column prop="rfid" label="RFID" show-overflow-tooltip align="center"></el-table-column> |
| | |
| | | </template> |
| | | |
| | | <script lang="ts"> |
| | | import {reactive, toRefs, ref, defineAsyncComponent} from 'vue'; |
| | | import { reactive, toRefs, ref, defineAsyncComponent } from 'vue'; |
| | | import { RFIDApi } from '/@/api/intellectInspectSystem/RFID'; |
| | | import { ElMessage } from 'element-plus/es'; |
| | | import { inspectTaskApi } from '/@/api/intellectInspectSystem/inspectTask'; |
| | |
| | | data.ifShowInspectTaskDialog = true; |
| | | data.inspectPointConfirm = false; |
| | | data.title = '查看巡检记录'; |
| | | getSum(item.id) |
| | | inspectRecordApi() |
| | | .getInspectRecordById({ id: value.id, uuid: value.uuid }) |
| | | .then((res) => { |
| | |
| | | <el-table ref="multipleTableRef" :data="tableData.inspectRecordData" style="width: 100%" height="calc(100% - 100px)" :header-cell-style="{ background: '#fafafa' }"> |
| | | <el-table-column property="taskName" label="任务名称"> |
| | | <template #default="scope"> |
| | | <div :class="hasJump == true && scope.row.startTime.slice(0, 10) == date&&(tableData.params.taskStatus == 4 || tableData.params.taskStatus == 5)?'redTit':''"> |
| | | {{scope.row.taskName}} |
| | | <div :class="hasJump == true && scope.row.startTime.slice(0, 10) == date && (tableData.params.taskStatus == 4 || tableData.params.taskStatus == 5) ? 'redTit' : ''"> |
| | | {{ scope.row.taskName }} |
| | | </div> |
| | | </template> |
| | | </el-table-column> |
| | |
| | | <el-table-column prop="execUserName" label="执行人" show-overflow-tooltip></el-table-column> |
| | | <el-table-column property="taskStatus" label="任务状态" width="180"> |
| | | <template #default="scope"> |
| | | <el-tag :type="scope.row.resultStatus === 1? 'danger': scope.row.taskStatus === 1 ? 'info' : scope.row.taskStatus === 2 ? '' : scope.row.taskStatus === 3 ? 'success' : 'danger'"> |
| | | <el-tag :type="scope.row.resultStatus === 1 ? 'danger' : scope.row.taskStatus === 1 ? 'info' : scope.row.taskStatus === 2 ? '' : scope.row.taskStatus === 3 ? 'success' : 'danger'"> |
| | | <span> |
| | | {{ scope.row.resultStatus === 1?'已巡检存在异常':parseNumber(scope.row.taskStatus, '任务状态') }} |
| | | {{ scope.row.resultStatus === 1 ? '已巡检存在异常' : parseNumber(scope.row.taskStatus, '任务状态') }} |
| | | </span> |
| | | </el-tag> |
| | | </template> |
| | |
| | | }; |
| | | |
| | | interface stateType { |
| | | isRed:boolean; |
| | | isRed: boolean; |
| | | hasJump: boolean; |
| | | date: string; |
| | | tableData: { |
| | |
| | | validTime: string | null; |
| | | createUserId: number | null; |
| | | reportTime: string | null; |
| | | resultStatus: number | null |
| | | resultStatus: number | null; |
| | | }; |
| | | }; |
| | | workTypeList: Array<type>; |
| | |
| | | id: number; |
| | | groupName: string; |
| | | } |
| | | interface timeType {} |
| | | export default { |
| | | name: 'index', |
| | | components: { inspectRecordDialog }, |
| | |
| | | taskStatusList: [ |
| | | { id: 1, name: '待巡检' }, |
| | | { id: 2, name: '巡检中' }, |
| | | { id: 3, name: '已巡检正常'}, |
| | | { id: 3, name: '已巡检正常' }, |
| | | { id: 5, name: '已巡检存在异常' }, |
| | | { id: 4, name: '超时未完成巡检' } |
| | | ], |
| | |
| | | |
| | | //获取巡检记录数据 |
| | | const getInspectRecord = async () => { |
| | | const data = JSON.parse(JSON.stringify(state.tableData.params)) |
| | | if(state.tableData.params.taskStatus == 3){ |
| | | data.taskStatus = 3 |
| | | data.resultStatus = 0 |
| | | const data = JSON.parse(JSON.stringify(state.tableData.params)); |
| | | if (state.tableData.params.taskStatus == 3) { |
| | | data.taskStatus = 3; |
| | | data.resultStatus = 0; |
| | | } |
| | | if(state.tableData.params.taskStatus == 5){ |
| | | data.taskStatus = 3 |
| | | data.resultStatus = 1 |
| | | if (state.tableData.params.taskStatus == 5) { |
| | | data.taskStatus = 3; |
| | | data.resultStatus = 1; |
| | | } |
| | | console.log(state.tableData.params.taskStatus,data.taskStatus,'data') |
| | | console.log(state.tableData.params.taskStatus, data.taskStatus, 'data'); |
| | | let res = await inspectRecordApi().getInspectRecordList(data); |
| | | if (res.data.code === '200') { |
| | | state.tableData.inspectRecordData = JSON.parse(JSON.stringify(res.data.data.records)); |
| | |
| | | const onHandleCurrentChange = (val: number) => { |
| | | state.tableData.params.pageIndex = val; |
| | | getInspectRecord(); |
| | | state.isRed = false |
| | | state.isRed = false; |
| | | }; |
| | | // 时间格式化 |
| | | const timeForm = { |
| | | const timeForm: timeType = { |
| | | hour12: false, |
| | | year: 'numeric', |
| | | month: '2-digit', |
| | |
| | | startTime: null, |
| | | validTime: null, |
| | | createUserId: null, |
| | | resultStatus: null, |
| | | reportTime: null |
| | | }; |
| | | }; |
| | |
| | | }; |
| | | // 页面加载时 |
| | | onMounted(() => { |
| | | getDateTime() |
| | | getDateTime(); |
| | | if (route.query.id) { |
| | | state.hasJump = true |
| | | state.hasJump = true; |
| | | state.tableData.params.taskStatus = Number(route.query.id); |
| | | state.isRed = true |
| | | state.isRed = true; |
| | | getInspectRecord(); |
| | | getQuotaList(); |
| | | getDepartmentData(); |
| | | getClassGroupData(); |
| | | getInspectTaskPoint(); |
| | | }else{ |
| | | } else { |
| | | getInspectRecord(); |
| | | getQuotaList(); |
| | | getDepartmentData(); |
| | | getClassGroupData(); |
| | | getInspectTaskPoint(); |
| | | } |
| | | |
| | | }); |
| | | |
| | | return { |
| | |
| | | color: #0098f5; |
| | | } |
| | | } |
| | | .redTit{ |
| | | .redTit { |
| | | color: red; |
| | | } |
| | | .el-input { |
| | |
| | | <el-row class="cardTop"> |
| | | <el-col :span="12" class="mainCardBtn"> |
| | | <el-button type="primary" :icon="Plus" size="default" @click="openSafetyActionDialog('新增', {})">新建</el-button> |
| | | <!-- <el-button type="danger" :icon="Delete" size="default" plain>删除</el-button>--> |
| | | <el-button type="danger" :icon="Delete" size="default" @click="deleteMoreSafetyAction" plain>批量删除</el-button> |
| | | </el-col> |
| | | <el-button type="primary" :icon="Refresh" size="default" /> |
| | | </el-row> |
| | |
| | | // }; |
| | | |
| | | // 删除 |
| | | const deleteSafetyAction = (row: any) => { |
| | | const deleteMoreSafetyAction = () => { |
| | | ElMessageBox.confirm(`此操作将永久删除该措施,是否继续?`, '提示', { |
| | | confirmButtonText: '确认', |
| | | cancelButtonText: '取消', |
| | |
| | | .then(async () => { |
| | | let res = await safetyActionApi().deleteSafetyAction(state.deleteList); |
| | | if (res.data.code === '200') { |
| | | ElMessage({ |
| | | type: 'success', |
| | | duration: 2000, |
| | | message: '删除成功' |
| | | }); |
| | | await initSafetyAction(); |
| | | } else { |
| | | ElMessage({ |
| | | type: 'warning', |
| | | message: res.data.msg |
| | | }); |
| | | } |
| | | }) |
| | | .catch(() => {}); |
| | | }; |
| | | |
| | | // 删除 |
| | | const deleteSafetyAction = (row: any) => { |
| | | ElMessageBox.confirm(`此操作将永久删除该措施,是否继续?`, '提示', { |
| | | confirmButtonText: '确认', |
| | | cancelButtonText: '取消', |
| | | type: 'warning' |
| | | }) |
| | | .then(async () => { |
| | | let res = await safetyActionApi().deleteSafetyAction({ ids: [row.id] }); |
| | | if (res.data.code === '200') { |
| | | state.deleteList.ids = []; |
| | | ElMessage({ |
| | | type: 'success', |
| | | duration: 2000, |
| | |
| | | parseNumber, |
| | | handleSelectionChange, |
| | | deleteSafetyAction, |
| | | deleteMoreSafetyAction, |
| | | initSafetyAction, |
| | | onHandleSizeChange, |
| | | onHandleCurrentChange, |
| | |
| | | phone: string; |
| | | email: string; |
| | | gender: number | null; |
| | | positionId: number | null; |
| | | password: string; |
| | | expireTime: string; |
| | | status: number; |
| | |
| | | identify: '', |
| | | gender: null, // 性别 |
| | | password: '', // 账户密码 |
| | | positionId: 1, // 岗位 |
| | | expireTime: '', // 账户过期 |
| | | status: 1 // 用户状态 |
| | | }, |
| | |
| | | phone: '', |
| | | email: '', |
| | | identify: '', |
| | | positionId: 1, |
| | | gender: null, |
| | | password: '', |
| | | expireTime: '', |
| | |
| | | }; |
| | | // 页面加载时 |
| | | onMounted(() => { |
| | | let a = { name: 1, c: { name: 1 } }; |
| | | let b = Object.assign({}, a); |
| | | b.c.name = 2; |
| | | console.log(a.c.name); |
| | | initUserTableData(); |
| | | getDepartmentData(); |
| | | getRoleData(); |