| | |
| | | # 本地环境 |
| | | 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.50:8008' |
| | | #张凤接口地址 |
| | | |
| | | #VITE_API_URL = 'http://192.168.0.29:8008' |
对比新文件 |
| | |
| | | Index: src/App.vue |
| | | IDEA additional info: |
| | | Subsystem: com.intellij.openapi.diff.impl.patch.BaseRevisionTextPatchEP |
| | | <+><template>\r\n <!-- <transition name=\"fade\" mode=\"out-in\">-->\r\n <!-- <keep-alive :exclude=\"excludeList\">-->\r\n <!-- <router-view v-if=\"!$route.meta.iskeepAlive\" :key=\"$route.id\"></router-view>-->\r\n <!-- </keep-alive>-->\r\n <!-- </transition>-->\r\n <!-- <router-view v-if=\"!$route.meta.iskeepAlive\" v-slot=\"{ Component }\">-->\r\n <!-- <transition name=\"fade\" mode=\"in-out\">-->\r\n <!-- <keep-alive :exclude=\"excludeList\" :include=\"includeList\">-->\r\n <!-- <component :is=\"Component\" :key=\"$route.id\"></component>-->\r\n <!-- </keep-alive>-->\r\n <!-- </transition>-->\r\n <!-- </router-view>-->\r\n <el-config-provider :size=\"getGlobalComponentSize\" :locale=\"i18nLocale\">\r\n <router-view v-show=\"themeConfig.lockScreenTime > 1\" />\r\n <router-view v-show=\"themeConfig.lockScreenTime > 1\" />\r\n <LockScreen v-if=\"themeConfig.isLockScreen\" />\r\n <Setings ref=\"setingsRef\" v-show=\"themeConfig.lockScreenTime > 1\" />\r\n <CloseFull v-if=\"!themeConfig.isLockScreen\" />\r\n </el-config-provider>\r\n</template>\r\n\r\n<script lang=\"ts\">\r\nimport { computed, ref, getCurrentInstance, onBeforeMount, onMounted, onUnmounted, nextTick, defineComponent, watch, reactive, toRefs } from 'vue';\r\nimport { useRoute } from 'vue-router';\r\nimport { storeToRefs } from 'pinia';\r\nimport { useTagsViewRoutes } from '/@/stores/tagsViewRoutes';\r\nimport { useThemeConfig } from '/@/stores/themeConfig';\r\nimport other from '/@/utils/other';\r\nimport { Local, Session } from '/@/utils/storage';\r\nimport setIntroduction from '/@/utils/setIconfont';\r\nimport LockScreen from '/@/layout/lockScreen/index.vue';\r\nimport Setings from '/@/layout/navBars/breadcrumb/setings.vue';\r\nimport CloseFull from '/@/layout/navBars/breadcrumb/closeFull.vue';\r\nimport { initBackEndControlRoutes } from './router/backEnd';\r\n\r\nexport default {\r\n name: 'app',\r\n components: { LockScreen, Setings, CloseFull },\r\n setup() {\r\n const { proxy } = <any>getCurrentInstance();\r\n const setingsRef = ref();\r\n const route = useRoute();\r\n const stores = useTagsViewRoutes();\r\n const storesThemeConfig = useThemeConfig();\r\n const { themeConfig } = storeToRefs(storesThemeConfig);\r\n const state = reactive({\r\n i18nLocale: null,\r\n excludeList: ['a-e'],\r\n includeList: []\r\n });\r\n\r\n // 获取全局组件大小\r\n const getGlobalComponentSize = computed(() => {\r\n return other.globalComponentSize();\r\n });\r\n // 布局配置弹窗打开\r\n const openSetingsDrawer = () => {\r\n setingsRef.value.openDrawer();\r\n };\r\n // 设置初始化,防止刷新时恢复默认\r\n onBeforeMount(() => {\r\n // 设置批量第三方 icon 图标\r\n setIntroduction.cssCdn();\r\n // 设置批量第三方 js\r\n setIntroduction.jsCdn();\r\n });\r\n // 页面加载时\r\n onMounted(() => {\r\n nextTick(() => {\r\n // 监听布局配置弹窗点击打开\r\n proxy.mittBus.on('openSetingsDrawer', () => {\r\n openSetingsDrawer();\r\n });\r\n // 设置 i18n,App.vue 中的 el-config-provider\r\n proxy.mittBus.on('getI18nConfig', (locale: string) => {\r\n (state.i18nLocale as string | null) = locale;\r\n });\r\n // 获取缓存中的布局配置;\r\n if (Local.get('themeConfig')) {\r\n storesThemeConfig.setThemeConfig(themeConfig.value);\r\n // storesThemeConfig.setThemeConfig(Local.get('themeConfig'));\r\n document.documentElement.style.cssText = Local.get('themeConfigStyle');\r\n }\r\n // 获取缓存中的全屏配置\r\n if (Session.get('isTagsViewCurrenFull')) {\r\n stores.setCurrenFullscreen(Session.get('isTagsViewCurrenFull'));\r\n }\r\n });\r\n // if(!Session.get('token')) return\r\n // initBackEndControlRoutes()\r\n });\r\n // 页面销毁时,关闭监听布局配置/i18n监听\r\n onUnmounted(() => {\r\n proxy.mittBus.off('openSetingsDrawer', () => {});\r\n proxy.mittBus.off('getI18nConfig', () => {});\r\n });\r\n // 监听路由的变化,设置网站标题\r\n watch(\r\n () => route.path,\r\n () => {\r\n other.useTitle();\r\n },\r\n {\r\n deep: true\r\n }\r\n );\r\n return {\r\n themeConfig,\r\n setingsRef,\r\n getGlobalComponentSize,\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/App.vue b/src/App.vue |
| | | --- a/src/App.vue (revision 2e0110788cc8563381d4d8050b559d8f4448c6bf) |
| | | +++ b/src/App.vue (date 1660894513676) |
| | | @@ -13,7 +13,6 @@ |
| | | <!-- </router-view>--> |
| | | <el-config-provider :size="getGlobalComponentSize" :locale="i18nLocale"> |
| | | <router-view v-show="themeConfig.lockScreenTime > 1" /> |
| | | - <router-view v-show="themeConfig.lockScreenTime > 1" /> |
| | | <LockScreen v-if="themeConfig.isLockScreen" /> |
| | | <Setings ref="setingsRef" v-show="themeConfig.lockScreenTime > 1" /> |
| | | <CloseFull v-if="!themeConfig.isLockScreen" /> |
| | | Index: .env.development |
| | | IDEA additional info: |
| | | Subsystem: com.intellij.openapi.diff.impl.patch.BaseRevisionTextPatchEP |
| | | <+># 本地环境\r\nENV = 'development'\r\n\r\n#VITE_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://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\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://192.168.0.52:7021/safeplatform'\r\n#本地测试接口地址\r\n\r\n#VITE_API_URL_SOCKET = 'http://192.168.0.52:7021/safeplatform'\r\n#本地测试websocket接口地址\r\n\r\n#VITE_API_URL = 'http://192.168.0.29:7008'\r\n#黄振接口test地址\r\n\r\n#VITE_API_URL_SOCKET = 'http://192.168.0.29:16107'\r\n#黄振websocket test接口地址\r\n\r\n#VITE_API_URL_SOCKET = 'http://192.168.0.29:8018'\r\n#黄振websocket接口地址\r\n |
| | | Subsystem: com.intellij.openapi.diff.impl.patch.CharsetEP |
| | | <+>UTF-8 |
| | | =================================================================== |
| | | diff --git a/.env.development b/.env.development |
| | | --- a/.env.development (revision 2e0110788cc8563381d4d8050b559d8f4448c6bf) |
| | | +++ b/.env.development (date 1660876481738) |
| | | @@ -1,10 +1,10 @@ |
| | | # 本地环境 |
| | | 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.50:8008' |
| | | #张凤接口地址 |
| | | |
| | | #VITE_API_URL = 'http://192.168.0.29:8008' |
| | | Index: src/views/system/menu/index.vue |
| | | IDEA additional info: |
| | | Subsystem: com.intellij.openapi.diff.impl.patch.BaseRevisionTextPatchEP |
| | | <+><template>\r\n <div class=\"system-menu-container\">\r\n <el-card shadow=\"hover\">\r\n <div class=\"system-menu-search mb15\">\r\n <el-select size=\"default\" v-model=\"projectId\" placeholder=\"请选择项目名称\" style=\"max-width: 180px\" @change=\"getMenuList()\">\r\n <el-option v-for=\"item in projectList\" :key=\"item.key\" :value=\"item.id\" :label=\"item.name\"> </el-option>\r\n </el-select>\r\n <el-button size=\"default\" type=\"primary\" class=\"ml10\" @click=\"getMenuList\">\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=\"onOpenMenuDialog('新增')\">\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=\"menuTableData\" style=\"width: 100%\" row-key=\"path\" :tree-props=\"{ children: 'children', hasChildren: 'hasChildren' }\">\r\n <el-table-column label=\"菜单名称\" show-overflow-tooltip>\r\n <template #default=\"scope\">\r\n <SvgIcon :name=\"scope.row.meta.icon\" />\r\n <span class=\"ml10\">{{ scope.row.meta.title }}</span>\r\n </template>\r\n </el-table-column>\r\n <el-table-column prop=\"path\" label=\"路由路径\" show-overflow-tooltip></el-table-column>\r\n <el-table-column label=\"组件路径\" show-overflow-tooltip>\r\n <template #default=\"scope\">\r\n <span>{{ scope.row.component }}</span>\r\n </template>\r\n </el-table-column>\r\n <el-table-column label=\"权限标识\" show-overflow-tooltip>\r\n <template #default=\"scope\">\r\n <span>{{ parseRole(scope.row.meta.roles) }}</span>\r\n </template>\r\n </el-table-column>\r\n <el-table-column label=\"排序\" show-overflow-tooltip width=\"80\">\r\n <template #default=\"scope\">\r\n {{ scope.$index }}\r\n </template>\r\n </el-table-column>\r\n <el-table-column label=\"类型\" show-overflow-tooltip width=\"80\">\r\n <template #default=\"scope\">\r\n <el-tag type=\"success\" size=\"small\">{{ scope.row.xx }}菜单</el-tag>\r\n </template>\r\n </el-table-column>\r\n <el-table-column label=\"操作\" show-overflow-tooltip width=\"140\">\r\n <template #default=\"scope\">\r\n <el-button size=\"small\" text type=\"primary\" @click=\"onOpenMenuDialog('新增')\">新增</el-button>\r\n <el-button size=\"small\" text type=\"primary\" @click=\"onOpenMenuDialog('修改', scope.row)\">修改</el-button>\r\n <el-button size=\"small\" text type=\"primary\" @click=\"deleteMenu(scope.row)\">删除</el-button>\r\n </template>\r\n </el-table-column>\r\n </el-table>\r\n </el-card>\r\n <menuDialog ref=\"menuDialog\" @getMenuList=\"getMenuList\" />\r\n </div>\r\n</template>\r\n\r\n<script lang=\"ts\">\r\nimport { ref, toRefs, reactive, computed, onMounted, defineComponent } from 'vue';\r\nimport { RouteRecordRaw } from 'vue-router';\r\nimport { ElMessageBox, ElMessage } from 'element-plus';\r\nimport { storeToRefs } from 'pinia';\r\nimport { useRoutesList } from '/@/stores/routesList';\r\nimport menuDialog from '/@/views/system/menu/component/menuDialog.vue';\r\nimport { useMenuApi } from '/@/api/systemManage/menu';\r\nimport { Session } from '/@/utils/storage';\r\nimport pinia from '/@/stores';\r\nimport { dynamicRoutes } from '/@/router/route';\r\nimport { useUserInfo } from '/@/stores/userInfo';\r\nimport { initBackEndControlRoutes } from '/@/router/backEnd';\r\nimport { useRoleApi } from '/@/api/systemManage/role';\r\n\r\nexport default defineComponent({\r\n name: 'systemMenu',\r\n components: { menuDialog },\r\n filters: {\r\n parseRole: (roles: Array<string>) => {\r\n return ['1', '2'];\r\n }\r\n },\r\n setup() {\r\n const menuDialog = ref();\r\n const storesRoutesList = useRoutesList();\r\n const state = reactive({\r\n projectId: '1',\r\n menuData: [],\r\n roleList: [],\r\n menuTableData: [],\r\n projectList: [\r\n { id: '1', name: '安全基础信息系统', key: 0 },\r\n { id: '2', name: '双重预防系统', key: 1 },\r\n { id: '3', name: '特殊作业系统', key: 2 },\r\n { id: '4', name: '智能巡检系统', key: 3 },\r\n { id: '5', name: '安全风险综合预警预报平台', key: 4 },\r\n { id: '6', name: '应急管理系统', key: 5 },\r\n { id: '7', name: '目标责任管理系统', key: 6 },\r\n { id: '8', name: '事故管理系统', key: 7 },\r\n { id: '9', name: '设备综合管控系统', key: 8 },\r\n { id: '10', name: '安全知识图谱系统', key: 9 },\r\n { id: '11', name: '危险化学品全生命周期安全', key: 10 }\r\n ]\r\n });\r\n // // 获取 vuex 中的路由\r\n // const menuTableData = computed(() => {\r\n // \treturn routesList.value;\r\n // });\r\n // 打开新增菜单弹窗\r\n const onOpenMenuDialog = (type: string, value: any) => {\r\n menuDialog.value.openDialog(type, value, state.projectList, state.projectId, state.roleList);\r\n };\r\n\r\n // 删除当前行\r\n const deleteMenu = (row: any) => {\r\n ElMessageBox.confirm(`此操作将永久删除路由:${row.path}, 是否继续?`, '提示', {\r\n confirmButtonText: '删除',\r\n cancelButtonText: '取消',\r\n type: 'warning'\r\n })\r\n .then(async () => {\r\n let res = await useMenuApi().deleteMenu({ 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 getMenuList();\r\n if (Session.get('projectId') == state.projectId) await initBackEndControlRoutes();\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 const getMenuList = async () => {\r\n let res = await useMenuApi().getMenuAdmin(state.projectId);\r\n if (res.data.code === '200') {\r\n state.menuTableData = res.data.data;\r\n if (Session.get('projectId') == state.projectId) await initBackEndControlRoutes();\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 getRoleList = 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 const getProjectList = async () => {\r\n let res = await useMenuApi().getProjectList();\r\n if (res.data.code === '200') {\r\n state.menuTableData = res.data.data;\r\n if (Session.get('projectId') == state.projectId) await initBackEndControlRoutes();\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 parseRole = (roles: Array<string>) => {\r\n let role = roles.map((item) => {\r\n for (let i in state.roleList) {\r\n if (state.roleList[i].roleCode === item) {\r\n return state.roleList[i].roleName;\r\n }\r\n }\r\n });\r\n return role;\r\n };\r\n\r\n onMounted(() => {\r\n getMenuList();\r\n getRoleList();\r\n });\r\n return {\r\n parseRole,\r\n getMenuList,\r\n menuDialog,\r\n onOpenMenuDialog,\r\n deleteMenu,\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/menu/index.vue b/src/views/system/menu/index.vue |
| | | --- a/src/views/system/menu/index.vue (revision 2e0110788cc8563381d4d8050b559d8f4448c6bf) |
| | | +++ b/src/views/system/menu/index.vue (date 1660894424358) |
| | | @@ -191,6 +191,7 @@ |
| | | onMounted(() => { |
| | | getMenuList(); |
| | | getRoleList(); |
| | | + console.log(1); |
| | | }); |
| | | return { |
| | | parseRole, |
| | | 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.searchParams.ruleStandType\" clearable filterable class=\"input-box\" placeholder=\"标准类型\">\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 </div>\r\n <div class=\"basic-line\">\r\n <span>标题:</span>\r\n <el-input v-model.trim=\"tableData.params.searchParams.title\" clearable filterable class=\"input-box\" placeholder=\"标题\"> </el-input>\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' }\" @selection-change=\"handleSelectionChange\">\r\n <el-table-column type=\"selection\" width=\"55\" />\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=\"createUname\" 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=\"modifiedUname\" label=\"最后修改人\" show-overflow-tooltip></el-table-column>\r\n <el-table-column prop=\"gmtModified\" 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 @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 <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 searchParams: {\r\n ruleStandType: number | null;\r\n title: string | null;\r\n };\r\n };\r\n };\r\n ruleStandTypeList: Array<type>;\r\n typeList: Array<type>;\r\n typeTwoList: Array<type>;\r\n deleteList: {\r\n ids: Array<number>;\r\n };\r\n}\r\ninterface type {\r\n id: number;\r\n name: string;\r\n}\r\ninterface ruleType {\r\n ruleStandId: number;\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 searchParams: {\r\n ruleStandType: null,\r\n title: null\r\n }\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 deleteList: {\r\n ids: []\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(state.deleteList);\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 handleSelectionChange = (val: Array<ruleType>) => {\r\n state.deleteList.ids = val.map((item) => {\r\n return item.ruleStandId;\r\n });\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 searchParams: {\r\n ruleStandType: null,\r\n title: null\r\n }\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 handleSelectionChange,\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:deep(.el-date-editor) {\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 2e0110788cc8563381d4d8050b559d8f4448c6bf) |
| | | +++ b/src/views/specialWorkSystem/workFlow/approveBasic/index.vue (date 1660889793395) |
| | | @@ -22,7 +22,7 @@ |
| | | <el-row class="cardTop"> |
| | | <el-col :span="12" class="mainCardBtn"> |
| | | <el-button type="primary" :icon="Plus" size="default" @click="openApproveBasicDialog('新增', {})">新建</el-button> |
| | | - <!-- <el-button type="danger" :icon="Delete" size="default" plain>删除</el-button>--> |
| | | + <el-button type="danger" :icon="Delete" size="default" @click="deleteMoreApproveBasic" plain>批量删除</el-button> |
| | | </el-col> |
| | | <el-button type="primary" :icon="Refresh" size="default" /> |
| | | </el-row> |
| | | @@ -198,6 +198,33 @@ |
| | | cancelButtonText: '取消', |
| | | type: 'warning' |
| | | }) |
| | | + .then(async () => { |
| | | + let res = await approveBasicApi().deleteApproveBasic({ ids: [row.ruleStandId] }); |
| | | + if (res.data.code === '200') { |
| | | + state.deleteList.ids = []; |
| | | + ElMessage({ |
| | | + type: 'success', |
| | | + duration: 2000, |
| | | + message: '删除成功' |
| | | + }); |
| | | + await getInspectionTask(); |
| | | + } else { |
| | | + ElMessage({ |
| | | + type: 'warning', |
| | | + message: res.data.msg |
| | | + }); |
| | | + } |
| | | + }) |
| | | + .catch(() => {}); |
| | | + }; |
| | | + |
| | | + // 批量删除 |
| | | + const deleteMoreApproveBasic = (row: any) => { |
| | | + ElMessageBox.confirm(`此操作将永久删除这些标准项,是否继续?`, '提示', { |
| | | + confirmButtonText: '确认', |
| | | + cancelButtonText: '取消', |
| | | + type: 'warning' |
| | | + }) |
| | | .then(async () => { |
| | | let res = await approveBasicApi().deleteApproveBasic(state.deleteList); |
| | | if (res.data.code === '200') { |
| | | @@ -274,6 +301,7 @@ |
| | | parseNumber, |
| | | handleSelectionChange, |
| | | deleteApproveBasic, |
| | | + deleteMoreApproveBasic, |
| | | getInspectionTask, |
| | | onHandleSizeChange, |
| | | onHandleCurrentChange, |
| | | Index: src/views/specialWorkSystem/workFlow/approveRule/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.searchParams.ruleName\" 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-cascader placeholder=\"部门名称\" :options=\"departmentList\" :props=\"{ emitPath: false, checkStrictly: true, value: 'depId', label: 'depName' }\" clearable filterable class=\"input-box\" v-model=\"tableData.params.searchParams.depId\"> </el-cascader>\r\n </div>\r\n <div class=\"basic-line\">\r\n <span>作业类型:</span>\r\n <el-select v-model=\"tableData.params.searchParams.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.searchParams.workLevel\" clearable filterable class=\"input-box\" placeholder=\"作业等级\">\r\n <el-option v-for=\"item in workLevelList\" :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=\"getApproveRule\">查询</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=\"openApproveRuleDialog('新增', {})\">新建</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.approveRuleData\" style=\"width: 100%\" height=\"calc(100% - 100px)\" :header-cell-style=\"{ background: '#fafafa' }\" @selection-change=\"handleSelectionChange\">\r\n <el-table-column type=\"selection\" width=\"55\" />\r\n <el-table-column property=\"ruleName\" label=\"任务名称\" />\r\n <el-table-column property=\"workType\" label=\"作业类型\">\r\n <template #default=\"scope\">\r\n <span>\r\n {{ parseNumber(scope.row.workType, '作业类型') }}\r\n </span>\r\n </template>\r\n </el-table-column>\r\n <el-table-column property=\"workLevel\" label=\"作业等级\">\r\n <template #default=\"scope\">\r\n <span>\r\n {{ parseNumber(scope.row.workLevel, '作业等级') }}\r\n </span>\r\n </template>\r\n </el-table-column>\r\n <el-table-column prop=\"createUname\" 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=\"modifiedUname\" label=\"最后修改人\" show-overflow-tooltip></el-table-column>\r\n <el-table-column prop=\"gmtModified\" label=\"最后修改时间\" show-overflow-tooltip></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=\"openApproveRuleDialog('查看', scope.row)\">查看</el-button>\r\n <el-button link type=\"primary\" size=\"small\" :icon=\"Edit\" @click=\"openApproveRuleDialog('修改', scope.row)\">修改</el-button>\r\n <el-button link type=\"danger\" size=\"small\" :icon=\"Delete\" @click=\"deleteApproveRule(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 <approve-rule-dialog ref=\"approveRuleDialogRef\" @refreshApproveRule=\"getApproveRule\"></approve-rule-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 approveRuleDialog from '/@/views/specialWorkSystem/workFlow/approveRule/components/approveRuleDialog.vue';\r\nimport { departmentApi } from '/@/api/systemManage/department';\r\nimport { approveRuleApi } from '/@/api/specialWorkSystem/approveRule/index';\r\nimport { userApi } from '/@/api/systemManage/user';\r\n\r\ninterface stateType {\r\n tableData: {\r\n approveRuleData: [];\r\n total: number;\r\n loading: boolean;\r\n params: {\r\n pageIndex: number | null;\r\n pageSize: number | null;\r\n searchParams: {\r\n ruleName: string | null;\r\n depId: number | null;\r\n workType: number | null;\r\n workLevel: number | null;\r\n };\r\n };\r\n };\r\n workTypeList: Array<type>;\r\n departmentList: [];\r\n userList: [];\r\n workLevelList: Array<type>;\r\n deleteList: { ids: Array<deleteType> };\r\n timeType: Array<type>;\r\n}\r\ninterface deleteType {\r\n ruleId: number;\r\n}\r\n\r\ninterface type {\r\n id: number;\r\n name: string;\r\n}\r\n\r\nexport default {\r\n name: 'index',\r\n components: { approveRuleDialog },\r\n setup() {\r\n const approveRuleDialogRef = ref();\r\n const state = reactive<stateType>({\r\n tableData: {\r\n approveRuleData: [],\r\n total: 0,\r\n loading: false,\r\n params: {\r\n pageIndex: 1,\r\n pageSize: 10,\r\n searchParams: {\r\n ruleName: null,\r\n depId: null,\r\n workType: null,\r\n workLevel: null\r\n }\r\n }\r\n },\r\n workTypeList: [\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 { id: 8, name: '盲板抽堵作业' }\r\n ],\r\n workLevelList: [\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 { id: 8, name: '一级吊装作业' },\r\n { id: 9, name: '二级吊装作业' },\r\n { id: 10, name: '三级吊装作业' },\r\n { id: 11, name: '抽盲板作业' },\r\n { id: 12, name: '堵盲板作业' }\r\n ],\r\n departmentList: [],\r\n userList: [],\r\n deleteList: { ids: [] },\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 getApproveRule = async () => {\r\n let res = await approveRuleApi().getApproveRuleList(state.tableData.params);\r\n if (res.data.code === '200') {\r\n state.tableData.approveRuleData = 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 getUserData = async () => {\r\n let res = await userApi().getAllUser();\r\n if (res.data.code === '200') {\r\n state.userList = 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 deleteApproveRule = (row: any) => {\r\n ElMessageBox.confirm(`此操作将永久删除该任务:“${row.unitName}”,是否继续?`, '提示', {\r\n confirmButtonText: '确认',\r\n cancelButtonText: '取消',\r\n type: 'warning'\r\n })\r\n .then(async () => {\r\n let res = await approveRuleApi().deleteApproveRule(state.deleteList);\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 getApproveRule();\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 openApproveRuleDialog = (type: string, value: {}) => {\r\n approveRuleDialogRef.value.showApproveRuleDialog(type, value, state.departmentList, state.userList, state.workTypeList);\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.workLevelList.find((item) => item.id == value)?.name;\r\n } else {\r\n }\r\n };\r\n\r\n const handleSelectionChange = (val: Array<deleteType>) => {\r\n state.deleteList.ids = val.map((item) => {\r\n return item.ruleId;\r\n }) as [];\r\n };\r\n\r\n // 分页改变\r\n const onHandleSizeChange = (val: number) => {\r\n state.tableData.params.pageSize = val;\r\n getApproveRule();\r\n };\r\n // 分页改变\r\n const onHandleCurrentChange = (val: number) => {\r\n state.tableData.params.pageIndex = val;\r\n getApproveRule();\r\n };\r\n\r\n const reset = () => {\r\n state.tableData.params = {\r\n pageIndex: 1,\r\n pageSize: 10,\r\n searchParams: {\r\n ruleName: null,\r\n depId: null,\r\n workType: null,\r\n workLevel: null\r\n }\r\n };\r\n };\r\n\r\n // 页面加载时\r\n onMounted(() => {\r\n getApproveRule();\r\n getDepartmentData();\r\n getUserData();\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 deleteApproveRule,\r\n getApproveRule,\r\n handleSelectionChange,\r\n onHandleSizeChange,\r\n onHandleCurrentChange,\r\n approveRuleDialogRef,\r\n openApproveRuleDialog,\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/specialWorkSystem/workFlow/approveRule/index.vue b/src/views/specialWorkSystem/workFlow/approveRule/index.vue |
| | | --- a/src/views/specialWorkSystem/workFlow/approveRule/index.vue (revision 2e0110788cc8563381d4d8050b559d8f4448c6bf) |
| | | +++ b/src/views/specialWorkSystem/workFlow/approveRule/index.vue (date 1660891733137) |
| | | @@ -4,9 +4,7 @@ |
| | | <el-row class="homeCard"> |
| | | <div class="basic-line"> |
| | | <span>规则名称:</span> |
| | | - <el-select v-model="tableData.params.searchParams.ruleName" 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> |
| | | + <el-input v-model="tableData.params.searchParams.ruleName" class="input-box" placeholder="规则名称"> </el-input> |
| | | </div> |
| | | <div class="basic-line"> |
| | | <span>部门:</span> |
| | | @@ -34,7 +32,7 @@ |
| | | <el-row class="cardTop"> |
| | | <el-col :span="12" class="mainCardBtn"> |
| | | <el-button type="primary" :icon="Plus" size="default" @click="openApproveRuleDialog('新增', {})">新建</el-button> |
| | | - <!-- <el-button type="danger" :icon="Delete" size="default" plain>删除</el-button>--> |
| | | + <el-button type="danger" :icon="Delete" size="default" @click="deleteApproveRule" plain>批量删除</el-button> |
| | | </el-col> |
| | | <el-button type="primary" :icon="Refresh" size="default" /> |
| | | </el-row> |
| | | @@ -63,7 +61,6 @@ |
| | | <template #default="scope"> |
| | | <el-button link type="primary" size="small" :icon="View" @click="openApproveRuleDialog('查看', scope.row)">查看</el-button> |
| | | <el-button link type="primary" size="small" :icon="Edit" @click="openApproveRuleDialog('修改', scope.row)">修改</el-button> |
| | | - <el-button link type="danger" size="small" :icon="Delete" @click="deleteApproveRule(scope.row)">删除</el-button> |
| | | </template> |
| | | </el-table-column> |
| | | </el-table> |
| | | @@ -217,7 +214,34 @@ |
| | | |
| | | // 删除 |
| | | const deleteApproveRule = (row: any) => { |
| | | - ElMessageBox.confirm(`此操作将永久删除该任务:“${row.unitName}”,是否继续?`, '提示', { |
| | | + ElMessageBox.confirm(`此操作将永久删除该审批规则,是否继续?`, '提示', { |
| | | + confirmButtonText: '确认', |
| | | + cancelButtonText: '取消', |
| | | + type: 'warning' |
| | | + }) |
| | | + .then(async () => { |
| | | + let res = await approveRuleApi().deleteApproveRule({ ids: [row.id] }); |
| | | + state.deleteList.ids = []; |
| | | + if (res.data.code === '200') { |
| | | + ElMessage({ |
| | | + type: 'success', |
| | | + duration: 2000, |
| | | + message: '删除成功' |
| | | + }); |
| | | + await getApproveRule(); |
| | | + } else { |
| | | + ElMessage({ |
| | | + type: 'warning', |
| | | + message: res.data.msg |
| | | + }); |
| | | + } |
| | | + }) |
| | | + .catch(() => {}); |
| | | + }; |
| | | + |
| | | + // 批量删除 |
| | | + const deleteMoreApproveRule = (row: any) => { |
| | | + ElMessageBox.confirm(`此操作将永久删除这些审批规则,是否继续?`, '提示', { |
| | | confirmButtonText: '确认', |
| | | cancelButtonText: '取消', |
| | | type: 'warning' |
| | | @@ -301,6 +325,7 @@ |
| | | parseNumber, |
| | | deleteApproveRule, |
| | | getApproveRule, |
| | | + deleteMoreApproveRule, |
| | | handleSelectionChange, |
| | | onHandleSizeChange, |
| | | onHandleCurrentChange, |
| | | @@ -438,15 +463,6 @@ |
| | | 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)); |
| | | Index: src/layout/routerView/link.vue |
| | | IDEA additional info: |
| | | Subsystem: com.intellij.openapi.diff.impl.patch.BaseRevisionTextPatchEP |
| | | <+><template>\r\n\t<div class=\"layout-view-bg-white flex layout-view-link\" :style=\"{ height: `calc(100vh - ${setLinkHeight}` }\">\r\n\t\t<a :href=\"currentRouteMeta.isLink\" target=\"_blank\" rel=\"opener\" class=\"flex-margin\">\r\n\t\t\t{{ $t(currentRouteMeta.title) }}:{{ currentRouteMeta.isLink }}\r\n\t\t</a>\r\n\t</div>\r\n</template>\r\n\r\n<script lang=\"ts\">\r\nimport { defineComponent, toRefs, reactive, computed, watch } from 'vue';\r\nimport { useRoute, RouteMeta } from 'vue-router';\r\nimport { storeToRefs } from 'pinia';\r\nimport { useThemeConfig } from '/@/stores/themeConfig';\r\n\r\n// 定义接口来定义对象的类型\r\ninterface LinkViewState {\r\n\tcurrentRouteMeta: {\r\n\t\tisLink: string;\r\n\t\ttitle: string;\r\n\t};\r\n}\r\ninterface LinkViewRouteMeta extends RouteMeta {\r\n\tisLink: string;\r\n\ttitle: string;\r\n}\r\n\r\nexport default defineComponent({\r\n\tname: 'layoutLinkView',\r\n\tsetup() {\r\n\t\tconst storesThemeConfig = useThemeConfig();\r\n\t\tconst { themeConfig } = storeToRefs(storesThemeConfig);\r\n\t\tconst route = useRoute();\r\n\t\tconst state = reactive<LinkViewState>({\r\n\t\t\tcurrentRouteMeta: {\r\n\t\t\t\tisLink: '',\r\n\t\t\t\ttitle: '',\r\n\t\t\t},\r\n\t\t});\r\n\t\t// 设置 link 的高度\r\n\t\tconst setLinkHeight = computed(() => {\r\n\t\t\tlet { isTagsview } = themeConfig.value;\r\n\t\t\tif (isTagsview) return `115px`;\r\n\t\t\telse return `80px`;\r\n\t\t});\r\n\t\t// 监听路由的变化,设置内容\r\n\t\twatch(\r\n\t\t\t() => route.path,\r\n\t\t\t() => {\r\n\t\t\t\tstate.currentRouteMeta = <LinkViewRouteMeta>route.meta;\r\n\t\t\t},\r\n\t\t\t{\r\n\t\t\t\timmediate: true,\r\n\t\t\t}\r\n\t\t);\r\n\t\treturn {\r\n\t\t\tsetLinkHeight,\r\n\t\t\t...toRefs(state),\r\n\t\t};\r\n\t},\r\n});\r\n</script>\r\n |
| | | Subsystem: com.intellij.openapi.diff.impl.patch.CharsetEP |
| | | <+>UTF-8 |
| | | =================================================================== |
| | | diff --git a/src/layout/routerView/link.vue b/src/layout/routerView/link.vue |
| | | --- a/src/layout/routerView/link.vue (revision 2e0110788cc8563381d4d8050b559d8f4448c6bf) |
| | | +++ b/src/layout/routerView/link.vue (date 1660894319217) |
| | | @@ -1,9 +1,7 @@ |
| | | <template> |
| | | - <div class="layout-view-bg-white flex layout-view-link" :style="{ height: `calc(100vh - ${setLinkHeight}` }"> |
| | | - <a :href="currentRouteMeta.isLink" target="_blank" rel="opener" class="flex-margin"> |
| | | - {{ $t(currentRouteMeta.title) }}:{{ currentRouteMeta.isLink }} |
| | | - </a> |
| | | - </div> |
| | | + <div class="layout-view-bg-white flex layout-view-link" :style="{ height: `calc(100vh - ${setLinkHeight}` }"> |
| | | + <a :href="currentRouteMeta.isLink" target="_blank" rel="opener" class="flex-margin"> {{ $t(currentRouteMeta.title) }}:{{ currentRouteMeta.isLink }} </a> |
| | | + </div> |
| | | </template> |
| | | |
| | | <script lang="ts"> |
| | | @@ -14,48 +12,48 @@ |
| | | |
| | | // 定义接口来定义对象的类型 |
| | | interface LinkViewState { |
| | | - currentRouteMeta: { |
| | | - isLink: string; |
| | | - title: string; |
| | | - }; |
| | | + currentRouteMeta: { |
| | | + isLink: string; |
| | | + title: string; |
| | | + }; |
| | | } |
| | | interface LinkViewRouteMeta extends RouteMeta { |
| | | - isLink: string; |
| | | - title: string; |
| | | + isLink: string; |
| | | + title: string; |
| | | } |
| | | |
| | | export default defineComponent({ |
| | | - name: 'layoutLinkView', |
| | | - setup() { |
| | | - const storesThemeConfig = useThemeConfig(); |
| | | - const { themeConfig } = storeToRefs(storesThemeConfig); |
| | | - const route = useRoute(); |
| | | - const state = reactive<LinkViewState>({ |
| | | - currentRouteMeta: { |
| | | - isLink: '', |
| | | - title: '', |
| | | - }, |
| | | - }); |
| | | - // 设置 link 的高度 |
| | | - const setLinkHeight = computed(() => { |
| | | - let { isTagsview } = themeConfig.value; |
| | | - if (isTagsview) return `115px`; |
| | | - else return `80px`; |
| | | - }); |
| | | - // 监听路由的变化,设置内容 |
| | | - watch( |
| | | - () => route.path, |
| | | - () => { |
| | | - state.currentRouteMeta = <LinkViewRouteMeta>route.meta; |
| | | - }, |
| | | - { |
| | | - immediate: true, |
| | | - } |
| | | - ); |
| | | - return { |
| | | - setLinkHeight, |
| | | - ...toRefs(state), |
| | | - }; |
| | | - }, |
| | | + name: 'layoutLinkView', |
| | | + setup() { |
| | | + const storesThemeConfig = useThemeConfig(); |
| | | + const { themeConfig } = storeToRefs(storesThemeConfig); |
| | | + const route = useRoute(); |
| | | + const state = reactive<LinkViewState>({ |
| | | + currentRouteMeta: { |
| | | + isLink: '', |
| | | + title: '' |
| | | + } |
| | | + }); |
| | | + // 设置 link 的高度 |
| | | + const setLinkHeight = computed(() => { |
| | | + let { isTagsview } = themeConfig.value; |
| | | + if (isTagsview) return `115px`; |
| | | + else return `80px`; |
| | | + }); |
| | | + // 监听路由的变化,设置内容 |
| | | + watch( |
| | | + () => route.path, |
| | | + () => { |
| | | + state.currentRouteMeta = <LinkViewRouteMeta>route.meta; |
| | | + }, |
| | | + { |
| | | + immediate: true |
| | | + } |
| | | + ); |
| | | + return { |
| | | + setLinkHeight, |
| | | + ...toRefs(state) |
| | | + }; |
| | | + } |
| | | }); |
| | | </script> |
| | | Index: src/views/specialWorkSystem/workApplyManage/workTicket/index.vue |
| | | IDEA additional info: |
| | | Subsystem: com.intellij.openapi.diff.impl.patch.BaseRevisionTextPatchEP |
| | | <+><template>\r\n\t<div class=\"home-container\">\r\n\t\t<div style=\"height: 100%\">\r\n\t\t<el-form :model=\"form\" label-width=\"120px\" :rules=\"applyRules\" ref=\"ruleFormRef\">\r\n\t\t\t<div class=\"homeCard\">\r\n\t\t\t<el-row>\r\n\t\t\t\t<el-col :span=\"12\">\r\n\t\t\t\t\t<el-form-item label=\"作业人\" prop=\"operatorUids\">\r\n\t\t\t\t\t\t<el-select v-model=\"form.operatorUids\" multiple>\r\n\t\t\t\t\t\t\t<el-option\r\n\t\t\t\t\t\t\t\t\tv-for=\"item in workerList\"\r\n\t\t\t\t\t\t\t\t\t:key=\"item.value\"\r\n\t\t\t\t\t\t\t\t\t:label=\"item.label\"\r\n\t\t\t\t\t\t\t\t\t:value=\"item.value\"\r\n\t\t\t\t\t\t\t/>\r\n\t\t\t\t\t\t</el-select>\r\n\t\t\t\t\t</el-form-item>\r\n\t\t\t\t</el-col>\r\n\t\t\t</el-row>\r\n\t\t\t<el-row>\r\n\t\t\t\t<el-col :span=\"12\">\r\n\t\t\t\t\t<el-form-item label=\"作业等级\" prop=\"workLevel\">\r\n\t\t\t\t\t\t<el-select v-model=\"form.workLevel\">\r\n\t\t\t\t\t\t\t<el-option\r\n\t\t\t\t\t\t\t\t\tv-for=\"item in workLevelList\"\r\n\t\t\t\t\t\t\t\t\t:key=\"item.value\"\r\n\t\t\t\t\t\t\t\t\t:label=\"item.label\"\r\n\t\t\t\t\t\t\t\t\t:value=\"item.value\"\r\n\t\t\t\t\t\t\t/>\r\n\t\t\t\t\t\t</el-select>\r\n\t\t\t\t\t</el-form-item>\r\n\t\t\t\t</el-col>\r\n\t\t\t\t<el-col :span=\"12\">\r\n\t\t\t\t\t<el-form-item label=\"作业时间\" prop=\"workTimeLine\">\r\n\t\t\t\t\t\t<el-date-picker\r\n\t\t\t\t\t\t\t\tv-model=\"form.workTimeLine\"\r\n\t\t\t\t\t\t\t\tformat=\"YYYY-MM-DD HH:mm\"\r\n\t\t\t\t\t\t\t\tvalue-format=\"YYYY-MM-DD HH:mm:00\"\r\n\t\t\t\t\t\t\t\ttype=\"datetimerange\"\r\n\t\t\t\t\t\t\t\trange-separator=\"至\"\r\n\t\t\t\t\t\t\t\tstart-placeholder=\"开始时间\"\r\n\t\t\t\t\t\t\t\tend-placeholder=\"结束时间\"\r\n\t\t\t\t\t\t/>\r\n\t\t\t\t\t</el-form-item>\r\n\t\t\t\t</el-col>\r\n\t\t\t</el-row>\r\n\t\t\t<el-row>\r\n\t\t\t\t<el-col :span=\"12\">\r\n\t\t\t\t\t<el-form-item label=\"作业内容\" prop=\"workContent\">\r\n\t\t\t\t\t\t<el-input\r\n\t\t\t\t\t\t\t\tv-model=\"form.workContent\"\r\n\t\t\t\t\t\t\t\tautosize\r\n\t\t\t\t\t\t\t\ttype=\"textarea\"\r\n\t\t\t\t\t\t\t\tplaceholder=\"请输入作业内容\"\r\n\t\t\t\t\t\t/>\r\n\t\t\t\t\t</el-form-item>\r\n\t\t\t\t</el-col>\r\n\t\t\t\t<el-col :span=\"12\">\r\n\t\t\t\t\t<el-form-item label=\"作业地址\" prop=\"workLocation\">\r\n\t\t\t\t\t\t<el-input\r\n\t\t\t\t\t\t\t\tv-model=\"form.workLocation\"\r\n\t\t\t\t\t\t\t\tautosize\r\n\t\t\t\t\t\t\t\ttype=\"textarea\"\r\n\t\t\t\t\t\t\t\tplaceholder=\"请输入作业地址\"\r\n\t\t\t\t\t\t/>\r\n\t\t\t\t\t</el-form-item>\r\n\t\t\t\t</el-col>\r\n\t\t\t</el-row>\r\n\t\t\t<el-row>\r\n\t\t\t\t<el-col :span=\"12\">\r\n\t\t\t\t\t<el-form-item label=\"动火方式\" prop=\"workDetail.hotMethod\">\r\n\t\t\t\t\t\t<el-input\r\n\t\t\t\t\t\t\t\tv-model=\"form.workDetail.hotMethod\"\r\n\t\t\t\t\t\t\t\tautosize\r\n\t\t\t\t\t\t\t\ttype=\"textarea\"\r\n\t\t\t\t\t\t\t\tplaceholder=\"请输入动火方式\"\r\n\t\t\t\t\t\t/>\r\n\t\t\t\t\t</el-form-item>\r\n\t\t\t\t</el-col>\r\n\t\t\t\t<el-col :span=\"12\">\r\n\t\t\t\t\t<el-form-item label=\"关联作业\" prop=\"workDetail.otherSpecialWork\">\r\n\t\t\t\t\t\t<el-select v-model=\"form.workDetail.otherSpecialWork\" multiple>\r\n\t\t\t\t\t\t\t<el-option\r\n\t\t\t\t\t\t\t\t\tv-for=\"item in otherWorkList\"\r\n\t\t\t\t\t\t\t\t\t:key=\"item.value\"\r\n\t\t\t\t\t\t\t\t\t:label=\"item.label\"\r\n\t\t\t\t\t\t\t\t\t:value=\"item.value\"\r\n\t\t\t\t\t\t\t/>\r\n\t\t\t\t\t\t</el-select>\r\n\t\t\t\t\t</el-form-item>\r\n\t\t\t\t</el-col>\r\n\t\t\t</el-row>\r\n\t\t\t</div>\r\n\t\t</el-form>\r\n\t\t<div class=\"applyBtn\">\r\n\t\t\t<el-button type=\"primary\" size=\"large\" plain @click=\"submitForm(ruleFormRef)\">发起申请</el-button>\r\n\t\t</div>\r\n\t</div>\r\n\t</div>\r\n</template>\r\n\r\n<script lang=\"ts\">\r\n\timport { toRefs, reactive, defineComponent, ref, defineAsyncComponent } from 'vue';\r\n\timport { storeToRefs } from 'pinia';\r\n\timport { initBackEndControlRoutes } from '/@/router/backEnd';\r\n\timport {useUserInfo} from \"/@/stores/userInfo\";\r\n\timport { Session } from '/@/utils/storage';\r\n\timport { Search } from '@element-plus/icons-vue'\r\n\timport { ElMessage } from 'element-plus'\r\n\timport type { FormInstance, FormRules } from 'element-plus'\r\n\timport { workApplyApi } from '/@/api/specialWorkSystem/workApply';\r\n\r\n\r\n\tinterface stateType {\r\n\t\tform: Object,\r\n\t\tworkerList: Array<any>,\r\n\t\tworkTypeList: Array<any>,\r\n\t\tworkLevelList: Array<any>,\r\n\t\totherWorkList: Array<any>\r\n\t}\r\n\texport default defineComponent({\r\n\t\tname: 'workTicket',\r\n\t\tcomponents: {},\r\n\t\tsetup() {\r\n\t\t\tconst userInfo = useUserInfo()\r\n\t\t\tconst { userInfos } = storeToRefs(userInfo);\r\n\t\t\tconst state = reactive<stateType>({\r\n\t\t\t\tform: {\r\n\t\t\t\t\toperatorUids: [],\r\n\t\t\t\t\tworkType: 1,\r\n\t\t\t\t\tworkLevel: null,\r\n\t\t\t\t\tworkContent: '',\r\n\t\t\t\t\tworkLocation: '',\r\n\t\t\t\t\tworkDetail:{\r\n\t\t\t\t\t\thotMethod: '',\r\n\t\t\t\t\t\totherSpecialWork: []\r\n\t\t\t\t\t},\r\n\t\t\t\t\tworkTimeLine: [],\r\n\t\t\t\t\texpStartTime: '',\r\n\t\t\t\t\texpEndTime: ''\r\n\t\t\t\t},\r\n\t\t\t\tworkerList:[\r\n\t\t\t\t\t{\r\n\t\t\t\t\t\tlabel: \"张三\",\r\n\t\t\t\t\t\tvalue: 53\r\n\t\t\t\t\t},\r\n\t\t\t\t\t{\r\n\t\t\t\t\t\tlabel: \"李四\",\r\n\t\t\t\t\t\tvalue: 54\r\n\t\t\t\t\t},\r\n\t\t\t\t\t{\r\n\t\t\t\t\t\tlabel: \"测试一\",\r\n\t\t\t\t\t\tvalue: 55\r\n\t\t\t\t\t},\r\n\t\t\t\t\t{\r\n\t\t\t\t\t\tlabel: \"测试二\",\r\n\t\t\t\t\t\tvalue: 56\r\n\t\t\t\t\t}\r\n\t\t\t\t],\r\n\t\t\t\tworkTypeList: [\r\n\t\t\t\t\t{\r\n\t\t\t\t\t\tlabel: \"类型一\",\r\n\t\t\t\t\t\tvalue: 1\r\n\t\t\t\t\t},\r\n\t\t\t\t\t{\r\n\t\t\t\t\t\tlabel: \"类型二\",\r\n\t\t\t\t\t\tvalue: 2\r\n\t\t\t\t\t}\r\n\t\t\t\t],\r\n\t\t\t\tworkLevelList: [\r\n\t\t\t\t\t{\r\n\t\t\t\t\t\tlabel: \"一级动火作业\",\r\n\t\t\t\t\t\tvalue: 1\r\n\t\t\t\t\t},\r\n\t\t\t\t\t{\r\n\t\t\t\t\t\tlabel: \"二级动火作业\",\r\n\t\t\t\t\t\tvalue: 2\r\n\t\t\t\t\t},\r\n\t\t\t\t\t{\r\n\t\t\t\t\t\tlabel: \"特级动火作业\",\r\n\t\t\t\t\t\tvalue: 3\r\n\t\t\t\t\t}\r\n\t\t\t\t],\r\n\t\t\t\totherWorkList: [\r\n\t\t\t\t\t{\r\n\t\t\t\t\t\tlabel: \"动火作业\",\r\n\t\t\t\t\t\tvalue: 1\r\n\t\t\t\t\t},\r\n\t\t\t\t\t{\r\n\t\t\t\t\t\tlabel: \"受限空间作业\",\r\n\t\t\t\t\t\tvalue: 2\r\n\t\t\t\t\t},\r\n\t\t\t\t\t{\r\n\t\t\t\t\t\tlabel: \"吊装作业\",\r\n\t\t\t\t\t\tvalue: 3\r\n\t\t\t\t\t},\r\n\t\t\t\t\t{\r\n\t\t\t\t\t\tlabel: \"动土作业\",\r\n\t\t\t\t\t\tvalue: 4\r\n\t\t\t\t\t},\r\n\t\t\t\t\t{\r\n\t\t\t\t\t\tlabel: \"断路作业\",\r\n\t\t\t\t\t\tvalue: 5\r\n\t\t\t\t\t},\r\n\t\t\t\t\t{\r\n\t\t\t\t\t\tlabel: \"高处作业\",\r\n\t\t\t\t\t\tvalue: 6\r\n\t\t\t\t\t},\r\n\t\t\t\t\t{\r\n\t\t\t\t\t\tlabel: \"临时用电作业\",\r\n\t\t\t\t\t\tvalue: 7\r\n\t\t\t\t\t},\r\n\t\t\t\t\t{\r\n\t\t\t\t\t\tlabel: \"盲板抽堵作业\",\r\n\t\t\t\t\t\tvalue: 8\r\n\t\t\t\t\t}\r\n\t\t\t\t]\r\n\t\t\t});\r\n\t\t\tconst ruleFormRef = ref<FormInstance>()\r\n\t\t\tconst applyRules = reactive<FormRules>({\r\n\t\t\t\toperatorUid: [{ required: true, message: '该内容不能为空', trigger: 'blur' }],\r\n\t\t\t\tworkType: [{ required: true, message: '该内容不能为空', trigger: 'blur' }],\r\n\t\t\t\tworkLevel: [{ required: true, message: '该内容不能为空', trigger: 'blur' }],\r\n\t\t\t\tworkContent: [{ required: true, message: '该内容不能为空', trigger: 'blur' }],\r\n\t\t\t\tworkLocation: [{ required: true, message: '该内容不能为空', trigger: 'blur' }],\r\n\t\t\t\tworkTimeLine: [{ required: true, message: '该内容不能为空', trigger: 'blur' }],\r\n\t\t\t\t\"workDetail.hotMethod\": [{ required: true, message: '该内容不能为空', trigger: 'blur' }],\r\n\t\t\t\t\"workDetail.otherSpecialWork\": [{ required: true, message: '该内容不能为空', trigger: 'blur' }]\r\n\t\t\t});\r\n\t\t\tconst submitForm = async (formEl: FormInstance | undefined) => {\r\n\t\t\t\tif (!formEl) return\r\n\t\t\t\tawait formEl.validate(async (valid, fields) => {\r\n\t\t\t\t\tif (valid) {\r\n\t\t\t\t\t\tstate.form.expStartTime = JSON.parse(JSON.stringify(state.form.workTimeLine))[0]\r\n\t\t\t\t\t\tstate.form.expEndTime = JSON.parse(JSON.stringify(state.form.workTimeLine))[1]\r\n\t\t\t\t\t\tlet { workTimeLine, ...data } = JSON.parse(JSON.stringify(state.form))\r\n\t\t\t\t\t\tdata.workDetail.otherSpecialWork = data.workDetail.otherSpecialWork.join(',')\r\n\t\t\t\t\t\tconsole.log(data,'data')\r\n\t\t\t\t\t\tconst res = await workApplyApi().postFireApply(data)\r\n\t\t\t\t\t\tif (res.data.code === '200') {\r\n\t\t\t\t\t\t\t\tElMessage({\r\n\t\t\t\t\t\t\t\t\ttype: 'success',\r\n\t\t\t\t\t\t\t\t\tmessage: '提交成功!'\r\n\t\t\t\t\t\t\t\t});\r\n\t\t\t\t\t\t\t\tformEl.resetFields()\r\n\t\t\t\t\t\t} else {\r\n\t\t\t\t\t\t\tElMessage({\r\n\t\t\t\t\t\t\t\ttype: 'warning',\r\n\t\t\t\t\t\t\t\tmessage: res.data.msg\r\n\t\t\t\t\t\t\t});\r\n\t\t\t\t\t\t}\r\n\t\t\t\t\t} else {\r\n\t\t\t\t\t\tconsole.log('error submit!', fields)\r\n\t\t\t\t\t}\r\n\t\t\t\t})\r\n\t\t\t}\r\n\t\t\t// 折线图\r\n\t\t\tconst renderMenu = async (value: string) => {\r\n\t\t\t\tSession.set('projectId',value)\r\n\t\t\t\tuserInfos.value.projectId = value\r\n\t\t\t\tawait initBackEndControlRoutes();\r\n\t\t\t};\r\n\t\t\treturn {\r\n\t\t\t\trenderMenu,\r\n\t\t\t\tSearch,\r\n\t\t\t\truleFormRef,\r\n\t\t\t\tapplyRules,\r\n\t\t\t\tsubmitForm,\r\n\t\t\t\t...toRefs(state),\r\n\t\t\t};\r\n\t\t},\r\n\t});\r\n</script>\r\n\r\n<style scoped lang=\"scss\">\r\n\t.home-container {\r\n\t\theight: 100%;\r\n\t\toverflow: hidden;\r\n\t\tposition: relative;\r\n\t\t.homeCard{\r\n\t\t\twidth: 100%;\r\n\t\t\tpadding: 20px;\r\n\t\t\tbox-sizing: border-box;\r\n\t\t\tbackground: #fff;\r\n\t\t\tborder-radius: 4px;\r\n\t\t\tmargin-bottom: 20px;\r\n\t\t}\r\n\t\t.applyBtn{\r\n\t\t\twidth: 100%;\r\n\t\t\tbackground: #fff;\r\n\t\t\theight: 80px;\r\n\t\t\tz-index: 5;\r\n\t\t\tbox-shadow: 0 -3px 8px rgba(150,150,150,.1);\r\n\t\t\tdisplay: flex;\r\n\t\t\talign-items: center;\r\n\t\t\tjustify-content: center;\r\n\t\t}\r\n\t\t.el-row{\r\n\t\t\tmargin-bottom: 20px;\r\n\t\t}\r\n\t\t.el-row:last-child {\r\n\t\t\tmargin-bottom: 0;\r\n\t\t}\r\n\t\t.el-input{\r\n\t\t\twidth: 100% !important;\r\n\t\t}\r\n\t\t.el-date-editor::v-deep{\r\n\t\t\twidth: 100%;\r\n\t\t}\r\n\t\t.el-select{\r\n\t\t\twidth: 100%;\r\n\t\t}\r\n\t\t.el-cascader{\r\n\t\t\twidth: 100% !important;\r\n\t\t}\r\n\t}\r\n</style>\r\n |
| | | Subsystem: com.intellij.openapi.diff.impl.patch.CharsetEP |
| | | <+>UTF-8 |
| | | =================================================================== |
| | | diff --git a/src/views/specialWorkSystem/workApplyManage/workTicket/index.vue b/src/views/specialWorkSystem/workApplyManage/workTicket/index.vue |
| | | --- a/src/views/specialWorkSystem/workApplyManage/workTicket/index.vue (revision 2e0110788cc8563381d4d8050b559d8f4448c6bf) |
| | | +++ b/src/views/specialWorkSystem/workApplyManage/workTicket/index.vue (date 1660894149383) |
| | | @@ -1,317 +1,279 @@ |
| | | <template> |
| | | - <div class="home-container"> |
| | | - <div style="height: 100%"> |
| | | - <el-form :model="form" label-width="120px" :rules="applyRules" ref="ruleFormRef"> |
| | | - <div class="homeCard"> |
| | | - <el-row> |
| | | - <el-col :span="12"> |
| | | - <el-form-item label="作业人" prop="operatorUids"> |
| | | - <el-select v-model="form.operatorUids" multiple> |
| | | - <el-option |
| | | - v-for="item in workerList" |
| | | - :key="item.value" |
| | | - :label="item.label" |
| | | - :value="item.value" |
| | | - /> |
| | | - </el-select> |
| | | - </el-form-item> |
| | | - </el-col> |
| | | - </el-row> |
| | | - <el-row> |
| | | - <el-col :span="12"> |
| | | - <el-form-item label="作业等级" prop="workLevel"> |
| | | - <el-select v-model="form.workLevel"> |
| | | - <el-option |
| | | - v-for="item in workLevelList" |
| | | - :key="item.value" |
| | | - :label="item.label" |
| | | - :value="item.value" |
| | | - /> |
| | | - </el-select> |
| | | - </el-form-item> |
| | | - </el-col> |
| | | - <el-col :span="12"> |
| | | - <el-form-item label="作业时间" prop="workTimeLine"> |
| | | - <el-date-picker |
| | | - v-model="form.workTimeLine" |
| | | - format="YYYY-MM-DD HH:mm" |
| | | - value-format="YYYY-MM-DD HH:mm:00" |
| | | - type="datetimerange" |
| | | - range-separator="至" |
| | | - start-placeholder="开始时间" |
| | | - end-placeholder="结束时间" |
| | | - /> |
| | | - </el-form-item> |
| | | - </el-col> |
| | | - </el-row> |
| | | - <el-row> |
| | | - <el-col :span="12"> |
| | | - <el-form-item label="作业内容" prop="workContent"> |
| | | - <el-input |
| | | - v-model="form.workContent" |
| | | - autosize |
| | | - type="textarea" |
| | | - placeholder="请输入作业内容" |
| | | - /> |
| | | - </el-form-item> |
| | | - </el-col> |
| | | - <el-col :span="12"> |
| | | - <el-form-item label="作业地址" prop="workLocation"> |
| | | - <el-input |
| | | - v-model="form.workLocation" |
| | | - autosize |
| | | - type="textarea" |
| | | - placeholder="请输入作业地址" |
| | | - /> |
| | | - </el-form-item> |
| | | - </el-col> |
| | | - </el-row> |
| | | - <el-row> |
| | | - <el-col :span="12"> |
| | | - <el-form-item label="动火方式" prop="workDetail.hotMethod"> |
| | | - <el-input |
| | | - v-model="form.workDetail.hotMethod" |
| | | - autosize |
| | | - type="textarea" |
| | | - placeholder="请输入动火方式" |
| | | - /> |
| | | - </el-form-item> |
| | | - </el-col> |
| | | - <el-col :span="12"> |
| | | - <el-form-item label="关联作业" prop="workDetail.otherSpecialWork"> |
| | | - <el-select v-model="form.workDetail.otherSpecialWork" multiple> |
| | | - <el-option |
| | | - v-for="item in otherWorkList" |
| | | - :key="item.value" |
| | | - :label="item.label" |
| | | - :value="item.value" |
| | | - /> |
| | | - </el-select> |
| | | - </el-form-item> |
| | | - </el-col> |
| | | - </el-row> |
| | | - </div> |
| | | - </el-form> |
| | | - <div class="applyBtn"> |
| | | - <el-button type="primary" size="large" plain @click="submitForm(ruleFormRef)">发起申请</el-button> |
| | | - </div> |
| | | - </div> |
| | | - </div> |
| | | + <div class="home-container"> |
| | | + <div style="height: 100%"> |
| | | + <el-form :model="form" label-width="120px" :rules="applyRules" ref="ruleFormRef"> |
| | | + <div class="homeCard"> |
| | | + <el-row> |
| | | + <el-col :span="12"> |
| | | + <el-form-item label="作业人" prop="operatorUids"> |
| | | + <el-select v-model="form.operatorUids" multiple> |
| | | + <el-option v-for="item in workerList" :key="item.value" :label="item.label" :value="item.value" /> |
| | | + </el-select> |
| | | + </el-form-item> |
| | | + </el-col> |
| | | + </el-row> |
| | | + <el-row> |
| | | + <el-col :span="12"> |
| | | + <el-form-item label="作业等级" prop="workLevel"> |
| | | + <el-select v-model="form.workLevel"> |
| | | + <el-option v-for="item in workLevelList" :key="item.value" :label="item.label" :value="item.value" /> |
| | | + </el-select> |
| | | + </el-form-item> |
| | | + </el-col> |
| | | + <el-col :span="12"> |
| | | + <el-form-item label="作业时间" prop="workTimeLine"> |
| | | + <el-date-picker v-model="form.workTimeLine" format="YYYY-MM-DD HH:mm" value-format="YYYY-MM-DD HH:mm:00" type="datetimerange" range-separator="至" start-placeholder="开始时间" end-placeholder="结束时间" /> |
| | | + </el-form-item> |
| | | + </el-col> |
| | | + </el-row> |
| | | + <el-row> |
| | | + <el-col :span="12"> |
| | | + <el-form-item label="作业内容" prop="workContent"> |
| | | + <el-input v-model="form.workContent" autosize type="textarea" placeholder="请输入作业内容" /> |
| | | + </el-form-item> |
| | | + </el-col> |
| | | + <el-col :span="12"> |
| | | + <el-form-item label="作业地址" prop="workLocation"> |
| | | + <el-input v-model="form.workLocation" autosize type="textarea" placeholder="请输入作业地址" /> |
| | | + </el-form-item> |
| | | + </el-col> |
| | | + </el-row> |
| | | + <el-row> |
| | | + <el-col :span="12"> |
| | | + <el-form-item label="动火方式" prop="workDetail.hotMethod"> |
| | | + <el-input v-model="form.workDetail.hotMethod" autosize type="textarea" placeholder="请输入动火方式" /> |
| | | + </el-form-item> |
| | | + </el-col> |
| | | + <el-col :span="12"> |
| | | + <el-form-item label="关联作业" prop="workDetail.otherSpecialWork"> |
| | | + <el-select v-model="form.workDetail.otherSpecialWork" multiple> |
| | | + <el-option v-for="item in otherWorkList" :key="item.value" :label="item.label" :value="item.value" /> |
| | | + </el-select> |
| | | + </el-form-item> |
| | | + </el-col> |
| | | + </el-row> |
| | | + </div> |
| | | + </el-form> |
| | | + <div class="applyBtn"> |
| | | + <el-button type="primary" size="large" plain @click="submitForm(ruleFormRef)">发起申请</el-button> |
| | | + </div> |
| | | + </div> |
| | | + </div> |
| | | </template> |
| | | |
| | | <script lang="ts"> |
| | | - import { toRefs, reactive, defineComponent, ref, defineAsyncComponent } from 'vue'; |
| | | - import { storeToRefs } from 'pinia'; |
| | | - import { initBackEndControlRoutes } from '/@/router/backEnd'; |
| | | - import {useUserInfo} from "/@/stores/userInfo"; |
| | | - import { Session } from '/@/utils/storage'; |
| | | - import { Search } from '@element-plus/icons-vue' |
| | | - import { ElMessage } from 'element-plus' |
| | | - import type { FormInstance, FormRules } from 'element-plus' |
| | | - import { workApplyApi } from '/@/api/specialWorkSystem/workApply'; |
| | | +import { toRefs, reactive, defineComponent, ref, defineAsyncComponent, onMounted } from 'vue'; |
| | | +import { storeToRefs } from 'pinia'; |
| | | +import { initBackEndControlRoutes } from '/@/router/backEnd'; |
| | | +import { useUserInfo } from '/@/stores/userInfo'; |
| | | +import { Session } from '/@/utils/storage'; |
| | | +import { Search } from '@element-plus/icons-vue'; |
| | | +import { ElMessage } from 'element-plus'; |
| | | +import type { FormInstance, FormRules } from 'element-plus'; |
| | | +import { workApplyApi } from '/@/api/specialWorkSystem/workApply'; |
| | | |
| | | - |
| | | - interface stateType { |
| | | - form: Object, |
| | | - workerList: Array<any>, |
| | | - workTypeList: Array<any>, |
| | | - workLevelList: Array<any>, |
| | | - otherWorkList: Array<any> |
| | | - } |
| | | - export default defineComponent({ |
| | | - name: 'workTicket', |
| | | - components: {}, |
| | | - setup() { |
| | | - const userInfo = useUserInfo() |
| | | - const { userInfos } = storeToRefs(userInfo); |
| | | - const state = reactive<stateType>({ |
| | | - form: { |
| | | - operatorUids: [], |
| | | - workType: 1, |
| | | - workLevel: null, |
| | | - workContent: '', |
| | | - workLocation: '', |
| | | - workDetail:{ |
| | | - hotMethod: '', |
| | | - otherSpecialWork: [] |
| | | - }, |
| | | - workTimeLine: [], |
| | | - expStartTime: '', |
| | | - expEndTime: '' |
| | | - }, |
| | | - workerList:[ |
| | | - { |
| | | - label: "张三", |
| | | - value: 53 |
| | | - }, |
| | | - { |
| | | - label: "李四", |
| | | - value: 54 |
| | | - }, |
| | | - { |
| | | - label: "测试一", |
| | | - value: 55 |
| | | - }, |
| | | - { |
| | | - label: "测试二", |
| | | - value: 56 |
| | | - } |
| | | - ], |
| | | - workTypeList: [ |
| | | - { |
| | | - label: "类型一", |
| | | - value: 1 |
| | | - }, |
| | | - { |
| | | - label: "类型二", |
| | | - value: 2 |
| | | - } |
| | | - ], |
| | | - workLevelList: [ |
| | | - { |
| | | - label: "一级动火作业", |
| | | - value: 1 |
| | | - }, |
| | | - { |
| | | - label: "二级动火作业", |
| | | - value: 2 |
| | | - }, |
| | | - { |
| | | - label: "特级动火作业", |
| | | - value: 3 |
| | | - } |
| | | - ], |
| | | - otherWorkList: [ |
| | | - { |
| | | - label: "动火作业", |
| | | - value: 1 |
| | | - }, |
| | | - { |
| | | - label: "受限空间作业", |
| | | - value: 2 |
| | | - }, |
| | | - { |
| | | - label: "吊装作业", |
| | | - value: 3 |
| | | - }, |
| | | - { |
| | | - label: "动土作业", |
| | | - value: 4 |
| | | - }, |
| | | - { |
| | | - label: "断路作业", |
| | | - value: 5 |
| | | - }, |
| | | - { |
| | | - label: "高处作业", |
| | | - value: 6 |
| | | - }, |
| | | - { |
| | | - label: "临时用电作业", |
| | | - value: 7 |
| | | - }, |
| | | - { |
| | | - label: "盲板抽堵作业", |
| | | - value: 8 |
| | | - } |
| | | - ] |
| | | - }); |
| | | - const ruleFormRef = ref<FormInstance>() |
| | | - const applyRules = reactive<FormRules>({ |
| | | - operatorUid: [{ required: true, message: '该内容不能为空', trigger: 'blur' }], |
| | | - workType: [{ required: true, message: '该内容不能为空', trigger: 'blur' }], |
| | | - workLevel: [{ required: true, message: '该内容不能为空', trigger: 'blur' }], |
| | | - workContent: [{ required: true, message: '该内容不能为空', trigger: 'blur' }], |
| | | - workLocation: [{ required: true, message: '该内容不能为空', trigger: 'blur' }], |
| | | - workTimeLine: [{ required: true, message: '该内容不能为空', trigger: 'blur' }], |
| | | - "workDetail.hotMethod": [{ required: true, message: '该内容不能为空', trigger: 'blur' }], |
| | | - "workDetail.otherSpecialWork": [{ required: true, message: '该内容不能为空', trigger: 'blur' }] |
| | | - }); |
| | | - const submitForm = async (formEl: FormInstance | undefined) => { |
| | | - if (!formEl) return |
| | | - await formEl.validate(async (valid, fields) => { |
| | | - if (valid) { |
| | | - state.form.expStartTime = JSON.parse(JSON.stringify(state.form.workTimeLine))[0] |
| | | - state.form.expEndTime = JSON.parse(JSON.stringify(state.form.workTimeLine))[1] |
| | | - let { workTimeLine, ...data } = JSON.parse(JSON.stringify(state.form)) |
| | | - data.workDetail.otherSpecialWork = data.workDetail.otherSpecialWork.join(',') |
| | | - console.log(data,'data') |
| | | - const res = await workApplyApi().postFireApply(data) |
| | | - if (res.data.code === '200') { |
| | | - ElMessage({ |
| | | - type: 'success', |
| | | - message: '提交成功!' |
| | | - }); |
| | | - formEl.resetFields() |
| | | - } else { |
| | | - ElMessage({ |
| | | - type: 'warning', |
| | | - message: res.data.msg |
| | | - }); |
| | | - } |
| | | - } else { |
| | | - console.log('error submit!', fields) |
| | | - } |
| | | - }) |
| | | - } |
| | | - // 折线图 |
| | | - const renderMenu = async (value: string) => { |
| | | - Session.set('projectId',value) |
| | | - userInfos.value.projectId = value |
| | | - await initBackEndControlRoutes(); |
| | | - }; |
| | | - return { |
| | | - renderMenu, |
| | | - Search, |
| | | - ruleFormRef, |
| | | - applyRules, |
| | | - submitForm, |
| | | - ...toRefs(state), |
| | | - }; |
| | | - }, |
| | | - }); |
| | | +interface stateType { |
| | | + form: Object; |
| | | + workerList: Array<any>; |
| | | + workTypeList: Array<any>; |
| | | + workLevelList: Array<any>; |
| | | + otherWorkList: Array<any>; |
| | | +} |
| | | +export default defineComponent({ |
| | | + name: 'workTicket', |
| | | + components: {}, |
| | | + setup() { |
| | | + const userInfo = useUserInfo(); |
| | | + const { userInfos } = storeToRefs(userInfo); |
| | | + const state = reactive<stateType>({ |
| | | + form: { |
| | | + operatorUids: [], |
| | | + workType: 1, |
| | | + workLevel: null, |
| | | + workContent: '', |
| | | + workLocation: '', |
| | | + workDetail: { |
| | | + hotMethod: '', |
| | | + otherSpecialWork: [] |
| | | + }, |
| | | + workTimeLine: [], |
| | | + expStartTime: '', |
| | | + expEndTime: '' |
| | | + }, |
| | | + workerList: [ |
| | | + { |
| | | + label: '张三', |
| | | + value: 53 |
| | | + }, |
| | | + { |
| | | + label: '李四', |
| | | + value: 54 |
| | | + }, |
| | | + { |
| | | + label: '测试一', |
| | | + value: 55 |
| | | + }, |
| | | + { |
| | | + label: '测试二', |
| | | + value: 56 |
| | | + } |
| | | + ], |
| | | + workTypeList: [ |
| | | + { |
| | | + label: '类型一', |
| | | + value: 1 |
| | | + }, |
| | | + { |
| | | + label: '类型二', |
| | | + value: 2 |
| | | + } |
| | | + ], |
| | | + workLevelList: [ |
| | | + { |
| | | + label: '一级动火作业', |
| | | + value: 1 |
| | | + }, |
| | | + { |
| | | + label: '二级动火作业', |
| | | + value: 2 |
| | | + }, |
| | | + { |
| | | + label: '特级动火作业', |
| | | + value: 3 |
| | | + } |
| | | + ], |
| | | + otherWorkList: [ |
| | | + { |
| | | + label: '动火作业', |
| | | + value: 1 |
| | | + }, |
| | | + { |
| | | + label: '受限空间作业', |
| | | + value: 2 |
| | | + }, |
| | | + { |
| | | + label: '吊装作业', |
| | | + value: 3 |
| | | + }, |
| | | + { |
| | | + label: '动土作业', |
| | | + value: 4 |
| | | + }, |
| | | + { |
| | | + label: '断路作业', |
| | | + value: 5 |
| | | + }, |
| | | + { |
| | | + label: '高处作业', |
| | | + value: 6 |
| | | + }, |
| | | + { |
| | | + label: '临时用电作业', |
| | | + value: 7 |
| | | + }, |
| | | + { |
| | | + label: '盲板抽堵作业', |
| | | + value: 8 |
| | | + } |
| | | + ] |
| | | + }); |
| | | + const ruleFormRef = ref<FormInstance>(); |
| | | + const applyRules = reactive<FormRules>({ |
| | | + operatorUid: [{ required: true, message: '该内容不能为空', trigger: 'blur' }], |
| | | + workType: [{ required: true, message: '该内容不能为空', trigger: 'blur' }], |
| | | + workLevel: [{ required: true, message: '该内容不能为空', trigger: 'blur' }], |
| | | + workContent: [{ required: true, message: '该内容不能为空', trigger: 'blur' }], |
| | | + workLocation: [{ required: true, message: '该内容不能为空', trigger: 'blur' }], |
| | | + workTimeLine: [{ required: true, message: '该内容不能为空', trigger: 'blur' }], |
| | | + 'workDetail.hotMethod': [{ required: true, message: '该内容不能为空', trigger: 'blur' }], |
| | | + 'workDetail.otherSpecialWork': [{ required: true, message: '该内容不能为空', trigger: 'blur' }] |
| | | + }); |
| | | + const submitForm = async (formEl: FormInstance | undefined) => { |
| | | + if (!formEl) return; |
| | | + await formEl.validate(async (valid, fields) => { |
| | | + if (valid) { |
| | | + state.form.expStartTime = JSON.parse(JSON.stringify(state.form.workTimeLine))[0]; |
| | | + state.form.expEndTime = JSON.parse(JSON.stringify(state.form.workTimeLine))[1]; |
| | | + let { workTimeLine, ...data } = JSON.parse(JSON.stringify(state.form)); |
| | | + data.workDetail.otherSpecialWork = data.workDetail.otherSpecialWork.join(','); |
| | | + console.log(data, 'data'); |
| | | + const res = await workApplyApi().postFireApply(data); |
| | | + if (res.data.code === '200') { |
| | | + ElMessage({ |
| | | + type: 'success', |
| | | + message: '提交成功!' |
| | | + }); |
| | | + formEl.resetFields(); |
| | | + } else { |
| | | + ElMessage({ |
| | | + type: 'warning', |
| | | + message: res.data.msg |
| | | + }); |
| | | + } |
| | | + } else { |
| | | + console.log('error submit!', fields); |
| | | + } |
| | | + }); |
| | | + }; |
| | | + // 折线图 |
| | | + const renderMenu = async (value: string) => { |
| | | + Session.set('projectId', value); |
| | | + userInfos.value.projectId = value; |
| | | + await initBackEndControlRoutes(); |
| | | + }; |
| | | + |
| | | + return { |
| | | + renderMenu, |
| | | + Search, |
| | | + ruleFormRef, |
| | | + applyRules, |
| | | + submitForm, |
| | | + ...toRefs(state) |
| | | + }; |
| | | + } |
| | | +}); |
| | | </script> |
| | | |
| | | <style scoped lang="scss"> |
| | | - .home-container { |
| | | - height: 100%; |
| | | - overflow: hidden; |
| | | - position: relative; |
| | | - .homeCard{ |
| | | - width: 100%; |
| | | - padding: 20px; |
| | | - box-sizing: border-box; |
| | | - background: #fff; |
| | | - border-radius: 4px; |
| | | - margin-bottom: 20px; |
| | | - } |
| | | - .applyBtn{ |
| | | - width: 100%; |
| | | - background: #fff; |
| | | - height: 80px; |
| | | - z-index: 5; |
| | | - box-shadow: 0 -3px 8px rgba(150,150,150,.1); |
| | | - display: flex; |
| | | - align-items: center; |
| | | - justify-content: center; |
| | | - } |
| | | - .el-row{ |
| | | - margin-bottom: 20px; |
| | | - } |
| | | - .el-row:last-child { |
| | | - margin-bottom: 0; |
| | | - } |
| | | - .el-input{ |
| | | - width: 100% !important; |
| | | - } |
| | | - .el-date-editor::v-deep{ |
| | | - width: 100%; |
| | | - } |
| | | - .el-select{ |
| | | - width: 100%; |
| | | - } |
| | | - .el-cascader{ |
| | | - width: 100% !important; |
| | | - } |
| | | - } |
| | | +.home-container { |
| | | + height: 100%; |
| | | + overflow: hidden; |
| | | + position: relative; |
| | | + .homeCard { |
| | | + width: 100%; |
| | | + padding: 20px; |
| | | + box-sizing: border-box; |
| | | + background: #fff; |
| | | + border-radius: 4px; |
| | | + margin-bottom: 20px; |
| | | + } |
| | | + .applyBtn { |
| | | + width: 100%; |
| | | + background: #fff; |
| | | + height: 80px; |
| | | + z-index: 5; |
| | | + box-shadow: 0 -3px 8px rgba(150, 150, 150, 0.1); |
| | | + display: flex; |
| | | + align-items: center; |
| | | + justify-content: center; |
| | | + } |
| | | + .el-row { |
| | | + margin-bottom: 20px; |
| | | + } |
| | | + .el-row:last-child { |
| | | + margin-bottom: 0; |
| | | + } |
| | | + .el-input { |
| | | + width: 100% !important; |
| | | + } |
| | | + .el-date-editor::v-deep { |
| | | + width: 100%; |
| | | + } |
| | | + .el-select { |
| | | + width: 100%; |
| | | + } |
| | | + .el-cascader { |
| | | + width: 100% !important; |
| | | + } |
| | | +} |
| | | </style> |
| | | Index: .idea/shelf/Uncommitted_changes_before_Update_at_2022_8_11_19_22__Default_Changelist_.xml |
| | | =================================================================== |
| | | diff --git a/.idea/shelf/Uncommitted_changes_before_Update_at_2022_8_11_19_22__Default_Changelist_.xml b/.idea/shelf/Uncommitted_changes_before_Update_at_2022_8_11_19_22__Default_Changelist_.xml |
| | | deleted file mode 100644 |
| | | --- a/.idea/shelf/Uncommitted_changes_before_Update_at_2022_8_11_19_22__Default_Changelist_.xml (revision 2e0110788cc8563381d4d8050b559d8f4448c6bf) |
| | | +++ /dev/null (revision 2e0110788cc8563381d4d8050b559d8f4448c6bf) |
| | | @@ -1,9 +0,0 @@ |
| | | -<changelist name="Uncommitted_changes_before_Update_at_2022_8_11_19_22_[Default_Changelist]" date="1660217002849" recycled="true" deleted="true"> |
| | | - <option name="PATH" value="$PROJECT_DIR$/.idea/shelf/Uncommitted_changes_before_Update_at_2022_8_11_19_22_[Default_Changelist]/shelved.patch" /> |
| | | - <option name="DESCRIPTION" value="Uncommitted changes before Update at 2022/8/11 19:22 [Default Changelist]" /> |
| | | - <binary> |
| | | - <option name="BEFORE_PATH" /> |
| | | - <option name="AFTER_PATH" value="src/assets/companyLogo.png" /> |
| | | - <option name="SHELVED_PATH" value="$PROJECT_DIR$/.idea/shelf/Uncommitted_changes_before_Update_at_2022_8_11_19_22_[Default_Changelist]/companyLogo.png" /> |
| | | - </binary> |
| | | -</changelist> |
| | | \ No newline at end of file |
| | | Index: .idea/shelf/Uncommitted_changes_before_Update_at_2022_8_11_19_22_[Default_Changelist]/shelved.patch |
| | | =================================================================== |
| | | diff --git a/.idea/shelf/Uncommitted_changes_before_Update_at_2022_8_11_19_22_[Default_Changelist]/shelved.patch b/.idea/shelf/Uncommitted_changes_before_Update_at_2022_8_11_19_22_[Default_Changelist]/shelved.patch |
| | | deleted file mode 100644 |
| | | --- a/.idea/shelf/Uncommitted_changes_before_Update_at_2022_8_11_19_22_[Default_Changelist]/shelved.patch (revision 2e0110788cc8563381d4d8050b559d8f4448c6bf) |
| | | +++ /dev/null (revision 2e0110788cc8563381d4d8050b559d8f4448c6bf) |
| | | @@ -1,233 +0,0 @@ |
| | | -Index: src/layout/navBars/breadcrumb/user.vue |
| | | -IDEA additional info: |
| | | -Subsystem: com.intellij.openapi.diff.impl.patch.BaseRevisionTextPatchEP |
| | | -<+><template>\r\n <div class=\"layout-navbars-breadcrumb-user pr15\" :style=\"{ flex: layoutUserFlexNum }\">\r\n <div class=\"logo\">\r\n <img src=\"../../../assets/menu/companyLogo.jpg\" />\r\n <span style=\"font-size: 16px; color: #333; font-weight: bolder\"> | {{ systemName }}</span>\r\n </div>\r\n <div style=\"display: flex;align-items:center;padding-right: 5px\">\r\n <div @click=\"backToMenu()\" class=\"backBtn\">返回首页</div>\r\n <el-dropdown :show-timeout=\"70\" :hide-timeout=\"50\" trigger=\"click\" @command=\"onComponentSizeChange\">\r\n <div class=\"layout-navbars-breadcrumb-user-icon\">\r\n <i class=\"iconfont icon-ziti\" :title=\"$t('message.user.title0')\"></i>\r\n </div>\r\n <template #dropdown>\r\n <el-dropdown-menu>\r\n <el-dropdown-item command=\"large\" :disabled=\"disabledSize === 'large'\">{{ $t('message.user.dropdownLarge') }}</el-dropdown-item>\r\n <el-dropdown-item command=\"default\" :disabled=\"disabledSize === 'default'\">{{ $t('message.user.dropdownDefault') }}</el-dropdown-item>\r\n <el-dropdown-item command=\"small\" :disabled=\"disabledSize === 'small'\">{{ $t('message.user.dropdownSmall') }}</el-dropdown-item>\r\n </el-dropdown-menu>\r\n </template>\r\n </el-dropdown>\r\n<!-- <el-dropdown :show-timeout=\"70\" :hide-timeout=\"50\" trigger=\"click\" @command=\"onLanguageChange\">-->\r\n<!-- <div class=\"layout-navbars-breadcrumb-user-icon\">-->\r\n<!-- <i class=\"iconfont\" :class=\"disabledI18n === 'en' ? 'icon-fuhao-yingwen' : 'icon-fuhao-zhongwen'\" :title=\"$t('message.user.title1')\"></i>-->\r\n<!-- </div>-->\r\n<!-- <template #dropdown>-->\r\n<!-- <el-dropdown-menu>-->\r\n<!-- <el-dropdown-item command=\"zh-cn\" :disabled=\"disabledI18n === 'zh-cn'\">简体中文</el-dropdown-item>-->\r\n<!-- <el-dropdown-item command=\"en\" :disabled=\"disabledI18n === 'en'\">English</el-dropdown-item>-->\r\n<!-- <el-dropdown-item command=\"zh-tw\" :disabled=\"disabledI18n === 'zh-tw'\">繁體中文</el-dropdown-item>-->\r\n<!-- </el-dropdown-menu>-->\r\n<!-- </template>-->\r\n<!-- </el-dropdown>-->\r\n<!-- <div class=\"layout-navbars-breadcrumb-user-icon\" @click=\"onSearchClick\">-->\r\n<!-- <el-icon :title=\"$t('message.user.title2')\">-->\r\n<!-- <ele-Search />-->\r\n<!-- </el-icon>-->\r\n<!-- </div>-->\r\n <!-- <div class=\"layout-navbars-breadcrumb-user-icon\" @click=\"onLayoutSetingClick\">-->\r\n <!-- <i class=\"icon-skin iconfont\" :title=\"$t('message.user.title3')\"></i>-->\r\n <!-- </div>-->\r\n <!-- <div class=\"layout-navbars-breadcrumb-user-icon\">-->\r\n <!-- <el-popover placement=\"bottom\" trigger=\"click\" transition=\"el-zoom-in-top\" :width=\"300\" :persistent=\"false\">-->\r\n <!-- <template #reference>-->\r\n <!-- <el-badge :is-dot=\"true\">-->\r\n <!-- <el-icon :title=\"$t('message.user.title4')\">-->\r\n <!-- <ele-Bell />-->\r\n <!-- </el-icon>-->\r\n <!-- </el-badge>-->\r\n <!-- </template>-->\r\n <!-- <template #default>-->\r\n <!-- <UserNews />-->\r\n <!-- </template>-->\r\n <!-- </el-popover>-->\r\n <!-- </div>-->\r\n <div class=\"layout-navbars-breadcrumb-user-icon mr10\" @click=\"onScreenfullClick\">\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 <el-dropdown :show-timeout=\"70\" :hide-timeout=\"50\" @command=\"onHandleCommandClick\">\r\n <span class=\"layout-navbars-breadcrumb-user-link\">\r\n <img :src=\"userInfos.photo\" class=\"layout-navbars-breadcrumb-user-link-photo mr5\" />\r\n {{ userInfos.userName }}\r\n <el-icon class=\"el-icon--right\">\r\n <ele-ArrowDown />\r\n </el-icon>\r\n </span>\r\n <template #dropdown>\r\n <el-dropdown-menu>\r\n <el-dropdown-item command=\"/homeMenu\">{{ $t('message.user.dropdown1') }}</el-dropdown-item>\r\n <!-- <el-dropdown-item command=\"wareHouse\">{{ $t('message.user.dropdown6') }}</el-dropdown-item>-->\r\n<!-- <el-dropdown-item command=\"/personal\">{{ $t('message.user.dropdown2') }}</el-dropdown-item>-->\r\n <!--\t\t\t\t\t<el-dropdown-item command=\"/404\">{{ $t('message.user.dropdown3') }}</el-dropdown-item>-->\r\n <!--\t\t\t\t\t<el-dropdown-item command=\"/401\">{{ $t('message.user.dropdown4') }}</el-dropdown-item>-->\r\n <el-dropdown-item divided command=\"logOut\">{{ $t('message.user.dropdown5') }}</el-dropdown-item>\r\n </el-dropdown-menu>\r\n </template>\r\n </el-dropdown>\r\n <Search ref=\"searchRef\" />\r\n </div>\r\n </div>\r\n</template>\r\n\r\n<script lang=\"ts\">\r\nimport { ref, getCurrentInstance, computed, reactive, toRefs, onMounted, defineComponent } from 'vue';\r\nimport { useRouter } from 'vue-router';\r\nimport { ElMessageBox, ElMessage } from 'element-plus';\r\nimport screenfull from 'screenfull';\r\nimport { useI18n } from 'vue-i18n';\r\nimport { storeToRefs } from 'pinia';\r\nimport { useUserInfo } from '/@/stores/userInfo';\r\nimport { useThemeConfig } from '/@/stores/themeConfig';\r\nimport other from '/@/utils/other';\r\nimport { Session, Local } from '/@/utils/storage';\r\nimport UserNews from '/@/layout/navBars/breadcrumb/userNews.vue';\r\nimport Search from '/@/layout/navBars/breadcrumb/search.vue';\r\nimport { useLoginApi } from '/@/api/login';\r\nimport { useMenuApi } from '/@/api/systemManage/menu/index';\r\n\r\nconst menuApi = useMenuApi();\r\nimport { backEndComponent, getBackEndControlRoutes, initBackEndControlRoutes, setAddRoute, setFilterMenuAndCacheTagsViewRoutes } from '../../../router/backEnd';\r\nimport { NextLoading } from '/@/utils/loading';\r\nimport { useRequestOldRoutes } from '/@/stores/requestOldRoutes';\r\nimport { dynamicRoutes } from '/@/router/route';\r\n\r\nexport default defineComponent({\r\n name: 'layoutBreadcrumbUser',\r\n components: { UserNews, Search },\r\n setup() {\r\n const { t } = useI18n();\r\n const { proxy } = <any>getCurrentInstance();\r\n const router = useRouter();\r\n const stores = useUserInfo();\r\n const storesThemeConfig = useThemeConfig();\r\n const { userInfos } = storeToRefs(stores);\r\n const { themeConfig } = storeToRefs(storesThemeConfig);\r\n const searchRef = ref();\r\n const state = reactive({\r\n isScreenfull: false,\r\n disabledI18n: 'zh-cn',\r\n disabledSize: 'large',\r\n systemName: ''\r\n });\r\n // 设置分割样式\r\n const layoutUserFlexNum = computed(() => {\r\n let num: string | number = '';\r\n const { layout, isClassicSplitMenu } = themeConfig.value;\r\n const layoutArr: string[] = ['defaults', 'columns'];\r\n if (layoutArr.includes(layout) || (layout === 'classic' && !isClassicSplitMenu)) num = '1';\r\n else num = '';\r\n return num;\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) state.isScreenfull = true;\r\n else state.isScreenfull = false;\r\n });\r\n };\r\n // 布局配置 icon 点击时\r\n const onLayoutSetingClick = () => {\r\n proxy.mittBus.emit('openSetingsDrawer');\r\n };\r\n // 下拉菜单点击时\r\n const onHandleCommandClick = (path: string) => {\r\n if (path === 'logOut') {\r\n ElMessageBox({\r\n closeOnClickModal: false,\r\n closeOnPressEscape: false,\r\n title: t('message.user.logOutTitle'),\r\n message: t('message.user.logOutMessage'),\r\n showCancelButton: true,\r\n confirmButtonText: t('message.user.logOutConfirm'),\r\n cancelButtonText: t('message.user.logOutCancel'),\r\n buttonSize: 'default',\r\n beforeClose: (action, instance, done) => {\r\n if (action === 'confirm') {\r\n instance.confirmButtonLoading = true;\r\n instance.confirmButtonText = t('message.user.logOutExit');\r\n setTimeout(() => {\r\n done();\r\n setTimeout(() => {\r\n instance.confirmButtonLoading = false;\r\n }, 300);\r\n }, 700);\r\n } else {\r\n done();\r\n }\r\n }\r\n })\r\n .then(async () => {\r\n let res = await useLoginApi().signOut();\r\n if (res.data.code === '200') {\r\n Session.clear(); // 清除缓存/token等\r\n // 使用 reload 时,不需要调用 resetRoute() 重置路由\r\n window.location.reload();\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 } else if (path === 'wareHouse') {\r\n window.open('https://gitee.com/lyt-top/vue-next-admin');\r\n } else {\r\n router.push(path);\r\n }\r\n };\r\n // 菜单搜索点击\r\n const onSearchClick = () => {\r\n searchRef.value.openSearch();\r\n };\r\n // 组件大小改变\r\n const onComponentSizeChange = (size: string) => {\r\n Local.remove('themeConfig');\r\n themeConfig.value.globalComponentSize = size;\r\n Local.set('themeConfig', themeConfig.value);\r\n initComponentSize();\r\n window.location.reload();\r\n };\r\n // 语言切换\r\n const onLanguageChange = (lang: string) => {\r\n Local.remove('themeConfig');\r\n themeConfig.value.globalI18n = lang;\r\n Local.set('themeConfig', themeConfig.value);\r\n proxy.$i18n.locale = lang;\r\n initI18n();\r\n other.useTitle();\r\n };\r\n // 设置 element plus 组件的国际化\r\n const setI18nConfig = (locale: string) => {\r\n proxy.mittBus.emit('getI18nConfig', proxy.$i18n.messages[locale]);\r\n };\r\n // 初始化言语国际化\r\n const initI18n = () => {\r\n switch (Local.get('themeConfig').globalI18n) {\r\n case 'zh-cn':\r\n state.disabledI18n = 'zh-cn';\r\n setI18nConfig('zh-cn');\r\n break;\r\n case 'en':\r\n state.disabledI18n = 'en';\r\n setI18nConfig('en');\r\n break;\r\n case 'zh-tw':\r\n state.disabledI18n = 'zh-tw';\r\n setI18nConfig('zh-tw');\r\n break;\r\n }\r\n };\r\n // 初始化全局组件大小\r\n const initComponentSize = () => {\r\n switch (Local.get('themeConfig').globalComponentSize) {\r\n case 'large':\r\n state.disabledSize = 'large';\r\n break;\r\n case 'default':\r\n state.disabledSize = 'default';\r\n break;\r\n case 'small':\r\n state.disabledSize = 'small';\r\n break;\r\n }\r\n };\r\n\r\n const getSysName = async()=>{\r\n if (window.nextLoading === undefined) NextLoading.start();\r\n if (!Session.get('token')) return false;\r\n const res = await menuApi.getMenuAdmin(Session.get('projectId') === null ? '' : Session.get('projectId'));\r\n if(res.data.code === '200'){\r\n state.systemName = res.data.data[1].project.projectName;\r\n console.log(state.systemName)\r\n }else{\r\n console.log('有问题')\r\n }\r\n }\r\n const backToMenu=()=>{\r\n router.push({ path: 'homeMenu' })\r\n }\r\n // 页面加载时\r\n onMounted(() => {\r\n if (Local.get('themeConfig')) {\r\n initI18n();\r\n initComponentSize();\r\n }\r\n getSysName()\r\n });\r\n return {\r\n userInfos,\r\n backToMenu,\r\n onLayoutSetingClick,\r\n onHandleCommandClick,\r\n onScreenfullClick,\r\n onSearchClick,\r\n onComponentSizeChange,\r\n onLanguageChange,\r\n searchRef,\r\n layoutUserFlexNum,\r\n ...toRefs(state)\r\n };\r\n }\r\n});\r\n</script>\r\n\r\n<style scoped lang=\"scss\">\r\n.layout-navbars-breadcrumb-user {\r\n display: flex;\r\n align-items: center;\r\n justify-content: space-between;\r\n\r\n .logo{\r\n height: 50px;\r\n padding: 5px 10px;\r\n display: flex;\r\n align-items: center;\r\n overflow: hidden;\r\n box-sizing: border-box;\r\n img{\r\n height: 100%;\r\n }\r\n }\r\n &-link {\r\n height: 100%;\r\n display: flex;\r\n align-items: center;\r\n white-space: nowrap;\r\n &-photo {\r\n width: 25px;\r\n height: 25px;\r\n border-radius: 100%;\r\n }\r\n }\r\n &-icon {\r\n padding: 0 10px;\r\n cursor: pointer;\r\n color: var(--next-bg-topBarColor);\r\n height: 50px;\r\n line-height: 50px;\r\n display: flex;\r\n align-items: center;\r\n &:hover {\r\n background: var(--next-color-user-hover);\r\n i {\r\n display: inline-block;\r\n animation: logoAnimation 0.3s ease-in-out;\r\n }\r\n }\r\n }\r\n ::v-deep(.el-dropdown) {\r\n color: var(--next-bg-topBarColor);\r\n }\r\n ::v-deep(.el-badge) {\r\n height: 40px;\r\n line-height: 40px;\r\n display: flex;\r\n align-items: center;\r\n }\r\n ::v-deep(.el-badge__content.is-fixed) {\r\n top: 12px;\r\n }\r\n .backBtn{\r\n font-size: 16px;\r\n cursor: pointer;\r\n margin-right: 20px;\r\n\r\n &:hover{\r\n color: #409eff;\r\n font-weight: bolder;\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/layout/navBars/breadcrumb/user.vue b/src/layout/navBars/breadcrumb/user.vue |
| | | ---- a/src/layout/navBars/breadcrumb/user.vue (revision b37d9a1f4f39fb04f48a63d11d759c673e5f4d6a) |
| | | -+++ b/src/layout/navBars/breadcrumb/user.vue (date 1660216734138) |
| | | -@@ -1,80 +1,80 @@ |
| | | - <template> |
| | | - <div class="layout-navbars-breadcrumb-user pr15" :style="{ flex: layoutUserFlexNum }"> |
| | | - <div class="logo"> |
| | | -- <img src="../../../assets/menu/companyLogo.jpg" /> |
| | | -+ <img src="../../../assets/menu/companyLogo.png" /> |
| | | - <span style="font-size: 16px; color: #333; font-weight: bolder"> | {{ systemName }}</span> |
| | | - </div> |
| | | -- <div style="display: flex;align-items:center;padding-right: 5px"> |
| | | -- <div @click="backToMenu()" class="backBtn">返回首页</div> |
| | | -- <el-dropdown :show-timeout="70" :hide-timeout="50" trigger="click" @command="onComponentSizeChange"> |
| | | -- <div class="layout-navbars-breadcrumb-user-icon"> |
| | | -- <i class="iconfont icon-ziti" :title="$t('message.user.title0')"></i> |
| | | -- </div> |
| | | -- <template #dropdown> |
| | | -- <el-dropdown-menu> |
| | | -- <el-dropdown-item command="large" :disabled="disabledSize === 'large'">{{ $t('message.user.dropdownLarge') }}</el-dropdown-item> |
| | | -- <el-dropdown-item command="default" :disabled="disabledSize === 'default'">{{ $t('message.user.dropdownDefault') }}</el-dropdown-item> |
| | | -- <el-dropdown-item command="small" :disabled="disabledSize === 'small'">{{ $t('message.user.dropdownSmall') }}</el-dropdown-item> |
| | | -- </el-dropdown-menu> |
| | | -- </template> |
| | | -- </el-dropdown> |
| | | --<!-- <el-dropdown :show-timeout="70" :hide-timeout="50" trigger="click" @command="onLanguageChange">--> |
| | | --<!-- <div class="layout-navbars-breadcrumb-user-icon">--> |
| | | --<!-- <i class="iconfont" :class="disabledI18n === 'en' ? 'icon-fuhao-yingwen' : 'icon-fuhao-zhongwen'" :title="$t('message.user.title1')"></i>--> |
| | | --<!-- </div>--> |
| | | --<!-- <template #dropdown>--> |
| | | --<!-- <el-dropdown-menu>--> |
| | | --<!-- <el-dropdown-item command="zh-cn" :disabled="disabledI18n === 'zh-cn'">简体中文</el-dropdown-item>--> |
| | | --<!-- <el-dropdown-item command="en" :disabled="disabledI18n === 'en'">English</el-dropdown-item>--> |
| | | --<!-- <el-dropdown-item command="zh-tw" :disabled="disabledI18n === 'zh-tw'">繁體中文</el-dropdown-item>--> |
| | | --<!-- </el-dropdown-menu>--> |
| | | --<!-- </template>--> |
| | | --<!-- </el-dropdown>--> |
| | | --<!-- <div class="layout-navbars-breadcrumb-user-icon" @click="onSearchClick">--> |
| | | --<!-- <el-icon :title="$t('message.user.title2')">--> |
| | | --<!-- <ele-Search />--> |
| | | --<!-- </el-icon>--> |
| | | --<!-- </div>--> |
| | | -- <!-- <div class="layout-navbars-breadcrumb-user-icon" @click="onLayoutSetingClick">--> |
| | | -- <!-- <i class="icon-skin iconfont" :title="$t('message.user.title3')"></i>--> |
| | | -- <!-- </div>--> |
| | | -- <!-- <div class="layout-navbars-breadcrumb-user-icon">--> |
| | | -- <!-- <el-popover placement="bottom" trigger="click" transition="el-zoom-in-top" :width="300" :persistent="false">--> |
| | | -- <!-- <template #reference>--> |
| | | -- <!-- <el-badge :is-dot="true">--> |
| | | -- <!-- <el-icon :title="$t('message.user.title4')">--> |
| | | -- <!-- <ele-Bell />--> |
| | | -- <!-- </el-icon>--> |
| | | -- <!-- </el-badge>--> |
| | | -- <!-- </template>--> |
| | | -- <!-- <template #default>--> |
| | | -- <!-- <UserNews />--> |
| | | -- <!-- </template>--> |
| | | -- <!-- </el-popover>--> |
| | | -- <!-- </div>--> |
| | | -- <div class="layout-navbars-breadcrumb-user-icon mr10" @click="onScreenfullClick"> |
| | | -- <i class="iconfont" :title="isScreenfull ? $t('message.user.title6') : $t('message.user.title5')" :class="!isScreenfull ? 'icon-fullscreen' : 'icon-tuichuquanping'"></i> |
| | | -- </div> |
| | | -- <el-dropdown :show-timeout="70" :hide-timeout="50" @command="onHandleCommandClick"> |
| | | -- <span class="layout-navbars-breadcrumb-user-link"> |
| | | -- <img :src="userInfos.photo" class="layout-navbars-breadcrumb-user-link-photo mr5" /> |
| | | -- {{ userInfos.userName }} |
| | | -- <el-icon class="el-icon--right"> |
| | | -- <ele-ArrowDown /> |
| | | -- </el-icon> |
| | | -- </span> |
| | | -- <template #dropdown> |
| | | -- <el-dropdown-menu> |
| | | -- <el-dropdown-item command="/homeMenu">{{ $t('message.user.dropdown1') }}</el-dropdown-item> |
| | | -- <!-- <el-dropdown-item command="wareHouse">{{ $t('message.user.dropdown6') }}</el-dropdown-item>--> |
| | | --<!-- <el-dropdown-item command="/personal">{{ $t('message.user.dropdown2') }}</el-dropdown-item>--> |
| | | -- <!-- <el-dropdown-item command="/404">{{ $t('message.user.dropdown3') }}</el-dropdown-item>--> |
| | | -- <!-- <el-dropdown-item command="/401">{{ $t('message.user.dropdown4') }}</el-dropdown-item>--> |
| | | -- <el-dropdown-item divided command="logOut">{{ $t('message.user.dropdown5') }}</el-dropdown-item> |
| | | -- </el-dropdown-menu> |
| | | -- </template> |
| | | -- </el-dropdown> |
| | | -- <Search ref="searchRef" /> |
| | | -+ <div style="display: flex; align-items: center; padding-right: 5px"> |
| | | -+ <div @click="backToMenu()" class="backBtn">返回首页</div> |
| | | -+ <el-dropdown :show-timeout="70" :hide-timeout="50" trigger="click" @command="onComponentSizeChange"> |
| | | -+ <div class="layout-navbars-breadcrumb-user-icon"> |
| | | -+ <i class="iconfont icon-ziti" :title="$t('message.user.title0')"></i> |
| | | -+ </div> |
| | | -+ <template #dropdown> |
| | | -+ <el-dropdown-menu> |
| | | -+ <el-dropdown-item command="large" :disabled="disabledSize === 'large'">{{ $t('message.user.dropdownLarge') }}</el-dropdown-item> |
| | | -+ <el-dropdown-item command="default" :disabled="disabledSize === 'default'">{{ $t('message.user.dropdownDefault') }}</el-dropdown-item> |
| | | -+ <el-dropdown-item command="small" :disabled="disabledSize === 'small'">{{ $t('message.user.dropdownSmall') }}</el-dropdown-item> |
| | | -+ </el-dropdown-menu> |
| | | -+ </template> |
| | | -+ </el-dropdown> |
| | | -+ <!-- <el-dropdown :show-timeout="70" :hide-timeout="50" trigger="click" @command="onLanguageChange">--> |
| | | -+ <!-- <div class="layout-navbars-breadcrumb-user-icon">--> |
| | | -+ <!-- <i class="iconfont" :class="disabledI18n === 'en' ? 'icon-fuhao-yingwen' : 'icon-fuhao-zhongwen'" :title="$t('message.user.title1')"></i>--> |
| | | -+ <!-- </div>--> |
| | | -+ <!-- <template #dropdown>--> |
| | | -+ <!-- <el-dropdown-menu>--> |
| | | -+ <!-- <el-dropdown-item command="zh-cn" :disabled="disabledI18n === 'zh-cn'">简体中文</el-dropdown-item>--> |
| | | -+ <!-- <el-dropdown-item command="en" :disabled="disabledI18n === 'en'">English</el-dropdown-item>--> |
| | | -+ <!-- <el-dropdown-item command="zh-tw" :disabled="disabledI18n === 'zh-tw'">繁體中文</el-dropdown-item>--> |
| | | -+ <!-- </el-dropdown-menu>--> |
| | | -+ <!-- </template>--> |
| | | -+ <!-- </el-dropdown>--> |
| | | -+ <!-- <div class="layout-navbars-breadcrumb-user-icon" @click="onSearchClick">--> |
| | | -+ <!-- <el-icon :title="$t('message.user.title2')">--> |
| | | -+ <!-- <ele-Search />--> |
| | | -+ <!-- </el-icon>--> |
| | | -+ <!-- </div>--> |
| | | -+ <!-- <div class="layout-navbars-breadcrumb-user-icon" @click="onLayoutSetingClick">--> |
| | | -+ <!-- <i class="icon-skin iconfont" :title="$t('message.user.title3')"></i>--> |
| | | -+ <!-- </div>--> |
| | | -+ <!-- <div class="layout-navbars-breadcrumb-user-icon">--> |
| | | -+ <!-- <el-popover placement="bottom" trigger="click" transition="el-zoom-in-top" :width="300" :persistent="false">--> |
| | | -+ <!-- <template #reference>--> |
| | | -+ <!-- <el-badge :is-dot="true">--> |
| | | -+ <!-- <el-icon :title="$t('message.user.title4')">--> |
| | | -+ <!-- <ele-Bell />--> |
| | | -+ <!-- </el-icon>--> |
| | | -+ <!-- </el-badge>--> |
| | | -+ <!-- </template>--> |
| | | -+ <!-- <template #default>--> |
| | | -+ <!-- <UserNews />--> |
| | | -+ <!-- </template>--> |
| | | -+ <!-- </el-popover>--> |
| | | -+ <!-- </div>--> |
| | | -+ <div class="layout-navbars-breadcrumb-user-icon mr10" @click="onScreenfullClick"> |
| | | -+ <i class="iconfont" :title="isScreenfull ? $t('message.user.title6') : $t('message.user.title5')" :class="!isScreenfull ? 'icon-fullscreen' : 'icon-tuichuquanping'"></i> |
| | | -+ </div> |
| | | -+ <el-dropdown :show-timeout="70" :hide-timeout="50" @command="onHandleCommandClick"> |
| | | -+ <span class="layout-navbars-breadcrumb-user-link"> |
| | | -+ <img :src="userInfos.photo" class="layout-navbars-breadcrumb-user-link-photo mr5" /> |
| | | -+ {{ userInfos.userName }} |
| | | -+ <el-icon class="el-icon--right"> |
| | | -+ <ele-ArrowDown /> |
| | | -+ </el-icon> |
| | | -+ </span> |
| | | -+ <template #dropdown> |
| | | -+ <el-dropdown-menu> |
| | | -+ <el-dropdown-item command="/homeMenu">{{ $t('message.user.dropdown1') }}</el-dropdown-item> |
| | | -+ <!-- <el-dropdown-item command="wareHouse">{{ $t('message.user.dropdown6') }}</el-dropdown-item>--> |
| | | -+ <!-- <el-dropdown-item command="/personal">{{ $t('message.user.dropdown2') }}</el-dropdown-item>--> |
| | | -+ <!-- <el-dropdown-item command="/404">{{ $t('message.user.dropdown3') }}</el-dropdown-item>--> |
| | | -+ <!-- <el-dropdown-item command="/401">{{ $t('message.user.dropdown4') }}</el-dropdown-item>--> |
| | | -+ <el-dropdown-item divided command="logOut">{{ $t('message.user.dropdown5') }}</el-dropdown-item> |
| | | -+ </el-dropdown-menu> |
| | | -+ </template> |
| | | -+ </el-dropdown> |
| | | -+ <Search ref="searchRef" /> |
| | | - </div> |
| | | - </div> |
| | | - </template> |
| | | -@@ -248,27 +248,27 @@ |
| | | - } |
| | | - }; |
| | | - |
| | | -- const getSysName = async()=>{ |
| | | -+ const getSysName = async () => { |
| | | - if (window.nextLoading === undefined) NextLoading.start(); |
| | | - if (!Session.get('token')) return false; |
| | | - const res = await menuApi.getMenuAdmin(Session.get('projectId') === null ? '' : Session.get('projectId')); |
| | | -- if(res.data.code === '200'){ |
| | | -+ if (res.data.code === '200') { |
| | | - state.systemName = res.data.data[1].project.projectName; |
| | | -- console.log(state.systemName) |
| | | -- }else{ |
| | | -- console.log('有问题') |
| | | -+ console.log(state.systemName); |
| | | -+ } else { |
| | | -+ console.log('有问题'); |
| | | - } |
| | | -- } |
| | | -- const backToMenu=()=>{ |
| | | -- router.push({ path: 'homeMenu' }) |
| | | -- } |
| | | -+ }; |
| | | -+ const backToMenu = () => { |
| | | -+ router.push({ path: 'homeMenu' }); |
| | | -+ }; |
| | | - // 页面加载时 |
| | | - onMounted(() => { |
| | | - if (Local.get('themeConfig')) { |
| | | - initI18n(); |
| | | - initComponentSize(); |
| | | - } |
| | | -- getSysName() |
| | | -+ getSysName(); |
| | | - }); |
| | | - return { |
| | | - userInfos, |
| | | -@@ -293,14 +293,14 @@ |
| | | - align-items: center; |
| | | - justify-content: space-between; |
| | | - |
| | | -- .logo{ |
| | | -+ .logo { |
| | | - height: 50px; |
| | | - padding: 5px 10px; |
| | | - display: flex; |
| | | - align-items: center; |
| | | - overflow: hidden; |
| | | - box-sizing: border-box; |
| | | -- img{ |
| | | -+ img { |
| | | - height: 100%; |
| | | - } |
| | | - } |
| | | -@@ -343,12 +343,12 @@ |
| | | - ::v-deep(.el-badge__content.is-fixed) { |
| | | - top: 12px; |
| | | - } |
| | | -- .backBtn{ |
| | | -+ .backBtn { |
| | | - font-size: 16px; |
| | | - cursor: pointer; |
| | | - margin-right: 20px; |
| | | - |
| | | -- &:hover{ |
| | | -+ &:hover { |
| | | - color: #409eff; |
| | | - font-weight: bolder; |
| | | - } |
| | | 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 Session.clear();\r\n window.location.href = '/';\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 Session.clear();\r\n window.location.href = '/';\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 2e0110788cc8563381d4d8050b559d8f4448c6bf) |
| | | +++ b/src/utils/request.ts (date 1660891706579) |
| | | @@ -2,8 +2,8 @@ |
| | | import { ElMessage, ElMessageBox } from 'element-plus'; |
| | | import JSONbig from 'json-bigint'; |
| | | import Cookies from 'js-cookie'; |
| | | -import {useLoginApi} from "/@/api/login"; |
| | | -import { Session, } from '/@/utils/storage'; |
| | | +import { useLoginApi } from '/@/api/login'; |
| | | +import { Session } from '/@/utils/storage'; |
| | | |
| | | // var jsonBig = require('json-bigint')({ "storeAsString": true }); |
| | | // 配置新建一个 axios 实例 |
| | | @@ -52,15 +52,21 @@ |
| | | // 对响应数据做点什么 |
| | | if (response.data.code && response.data.code === 'A0213') { |
| | | ElMessage.error('用户uid不存在'); |
| | | - Session.clear(); |
| | | - window.location.href = '/'; |
| | | + useLoginApi() |
| | | + .signOut() |
| | | + .then(() => { |
| | | + Session.clear(); |
| | | + window.location.href = '/'; |
| | | + }); |
| | | } else if (response.data.code && response.data.code === 'A0215') { |
| | | ElMessage.error('token失效'); |
| | | // logOut; |
| | | - useLoginApi().signOut().then(()=>{ |
| | | - Session.clear(); |
| | | - window.location.href = '/'; |
| | | - }) |
| | | + useLoginApi() |
| | | + .signOut() |
| | | + .then(() => { |
| | | + Session.clear(); |
| | | + window.location.href = '/'; |
| | | + }); |
| | | } |
| | | // if(response.data.code && response.data.code !== '200'){ |
| | | return Promise.resolve(response); |
| | | @@ -89,15 +95,15 @@ |
| | | if (error.message.indexOf('timeout') != -1) { |
| | | ElMessage.error('网络超时'); |
| | | setTimeout(() => { |
| | | - // Session.clear(); |
| | | + Session.clear(); |
| | | window.location.href = '/'; |
| | | }, 1000); |
| | | } else if (error.message == 'Network Error') { |
| | | ElMessage.error('网络连接错误'); |
| | | - // setTimeout(() => { |
| | | - // Session.clear(); |
| | | - // window.location.href = '/'; |
| | | - // }, 1000); |
| | | + setTimeout(() => { |
| | | + Session.clear(); |
| | | + window.location.href = '/'; |
| | | + }, 1000); |
| | | } else { |
| | | if (error.response.data) ElMessage.error(error.response.data.error); |
| | | else ElMessage.error('接口路径找不到'); |
| | | Index: src/views/safeKnowledge/bmgz/index.vue |
| | | IDEA additional info: |
| | | Subsystem: com.intellij.openapi.diff.impl.patch.BaseRevisionTextPatchEP |
| | | <+><template>\r\n <div class=\"home-container\">\r\n <iframe src=\"http://39.104.85.193/bmgz\"></iframe>\r\n </div>\r\n</template>\r\n\r\n<script>\r\nexport default {\r\n name: 'safeKnowledgeSys',\r\n props: {\r\n\r\n },\r\n data(){\r\n return{\r\n\r\n }\r\n },\r\n created() {\r\n\r\n },\r\n methods:{\r\n\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 .home-container{\r\n height: calc(100vh - 144px);\r\n box-sizing: border-box;\r\n overflow: hidden;\r\n\r\n iframe{\r\n width: 100%;\r\n height: 100%;\r\n border: none;\r\n }\r\n }\r\n</style>\r\n |
| | | Subsystem: com.intellij.openapi.diff.impl.patch.CharsetEP |
| | | <+>UTF-8 |
| | | =================================================================== |
| | | diff --git a/src/views/safeKnowledge/bmgz/index.vue b/src/views/safeKnowledge/bmgz/index.vue |
| | | --- a/src/views/safeKnowledge/bmgz/index.vue (revision 2e0110788cc8563381d4d8050b559d8f4448c6bf) |
| | | +++ b/src/views/safeKnowledge/bmgz/index.vue (date 1660874968843) |
| | | @@ -1,40 +1,31 @@ |
| | | <template> |
| | | - <div class="home-container"> |
| | | - <iframe src="http://39.104.85.193/bmgz"></iframe> |
| | | - </div> |
| | | + <div class="home-container"> |
| | | + <iframe src="http://39.104.85.193/bmgz"></iframe> |
| | | + </div> |
| | | </template> |
| | | |
| | | <script> |
| | | export default { |
| | | - name: 'safeKnowledgeSys', |
| | | - props: { |
| | | - |
| | | - }, |
| | | - data(){ |
| | | - return{ |
| | | - |
| | | - } |
| | | - }, |
| | | - created() { |
| | | - |
| | | - }, |
| | | - methods:{ |
| | | - |
| | | - } |
| | | -} |
| | | + name: 'safeKnowledgeSys', |
| | | + props: {}, |
| | | + data() { |
| | | + return {}; |
| | | + }, |
| | | + created() {}, |
| | | + methods: {} |
| | | +}; |
| | | </script> |
| | | |
| | | <!-- Add "scoped" attribute to limit CSS to this component only --> |
| | | <style scoped lang="scss"> |
| | | - .home-container{ |
| | | +.home-container { |
| | | height: calc(100vh - 144px); |
| | | box-sizing: border-box; |
| | | overflow: hidden; |
| | | - |
| | | - iframe{ |
| | | - width: 100%; |
| | | - height: 100%; |
| | | - border: none; |
| | | + iframe { |
| | | + width: 100%; |
| | | + height: 100%; |
| | | + border: none; |
| | | } |
| | | - } |
| | | +} |
| | | </style> |
| | | Index: src/views/outLink/index.vue |
| | | IDEA additional info: |
| | | Subsystem: com.intellij.openapi.diff.impl.patch.CharsetEP |
| | | <+>UTF-8 |
| | | =================================================================== |
| | | diff --git a/src/views/outLink/index.vue b/src/views/outLink/index.vue |
| | | new file mode 100644 |
| | | --- /dev/null (date 1660899047297) |
| | | +++ b/src/views/outLink/index.vue (date 1660899047297) |
| | | @@ -0,0 +1,64 @@ |
| | | +<template> |
| | | + <div class="layout-view-bg-white flex layout-view-link" :style="{ height: `calc(100vh - ${setLinkHeight}` }"> |
| | | + <a :href="currentRouteMeta.isLink" target="_blank" rel="opener" class="flex-margin"> {{ $t(currentRouteMeta.title) }}:{{ currentRouteMeta.isLink }} </a> |
| | | + </div> |
| | | +</template> |
| | | + |
| | | +<script lang="ts"> |
| | | +import { defineComponent, toRefs, reactive, computed, watch, onMounted } from 'vue'; |
| | | +import { useRoute, RouteMeta } from 'vue-router'; |
| | | +import { storeToRefs } from 'pinia'; |
| | | +import { useThemeConfig } from '/@/stores/themeConfig'; |
| | | + |
| | | +// 定义接口来定义对象的类型 |
| | | +interface LinkViewState { |
| | | + currentRouteMeta: { |
| | | + isLink: string; |
| | | + title: string; |
| | | + }; |
| | | +} |
| | | +interface LinkViewRouteMeta extends RouteMeta { |
| | | + isLink: string; |
| | | + title: string; |
| | | +} |
| | | + |
| | | +export default defineComponent({ |
| | | + name: 'index', |
| | | + setup() { |
| | | + const storesThemeConfig = useThemeConfig(); |
| | | + const { themeConfig } = storeToRefs(storesThemeConfig); |
| | | + const route = useRoute(); |
| | | + const state = reactive<LinkViewState>({ |
| | | + currentRouteMeta: { |
| | | + isLink: '', |
| | | + title: '' |
| | | + } |
| | | + }); |
| | | + // 设置 link 的高度 |
| | | + const setLinkHeight = computed(() => { |
| | | + let { isTagsview } = themeConfig.value; |
| | | + if (isTagsview) return `115px`; |
| | | + else return `80px`; |
| | | + }); |
| | | + // 监听路由的变化,设置内容 |
| | | + watch( |
| | | + () => route.path, |
| | | + () => { |
| | | + state.currentRouteMeta = <LinkViewRouteMeta>route.meta; |
| | | + }, |
| | | + { |
| | | + immediate: true |
| | | + } |
| | | + ); |
| | | + |
| | | + onMounted(() => { |
| | | + window.open(state.currentRouteMeta.isLink as string, '_blank'); |
| | | + }); |
| | | + |
| | | + return { |
| | | + setLinkHeight, |
| | | + ...toRefs(state) |
| | | + }; |
| | | + } |
| | | +}); |
| | | +</script> |
| | | Index: src/views/loginPage/component/accountLogin.vue |
| | | IDEA additional info: |
| | | Subsystem: com.intellij.openapi.diff.impl.patch.BaseRevisionTextPatchEP |
| | | <+><template>\r\n <el-form size=\"large\" class=\"login-content-form\">\r\n <el-form-item class=\"login-animation1\">\r\n <el-input type=\"text\" :placeholder=\"$t('message.account.accountPlaceholder1')\" v-model=\"ruleForm.username\" clearable autocomplete=\"off\" size=\"large\">\r\n <template #prefix>\r\n <el-icon class=\"el-input__icon\" style=\"margin-right: 20px\"><img src=\"../../../assets/loginPage/login_icon_user.png\" style=\"width: 24px; height: 24px\" /></el-icon>\r\n </template>\r\n </el-input>\r\n </el-form-item>\r\n <el-form-item class=\"login-animation2\">\r\n <el-input :type=\"isShowPassword ? 'text' : 'password'\" :placeholder=\"$t('message.account.accountPlaceholder2')\" v-model=\"ruleForm.password\" autocomplete=\"off\" size=\"large\" @keyup.enter.native=\"onSignIn\">\r\n <template #prefix>\r\n <el-icon class=\"el-input__icon\" style=\"margin-right: 20px\"><img src=\"../../../assets/loginPage/login_icon_password.png\" style=\"width: 24px; height: 24px\" /></el-icon>\r\n </template>\r\n <template #suffix>\r\n <i class=\"iconfont el-input__icon login-content-password\" :class=\"isShowPassword ? 'icon-yincangmima' : 'icon-xianshimima'\" @click=\"isShowPassword = !isShowPassword\"> </i>\r\n </template>\r\n </el-input>\r\n </el-form-item>\r\n <el-form-item class=\"login-animation4 codeDeal\">\r\n <el-checkbox v-model=\"saveCode\" label=\"记住密码\" size=\"large\" />\r\n <span class=\"forgetCode\">忘记密码?</span>\r\n </el-form-item>\r\n <el-form-item class=\"login-animation4\">\r\n <el-button type=\"primary\" class=\"login-content-submit\" round @click=\"onSignIn\" :loading=\"loading.signIn\">\r\n <span>登录系统</span>\r\n </el-button>\r\n </el-form-item>\r\n </el-form>\r\n</template>\r\n\r\n<script lang=\"ts\">\r\nimport { toRefs, reactive, defineComponent, computed } from 'vue';\r\nimport { useRoute, useRouter } from 'vue-router';\r\nimport { ElMessage } from 'element-plus';\r\nimport { useI18n } from 'vue-i18n';\r\nimport Cookies from 'js-cookie';\r\nimport { storeToRefs } from 'pinia';\r\nimport { useThemeConfig } from '/@/stores/themeConfig';\r\nimport { initFrontEndControlRoutes } from '/@/router/frontEnd';\r\nimport { initBackEndControlRoutes } from '/@/router/backEnd';\r\nimport { Session } from '/@/utils/storage';\r\nimport { formatAxis } from '/@/utils/formatTime';\r\nimport { NextLoading } from '/@/utils/loading';\r\nimport { useLoginApi } from '/@/api/login';\r\nimport { useUserInfo } from '/@/stores/userInfo';\r\n\r\nexport default defineComponent({\r\n name: 'accountLogin',\r\n setup() {\r\n const { t } = useI18n();\r\n const userInfo = useUserInfo();\r\n const route = useRoute();\r\n const router = useRouter();\r\n const state = reactive({\r\n isShowPassword: false,\r\n ruleForm: {\r\n username: '',\r\n password: ''\r\n },\r\n loading: {\r\n signIn: false\r\n }\r\n });\r\n // 时间获取\r\n const currentTime = computed(() => {\r\n return formatAxis(new Date());\r\n });\r\n // 登录\r\n const onSignIn = async () => {\r\n state.loading.signIn = true;\r\n // 存储 token 到浏览器缓存\r\n let res = await useLoginApi().signIn(state.ruleForm);\r\n if (res.data.code === '200') {\r\n await userInfo.setUserInfos(res.data.data);\r\n Cookies.set('token', res.data.data.accessToken);\r\n Cookies.set('projectId', '');\r\n Cookies.set('uid', res.data.data.uid);\r\n // Session.set('token', res.data.data.accessToken);\r\n // Session.set('projectId', '');\r\n // Session.set('uid', res.data.data.uid);\r\n await signInSuccess();\r\n } else {\r\n state.loading.signIn = false;\r\n ElMessage({\r\n type: 'warning',\r\n message: res.data.msg\r\n });\r\n }\r\n state.loading.signIn = false;\r\n // Session.set('token', Math.random().toString(36).substr(0));\r\n // // 模拟数据,对接接口时,记得删除多余代码及对应依赖的引入。用于 `/src/stores/userInfo.ts` 中不同用户登录判断(模拟数据)\r\n // Cookies.set('userName', state.ruleForm.username);\r\n // if (!themeConfig.value.isRequestRoutes) {\r\n // \t// 前端控制路由,2、请注意执行顺序\r\n // \tawait initFrontEndControlRoutes();\r\n // \tsignInSuccess();\r\n // } else {\r\n // \t// 模拟后端控制路由,isRequestRoutes 为 true,则开启后端控制路由\r\n // \t// 添加完动态路由,再进行 router 跳转,否则可能报错 No match found for location with path \"/\"\r\n // \tawait initBackEndControlRoutes();\r\n // \t// 执行完 initBackEndControlRoutes,再执行 signInSuccess\r\n // \tsignInSuccess();\r\n // }\r\n };\r\n // 登录成功后的跳转\r\n const signInSuccess = async () => {\r\n // 初始化登录成功时间问候语\r\n let currentTimeInfo = currentTime.value;\r\n // 登录成功,跳到转首页\r\n // 如果是复制粘贴的路径,非首页/登录页,那么登录成功后重定向到对应的路径中\r\n if (route.query?.redirect) {\r\n router.push('/newMenu');\r\n // router.push({\r\n // \tpath: <string>route.query?.redirect,\r\n // \tquery: Object.keys(<string>route.query?.params).length > 0 ? JSON.parse(<string>route.query?.params) : '',\r\n // });\r\n } else {\r\n router.push('/loginPage');\r\n }\r\n state.loading.signIn = true;\r\n const signInText = t('message.signInText');\r\n ElMessage.success(`${currentTimeInfo},${signInText}`);\r\n // 登录成功提示\r\n // 关闭 loading\r\n // 添加 loading,防止第一次进入界面时出现短暂空白\r\n // NextLoading.start();\r\n };\r\n return {\r\n onSignIn,\r\n ...toRefs(state)\r\n };\r\n }\r\n});\r\n</script>\r\n\r\n<style scoped lang=\"scss\">\r\n.login-content-form {\r\n margin-top: 40px;\r\n width: 100%;\r\n\r\n .el-input::v-deep .el-input__wrapper {\r\n height: 56px;\r\n border-radius: 28px;\r\n padding: 0 30px;\r\n background: #f2f2f2;\r\n &:focus-within {\r\n border: 1px solid #2053d7;\r\n }\r\n }\r\n @for $i from 1 through 4 {\r\n .login-animation#{$i} {\r\n opacity: 0;\r\n animation-name: error-num;\r\n animation-duration: 0.5s;\r\n animation-fill-mode: forwards;\r\n animation-delay: calc($i/10) + s;\r\n }\r\n }\r\n .codeDeal::v-deep .el-form-item__content {\r\n display: flex;\r\n justify-content: space-between;\r\n\r\n .forgetCode {\r\n color: #2053d7;\r\n cursor: pointer;\r\n }\r\n }\r\n .login-content-password {\r\n width: 100%;\r\n display: inline-block;\r\n cursor: pointer;\r\n &:hover {\r\n color: #909399;\r\n }\r\n }\r\n .login-content-code {\r\n width: 100%;\r\n padding: 0;\r\n font-weight: bold;\r\n letter-spacing: 5px;\r\n }\r\n .login-content-submit {\r\n width: 100%;\r\n height: 56px;\r\n font-size: 16px;\r\n border-radius: 28px;\r\n letter-spacing: 4px;\r\n font-weight: 300;\r\n margin-top: 15px;\r\n background: #2053d7;\r\n transition: 0.3s;\r\n &:hover {\r\n letter-spacing: 6px;\r\n background: #4e7aec;\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/loginPage/component/accountLogin.vue b/src/views/loginPage/component/accountLogin.vue |
| | | --- a/src/views/loginPage/component/accountLogin.vue (revision 2e0110788cc8563381d4d8050b559d8f4448c6bf) |
| | | +++ b/src/views/loginPage/component/accountLogin.vue (date 1660870867919) |
| | | @@ -109,15 +109,16 @@ |
| | | let currentTimeInfo = currentTime.value; |
| | | // 登录成功,跳到转首页 |
| | | // 如果是复制粘贴的路径,非首页/登录页,那么登录成功后重定向到对应的路径中 |
| | | - if (route.query?.redirect) { |
| | | - router.push('/newMenu'); |
| | | - // router.push({ |
| | | - // path: <string>route.query?.redirect, |
| | | - // query: Object.keys(<string>route.query?.params).length > 0 ? JSON.parse(<string>route.query?.params) : '', |
| | | - // }); |
| | | - } else { |
| | | - router.push('/loginPage'); |
| | | - } |
| | | + // if (route.query?.redirect) { |
| | | + // debugger; |
| | | + router.push('/newMenu'); |
| | | + // router.push({ |
| | | + // path: <string>route.query?.redirect, |
| | | + // query: Object.keys(<string>route.query?.params).length > 0 ? JSON.parse(<string>route.query?.params) : '', |
| | | + // }); |
| | | + // } else { |
| | | + // router.push('/loginPage'); |
| | | + // } |
| | | state.loading.signIn = true; |
| | | const signInText = t('message.signInText'); |
| | | ElMessage.success(`${currentTimeInfo},${signInText}`); |
| | | Index: src/views/intellectInspect/inspectIndex/components/inspectRecordDialog.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 v-model=\"ifShowInspectTaskDialog\" :title=\"title\" width=\"60%\">\r\n <el-form :model=\"inspectTaskForm\" label-width=\"120px\" ref=\"inspectTaskFormRef\">\r\n <el-row>\r\n <el-col :span=\"12\" style=\"margin-bottom: 20px\">\r\n <el-form-item label=\"任务名称\" prop=\"unitName\">\r\n <el-input v-model=\"inspectTaskForm.taskName\" :disabled=\"!inspectPointConfirm\" class=\"input-add\" placeholder=\"请填写任务名称\"> </el-input>\r\n </el-form-item>\r\n </el-col>\r\n <el-col :span=\"12\" style=\"margin-bottom: 20px\">\r\n <el-form-item label=\"任务类型\" prop=\"taskType\">\r\n <el-select v-model=\"inspectTaskForm.taskType\" :disabled=\"!inspectPointConfirm\" class=\"input-add\" placeholder=\"请选择任务类型\">\r\n <el-option v-for=\"item in workTypeList\" :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 :span=\"12\" style=\"margin-bottom: 20px\">\r\n <el-form-item label=\"巡检部门\" prop=\"execDepId\">\r\n <el-cascader @change=\"giveClassGroup\" :disabled=\"!inspectPointConfirm\" placeholder=\"请选择巡检部门\" :options=\"departmentList\" :props=\"{ emitPath: false, checkStrictly: true, value: 'depId', label: 'depName' }\" clearable filterable class=\"input-add\" v-model=\"inspectTaskForm.execDepId\"> </el-cascader>\r\n </el-form-item>\r\n </el-col>\r\n <el-col :span=\"12\" style=\"margin-bottom: 20px\">\r\n <el-form-item label=\"巡检班组\" prop=\"execClassgroupId\">\r\n <el-select v-model=\"inspectTaskForm.execClassgroupId\" :disabled=\"!inspectPointConfirm\" placeholder=\"请选择巡检班组\" class=\"input-add\">\r\n <el-option v-for=\"item in classGroup\" :key=\"item.id\" :value=\"item.id\" :label=\"item.groupName\"></el-option>\r\n </el-select>\r\n </el-form-item>\r\n </el-col>\r\n <el-col :span=\"12\" style=\"margin-bottom: 20px\">\r\n <el-form-item label=\"任务开始时间\" prop=\"startTime\">\r\n <el-date-picker v-model=\"inspectTaskForm.startTime\" :disabled=\"!inspectPointConfirm\" placeholder=\"请选择任务开始时间\" type=\"datetime\" format=\"YYYY/MM/DD HH:mm:ss\" value-format=\"YYYY-MM-DD HH:mm:ss\" class=\"input-add\" />\r\n </el-form-item>\r\n </el-col>\r\n </el-row>\r\n\r\n <div class=\"checkUnit-point\">\r\n <el-tabs class=\"active\" v-model=\"activeName\">\r\n <el-tab-pane label=\"巡检链\" name=\"inspectChain\">\r\n <el-table :data=\"inspectTaskForm.points\" fit style=\"width: 100%\">\r\n <el-table-column type=\"index\" label=\"序号\" width=\"60\" />\r\n <el-table-column prop=\"region\" label=\"巡检点\" show-overflow-tooltip align=\"center\"></el-table-column>\r\n <el-table-column prop=\"quotaContent\" label=\"指标作业\" show-overflow-tooltip align=\"center\"></el-table-column>\r\n <el-table-column prop=\"secondReferenceResult\" label=\"参数值\" show-overflow-tooltip align=\"center\">\r\n <template #default=\"scope\">\r\n <div :style=\"{color: scope.row.reportResult==1?'#ff0000':'#409eff'}\">\r\n {{scope.row.dataReportType==1?'无':scope.row.secondReferenceResult}}\r\n </div>\r\n </template>\r\n </el-table-column>\r\n <el-table-column prop=\"quotaUnit\" label=\"指标单位\" show-overflow-tooltip align=\"center\"></el-table-column>\r\n <el-table-column prop=\"reportResult\" label=\"结果\" show-overflow-tooltip align=\"center\">\r\n <template #default=\"scope\">\r\n <div :style=\"{color: scope.row.reportResult==1?'#ff0000':'#409eff'}\">\r\n {{scope.row.reportResult==0?'正常':(scope.row.reportResult==1?'异常':'无')}}\r\n </div>\r\n </template>\r\n </el-table-column>\r\n <!-- <el-table-column label=\"操作\" width=\"150\" align=\"center\">-->\r\n <!-- <template #default=\"scope\">-->\r\n <!-- <el-button size=\"small\" text type=\"danger\" @click=\"onDelCheckUnit(scope.$index, scope.row)\">删除</el-button>-->\r\n <!-- </template>-->\r\n <!-- </el-table-column>-->\r\n </el-table>\r\n </el-tab-pane>\r\n </el-tabs>\r\n </div>\r\n <div align=\"right\" v-show=\"inspectPointConfirm\">\r\n <el-button type=\"warning\" @click=\"inspectPointDialog = false\" size=\"default\" plain>取消</el-button>\r\n <el-button type=\"primary\" @click=\"submitInspectTask()\" size=\"default\">确认</el-button>\r\n </div>\r\n </el-form>\r\n </el-dialog>\r\n </div>\r\n</template>\r\n\r\n<script lang=\"ts\">\r\nimport { reactive, toRefs, ref } from 'vue';\r\nimport { RFIDApi } from '/@/api/intellectInspectSystem/RFID';\r\nimport { ElMessage } from 'element-plus/es';\r\nimport { inspectTaskApi } from '/@/api/intellectInspectSystem/inspectTask';\r\nimport { facilityAreaApi } from '/@/api/intellectInspectSystem/facilityAreaManage';\r\nimport { inspectRecordApi } from '/@/api/intellectInspectSystem/inspectRecord';\r\ninterface dataState {\r\n title: string;\r\n pointTitle: string;\r\n activeName: string;\r\n inspectPointConfirm: boolean;\r\n inspectPointDialog: boolean;\r\n ifShowInspectTaskDialog: boolean;\r\n inspectPointForm: inspectPointForm;\r\n inspectTaskForm: {\r\n execClassgroupId: number | null;\r\n execDepId: number | null;\r\n id: number | null;\r\n startTime: string | null;\r\n taskName: string | null;\r\n taskType: number | null;\r\n validTime: string | null;\r\n points: Array<inspectPointForm>;\r\n };\r\n workTypeList: [];\r\n departmentList: [];\r\n timeList: [];\r\n dataReportTypeList: Array<dataReport>;\r\n firstReferenceValueList: Array<dataReport>;\r\n secondReferenceSignList: Array<dataReport>;\r\n thirdReferenceSignList: Array<dataReport>;\r\n classGroupList: Array<classGroup>;\r\n classGroup: Array<classGroup>;\r\n quotaList: Array<quota>;\r\n inspectPointAllList: Array<inspectPointAllState>;\r\n}\r\ninterface inspectPointAllState {\r\n id: number;\r\n code: string;\r\n regionId: number;\r\n rfidId: number;\r\n}\r\ninterface classGroup {\r\n depId: number;\r\n}\r\ninterface dataReport {\r\n id: number;\r\n name: string;\r\n}\r\ninterface quota {\r\n id: number;\r\n type: string;\r\n unit: string;\r\n}\r\ninterface inspectPointForm {\r\n id: number | null;\r\n unitId: number | null;\r\n unitUuid: string | null;\r\n pointId: number | null;\r\n pointUuid: string | null;\r\n regionId: number | null;\r\n regionUuid: string | null;\r\n rfidId: number | null;\r\n quotaId: number | null;\r\n quotaUnit: number | null;\r\n reportResult: number | null\r\n secondReferenceResult: number |null;\r\n execSequence: number | null;\r\n dataReportType: number | null;\r\n firstReferenceValue: number | null;\r\n secondReferenceSign: number | null;\r\n secondReferenceValue: number | null;\r\n thirdReferenceSign: number | null;\r\n thirdReferenceValue: number | null;\r\n}\r\nexport default {\r\n name: 'inspectTaskDialog',\r\n setup(props: any, context: any) {\r\n const inspectTaskFormRef = ref();\r\n const data = reactive<dataState>({\r\n title: '',\r\n pointTitle: '',\r\n activeName: 'inspectChain',\r\n inspectPointConfirm: false,\r\n inspectPointDialog: false,\r\n ifShowInspectTaskDialog: false,\r\n inspectPointForm: {\r\n id: null,\r\n unitId: null,\r\n unitUuid: null,\r\n pointId: null,\r\n pointUuid: null,\r\n regionId: null,\r\n regionUuid: null,\r\n rfidId: null,\r\n quotaId: null,\r\n quotaUnit: null,\r\n execSequence: null,\r\n secondReferenceResult:null,\r\n reportResult: null,\r\n dataReportType: null,\r\n firstReferenceValue: null,\r\n secondReferenceSign: null,\r\n secondReferenceValue: null,\r\n thirdReferenceSign: null,\r\n thirdReferenceValue: null\r\n },\r\n inspectTaskForm: {\r\n execClassgroupId: null,\r\n execDepId: null,\r\n id: null,\r\n points: [],\r\n startTime: null,\r\n taskName: null,\r\n taskType: null,\r\n validTime: null\r\n },\r\n workTypeList: [],\r\n departmentList: [],\r\n timeList: [],\r\n classGroupList: [],\r\n classGroup: [],\r\n quotaList: [],\r\n inspectPointAllList: [],\r\n dataReportTypeList: [\r\n { id: 1, name: '选择' },\r\n { id: 2, name: '填空' },\r\n { id: 3, name: '选择并填空' }\r\n ],\r\n firstReferenceValueList: [\r\n { id: 0, name: '正常' },\r\n { id: 1, name: '异常' }\r\n ],\r\n secondReferenceSignList: [\r\n { id: 1, name: '>' },\r\n { id: 2, name: '>=' }\r\n ],\r\n thirdReferenceSignList: [\r\n { id: 3, name: '<' },\r\n { id: 4, name: '<=' }\r\n ]\r\n });\r\n\r\n const openInspectPointDialog = (type: string, item: {}) => {\r\n data.inspectPointDialog = true;\r\n if (type === '新增') {\r\n data.pointTitle = '新增巡检点';\r\n data.inspectPointForm = {\r\n id: null,\r\n unitId: null,\r\n unitUuid: null,\r\n pointId: null,\r\n pointUuid: null,\r\n regionId: null,\r\n regionUuid: null,\r\n rfidId: null,\r\n quotaId: null,\r\n quotaUnit: null,\r\n reportResult: null,\r\n execSequence: null,\r\n secondReferenceResult:null,\r\n dataReportType: null,\r\n firstReferenceValue: null,\r\n secondReferenceSign: null,\r\n secondReferenceValue: null,\r\n thirdReferenceSign: null,\r\n thirdReferenceValue: null\r\n };\r\n } else {\r\n data.pointTitle = '修改巡检点';\r\n data.inspectPointForm = JSON.parse(JSON.stringify(item));\r\n }\r\n };\r\n\r\n const showInspectRecordDialog = (type: string, item: { id: number; uuid: string }, workTypeList: [], department: [], timeType: [], classGroupList: [], quotaList: [], inspectPointAllList: []) => {\r\n data.quotaList = JSON.parse(JSON.stringify(quotaList));\r\n data.timeList = JSON.parse(JSON.stringify(timeType));\r\n data.inspectPointAllList = JSON.parse(JSON.stringify(inspectPointAllList));\r\n data.workTypeList = JSON.parse(JSON.stringify(workTypeList));\r\n data.departmentList = JSON.parse(JSON.stringify(department));\r\n data.classGroupList = JSON.parse(JSON.stringify(classGroupList));\r\n data.ifShowInspectTaskDialog = true;\r\n data.inspectPointConfirm = false;\r\n data.title = '查看巡检任务';\r\n inspectRecordApi()\r\n .getInspectRecordById({ id: item.id, uuid: item.uuid })\r\n .then((res) => {\r\n if (res.data.code === '200') {\r\n data.inspectTaskForm.execDepId = res.data.data.execDepId;\r\n giveClassGroup();\r\n data.inspectTaskForm = JSON.parse(JSON.stringify(res.data.data));\r\n console.log(data.inspectTaskForm,'this data')\r\n } else {\r\n }\r\n })\r\n .catch((error) => {});\r\n };\r\n\r\n // 格式化表格数据\r\n // const toRefer =(row, column, cellValue, index)=>{\r\n // return row.secondReferenceResult==0?'正常':(row.reportResult==1?'异常':'无')\r\n // }\r\n\r\n\r\n const submitInspectPoint = async () => {\r\n if (data.title === '新增巡检任务' && data.pointTitle === '新增巡检点') {\r\n if (data.inspectTaskForm.points.length === 0) {\r\n data.inspectPointForm.execSequence = 1;\r\n } else {\r\n data.inspectPointForm.execSequence = (data.inspectTaskForm.points[data.inspectTaskForm.points.length - 1].execSequence as number) + 1;\r\n }\r\n data.inspectTaskForm.points.push(data.inspectPointForm);\r\n data.inspectPointDialog = false;\r\n } else if (data.title === '新增巡检任务' && data.pointTitle === '修改巡检点') {\r\n let result = data.inspectTaskForm.points.findIndex((item) => item.id === data.inspectPointForm.id);\r\n data.inspectTaskForm.points[result] = data.inspectPointForm;\r\n data.inspectPointDialog = false;\r\n } else if (data.title === '修改巡检任务' && data.pointTitle === '新增巡检点') {\r\n data.inspectPointForm.unitId = data.inspectTaskForm.id;\r\n if (data.inspectTaskForm.points.length === 0) {\r\n data.inspectPointForm.execSequence = 1;\r\n } else {\r\n data.inspectPointForm.execSequence = (data.inspectTaskForm.points[data.inspectTaskForm.points.length - 1].execSequence as number) + 1;\r\n }\r\n let res = await inspectTaskApi().addChainOfInspectTask(data.inspectPointForm);\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 data.inspectPointDialog = false;\r\n data.inspectTaskForm.points.push(data.inspectPointForm);\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 data.inspectPointForm.unitId = data.inspectTaskForm.id;\r\n let res = await inspectTaskApi().modChainOfInspectTask(data.inspectPointForm);\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 let result = data.inspectTaskForm.points.findIndex((item) => item.id === data.inspectPointForm.id);\r\n data.inspectTaskForm.points[result] = data.inspectPointForm;\r\n data.inspectPointDialog = false;\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 deleteFlow = async (index: number, item: { id: number }) => {\r\n if (data.pointTitle === '新增巡检点') {\r\n data.inspectTaskForm.points.splice(index, 1);\r\n } else {\r\n let res = await inspectTaskApi().deleteChainOfInspectTask({ id: item.id, unitId: data.inspectTaskForm.id });\r\n if (res.data.code === '200') {\r\n data.inspectTaskForm.points.splice(index, 1);\r\n ElMessage({\r\n type: 'success',\r\n message: '巡检点删除成功'\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\r\n const giveRegionAndRFID = () => {\r\n data.inspectPointForm.regionId = data.inspectPointAllList.find((item) => item.id === data.inspectPointForm.pointId)?.regionId as number;\r\n data.inspectPointForm.rfidId = data.inspectPointAllList.find((item) => item.id === data.inspectPointForm.pointId)?.rfidId as number;\r\n };\r\n\r\n const giveClassGroup = () => {\r\n data.inspectTaskForm.execClassgroupId = null;\r\n data.classGroup = data.classGroupList.filter((item) => item.depId === data.inspectTaskForm.execDepId);\r\n };\r\n\r\n const giveQuotaUnit = () => {\r\n data.inspectPointForm.quotaUnit = data.quotaList.find((item) => item.id === data.inspectPointForm.quotaId)?.unit as string;\r\n };\r\n const submitInspectTask = () => {\r\n inspectTaskFormRef.value.validate(async (valid: Boolean) => {\r\n if (valid) {\r\n if (data.title === '新增巡检任务') {\r\n let res = await inspectTaskApi().addInspectTask(data.inspectTaskForm);\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 data.ifShowInspectTaskDialog = false;\r\n context.emit('refreshInspectTask');\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 inspectTaskApi().modInspectTask(data.inspectTaskForm);\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 data.ifShowInspectTaskDialog = false;\r\n context.emit('refreshInspectTask');\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(data),\r\n inspectTaskFormRef,\r\n deleteFlow,\r\n // toRefer,\r\n giveQuotaUnit,\r\n giveClassGroup,\r\n submitInspectTask,\r\n submitInspectPoint,\r\n giveRegionAndRFID,\r\n showInspectRecordDialog,\r\n openInspectPointDialog\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:deep(.el-date-editor) {\r\n width: 100%;\r\n}\r\n</style>\r\n |
| | | Subsystem: com.intellij.openapi.diff.impl.patch.CharsetEP |
| | | <+>UTF-8 |
| | | =================================================================== |
| | | diff --git a/src/views/intellectInspect/inspectIndex/components/inspectRecordDialog.vue b/src/views/intellectInspect/inspectIndex/components/inspectRecordDialog.vue |
| | | --- a/src/views/intellectInspect/inspectIndex/components/inspectRecordDialog.vue (revision 2e0110788cc8563381d4d8050b559d8f4448c6bf) |
| | | +++ b/src/views/intellectInspect/inspectIndex/components/inspectRecordDialog.vue (date 1660874576126) |
| | | @@ -43,16 +43,16 @@ |
| | | <el-table-column prop="quotaContent" label="指标作业" show-overflow-tooltip align="center"></el-table-column> |
| | | <el-table-column prop="secondReferenceResult" label="参数值" show-overflow-tooltip align="center"> |
| | | <template #default="scope"> |
| | | - <div :style="{color: scope.row.reportResult==1?'#ff0000':'#409eff'}"> |
| | | - {{scope.row.dataReportType==1?'无':scope.row.secondReferenceResult}} |
| | | + <div :style="{ color: scope.row.reportResult == 1 ? '#ff0000' : '#409eff' }"> |
| | | + {{ scope.row.dataReportType == 1 ? '无' : scope.row.secondReferenceResult }} |
| | | </div> |
| | | </template> |
| | | </el-table-column> |
| | | <el-table-column prop="quotaUnit" label="指标单位" show-overflow-tooltip align="center"></el-table-column> |
| | | <el-table-column prop="reportResult" label="结果" show-overflow-tooltip align="center"> |
| | | <template #default="scope"> |
| | | - <div :style="{color: scope.row.reportResult==1?'#ff0000':'#409eff'}"> |
| | | - {{scope.row.reportResult==0?'正常':(scope.row.reportResult==1?'异常':'无')}} |
| | | + <div :style="{ color: scope.row.reportResult == 1 ? '#ff0000' : '#409eff' }"> |
| | | + {{ scope.row.reportResult == 0 ? '正常' : scope.row.reportResult == 1 ? '异常' : '无' }} |
| | | </div> |
| | | </template> |
| | | </el-table-column> |
| | | @@ -140,8 +140,8 @@ |
| | | rfidId: number | null; |
| | | quotaId: number | null; |
| | | quotaUnit: number | null; |
| | | - reportResult: number | null |
| | | - secondReferenceResult: number |null; |
| | | + reportResult: number | null; |
| | | + secondReferenceResult: number | null; |
| | | execSequence: number | null; |
| | | dataReportType: number | null; |
| | | firstReferenceValue: number | null; |
| | | @@ -173,7 +173,7 @@ |
| | | quotaId: null, |
| | | quotaUnit: null, |
| | | execSequence: null, |
| | | - secondReferenceResult:null, |
| | | + secondReferenceResult: null, |
| | | reportResult: null, |
| | | dataReportType: null, |
| | | firstReferenceValue: null, |
| | | @@ -235,7 +235,7 @@ |
| | | quotaUnit: null, |
| | | reportResult: null, |
| | | execSequence: null, |
| | | - secondReferenceResult:null, |
| | | + secondReferenceResult: null, |
| | | dataReportType: null, |
| | | firstReferenceValue: null, |
| | | secondReferenceSign: null, |
| | | @@ -266,7 +266,7 @@ |
| | | data.inspectTaskForm.execDepId = res.data.data.execDepId; |
| | | giveClassGroup(); |
| | | data.inspectTaskForm = JSON.parse(JSON.stringify(res.data.data)); |
| | | - console.log(data.inspectTaskForm,'this data') |
| | | + console.log(data.inspectTaskForm, 'this data'); |
| | | } else { |
| | | } |
| | | }) |
| | | @@ -278,7 +278,6 @@ |
| | | // return row.secondReferenceResult==0?'正常':(row.reportResult==1?'异常':'无') |
| | | // } |
| | | |
| | | - |
| | | const submitInspectPoint = async () => { |
| | | if (data.title === '新增巡检任务' && data.pointTitle === '新增巡检点') { |
| | | if (data.inspectTaskForm.points.length === 0) { |
| | | Index: src/views/newHome/index.vue |
| | | IDEA additional info: |
| | | Subsystem: com.intellij.openapi.diff.impl.patch.BaseRevisionTextPatchEP |
| | | <+><template>\r\n <div class=\"login-container\" :key=\"once\">\r\n <div class=\"topPanel\">\r\n\r\n </div>\r\n <div class=\"topPanelBg\">\r\n\r\n </div>\r\n <div class=\"topPanelCont\">\r\n <div class=\"topLogo\">\r\n <img src=\"../../assets/newMenu/toplogo.png\" />\r\n </div>\r\n <div class=\"userInfo\">\r\n <div @click=\"onScreenfullClick\" style=\"margin-right: 15px;cursor: pointer\">\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 class=\"loginOut\" @click=\"onLoginOut\">退出登录</div>\r\n <span></span>\r\n <div class=\"avator\">\r\n <img src=\"../../assets/menu/admin.png\" />\r\n <div>admin</div>\r\n </div>\r\n </div>\r\n </div>\r\n <div class=\"leftCont\">\r\n\r\n </div>\r\n <div class=\"topCont\">\r\n <div class=\"topInfo\">\r\n <div class=\"topTit\">\r\n 新疆国泰新华<br/>安全风险预警监测系统\r\n </div>\r\n <div class=\"topTime\">\r\n <div class=\"time\">\r\n {{time}}\r\n </div>\r\n <span></span>\r\n <div class=\"today\">\r\n <div>{{date}}</div>\r\n <div><span>{{weekDay}}</span><span>{{dayTime}}</span></div>\r\n </div>\r\n </div>\r\n </div>\r\n <div class=\"line\">\r\n\r\n </div>\r\n </div>\r\n <div class=\"menuGrid\">\r\n <div class=\"gridCont\">\r\n <div class=\"grid-content grid-content-1 cont-bg-1\" v-throttle @click=\"toRiskPlatform\">\r\n <div class=\"toplayer\">\r\n <div>\r\n <img class=\"iconImg\" src=\"../../assets/newMenu/icon1.png\"/>\r\n <div>\r\n <div class=\"itemTit1\">安全风险综合预警<br/>预报平台</div>\r\n <div class=\"enTit1\">Security risk comprehensive early warning and forecast platform</div>\r\n </div>\r\n </div>\r\n </div>\r\n <img class=\"bgImg1\" src=\"../../assets/newMenu/card-1.png\" />\r\n </div>\r\n <div class=\"grid-content cont-bg-1\" v-throttle @click=\"render('2')\">\r\n <div class=\"toplayer\">\r\n <img class=\"iconImg\" src=\"../../assets/newMenu/icon2.png\" />\r\n <div>\r\n <div class=\"itemTit\">双重预防系统</div>\r\n <div class=\"enTit\">Double prevention</div>\r\n </div>\r\n </div>\r\n <img class=\"bgImg\" src=\"../../assets/newMenu/card-4.png\" />\r\n </div>\r\n <div class=\"grid-content cont-bg-1\" v-throttle @click=\"render('4')\">\r\n <div class=\"toplayer\">\r\n <img class=\"iconImg\" src=\"../../assets/newMenu/icon3.png\" />\r\n <div>\r\n <div class=\"itemTit\">智能巡检系统</div>\r\n <div class=\"enTit\">Intelligent inspection system</div>\r\n </div>\r\n </div>\r\n <img class=\"bgImg\" src=\"../../assets/newMenu/card-8.png\" />\r\n </div>\r\n <div class=\"grid-content cont-bg-1\" v-throttle @click=\"render('3')\">\r\n <div class=\"toplayer\">\r\n <img class=\"iconImg\" src=\"../../assets/newMenu/icon4.png\" />\r\n <div>\r\n <div class=\"itemTit\">特殊作业系统</div>\r\n <div class=\"enTit\">special work</div>\r\n </div>\r\n </div>\r\n <img class=\"bgImg\" src=\"../../assets/newMenu/card-7.png\" />\r\n </div>\r\n <div class=\"grid-content cont-bg-1\" v-throttle @click=\"render('7')\">\r\n <div class=\"toplayer\">\r\n <img class=\"iconImg\" src=\"../../assets/newMenu/icon5.png\" />\r\n <div>\r\n <div class=\"itemTit\">目标责任管理系统</div>\r\n <div class=\"enTit\">Target Responsibility Management</div>\r\n </div>\r\n </div>\r\n <img class=\"bgImg\" src=\"../../assets/newMenu/card-2.png\" />\r\n </div>\r\n <div class=\"grid-content cont-bg-2\" v-throttle @click=\"render('10')\">\r\n <div class=\"toplayer\">\r\n <img class=\"iconImg\" src=\"../../assets/newMenu/icon6.png\" />\r\n <div>\r\n <div class=\"itemTit\">安全知识图谱系统</div>\r\n <div class=\"enTit\">Security Knowledge Graph</div>\r\n </div>\r\n </div>\r\n <img class=\"bgImg\" src=\"../../assets/newMenu/card-3.png\" />\r\n </div>\r\n <div class=\"grid-content cont-bg-2\" v-throttle @click=\"render('9')\">\r\n <div class=\"toplayer\">\r\n <img class=\"iconImg\" src=\"../../assets/newMenu/icon7.png\" />\r\n <div>\r\n <div class=\"itemTit\">设备综合管控系统</div>\r\n <div class=\"enTit\">Comprehensive equipment control</div>\r\n </div>\r\n </div>\r\n <img class=\"bgImg\" src=\"../../assets/newMenu/card-9.png\" />\r\n </div>\r\n <div class=\"grid-content cont-bg-2\" v-throttle @click=\"render('6')\">\r\n <div class=\"toplayer\">\r\n <img class=\"iconImg\" src=\"../../assets/newMenu/icon8.png\" />\r\n <div>\r\n <div class=\"itemTit\">应急管理系统</div>\r\n <div class=\"enTit\">Emergency management</div>\r\n </div>\r\n </div>\r\n <img class=\"bgImg\" src=\"../../assets/newMenu/card-5.png\" />\r\n </div>\r\n <div class=\"grid-content cont-bg-2\" v-throttle @click=\"render('11')\">\r\n <div class=\"toplayer\">\r\n <img class=\"iconImg\" src=\"../../assets/newMenu/icon9.png\" />\r\n <div>\r\n <div class=\"itemTit\">危险化学品全生命周期安全管理系统</div>\r\n <div class=\"enTit\">Full life cycle of hazardous chemicals</div>\r\n </div>\r\n </div>\r\n <img class=\"bgImg\" src=\"../../assets/newMenu/card-10.png\" />\r\n </div>\r\n <div class=\"grid-content cont-bg-2\" v-throttle @click=\"render('8')\">\r\n <div class=\"toplayer\">\r\n <img class=\"iconImg\" src=\"../../assets/newMenu/icon10.png\" />\r\n <div>\r\n <div class=\"itemTit\">事故管理系统</div>\r\n <div class=\"enTit\">Incident Management</div>\r\n </div>\r\n </div>\r\n <img class=\"bgImg\" src=\"../../assets/newMenu/card-6.png\" />\r\n </div>\r\n <div class=\"grid-content cont-bg-2\" @click=\"render('1')\">\r\n <div class=\"toplayer\">\r\n <img class=\"iconImg\" src=\"../../assets/newMenu/icon11.png\" />\r\n <div>\r\n <div class=\"itemTit\">安全基础信息系统</div>\r\n <div class=\"enTit\">Basic data permissions</div>\r\n </div>\r\n </div>\r\n <img class=\"bgImg\" src=\"../../assets/newMenu/card-11.png\" />\r\n </div>\r\n </div>\r\n </div>\r\n <div class=\"bot-rights\">\r\n <img src=\"../../assets/newMenu/pic_line1.png\">\r\n <div>技术支持:苏州国科鸿宇智能科技有限公司</div>\r\n <img src=\"../../assets/newMenu/pic_line2.png\">\r\n </div>\r\n </div>\r\n</template>\r\n\r\n<script lang=\"ts\">\r\nimport { toRefs, reactive, computed, defineComponent, onMounted } from 'vue';\r\nimport { storeToRefs } from 'pinia';\r\nimport { useThemeConfig } from '/@/stores/themeConfig';\r\nimport logoMini from '/@/assets/logo-mini.svg';\r\nimport loginIconTwo from '/@/assets/login-icon-two.svg';\r\nimport { NextLoading } from '/@/utils/loading';\r\nimport { Session } from '/@/utils/storage';\r\nimport { useRoute, useRouter } from 'vue-router';\r\nimport { initBackEndControlRoutes } from '/@/router/backEnd';\r\nimport { useUserInfo } from '/@/stores/userInfo';\r\nimport { useRoutesList } from '/@/stores/routesList';\r\nimport pinia from '/@/stores';\r\nimport { useTagsViewRoutes } from '/@/stores/tagsViewRoutes';\r\nimport { ElMessage } from 'element-plus';\r\nimport { ElMessageBox } from 'element-plus/es';\r\nimport { useLoginApi } from '/@/api/login';\r\nimport { useI18n } from 'vue-i18n';\r\nimport screenfull from 'screenfull';\r\nimport router from '../../router'\r\nimport Cookies from 'js-cookie'\r\n\r\n// 定义接口来定义对象的类型\r\ninterface LoginState {\r\n tabsActiveName: string;\r\n isScan: boolean;\r\n count: number;\r\n projectId: string;\r\n once: number;\r\n isScreenfull: boolean;\r\n time:string;\r\n date:string;\r\n weekDay:string;\r\n dayTime:string\r\n}\r\n\r\nexport default defineComponent({\r\n name: 'loginIndex',\r\n components: {},\r\n setup() {\r\n const { t } = useI18n();\r\n const router = useRouter();\r\n const userInfo = useUserInfo();\r\n const { userInfos } = storeToRefs(userInfo);\r\n const routeToStore = useRoutesList(pinia);\r\n const { routesList } = storeToRefs(routeToStore);\r\n const storesThemeConfig = useThemeConfig();\r\n const { themeConfig } = storeToRefs(storesThemeConfig);\r\n // 时间格式化\r\n const timeForm = {\r\n hour12: false,\r\n year: 'numeric',\r\n month: '2-digit',\r\n day: '2-digit',\r\n hour: '2-digit',\r\n minute: '2-digit',\r\n second: '2-digit'\r\n }\r\n const state = reactive<LoginState>({\r\n tabsActiveName: 'account',\r\n isScan: false,\r\n count: 0,\r\n projectId: '1',\r\n once: 0,\r\n time: '',\r\n date: '',\r\n weekDay: '',\r\n dayTime: '',\r\n isScreenfull: false\r\n });\r\n // 获取布局配置信息\r\n const getThemeConfig = computed(() => {\r\n return themeConfig.value;\r\n });\r\n\r\n // 当前时间\r\n const getDateTime = ()=>{\r\n const curTime = new Date().toLocaleString('zh', timeForm).replace(/\\//g,'-')\r\n state.time = curTime.slice(10,16)\r\n state.date = curTime.slice(0,10)\r\n let week = ['日','一','二','三','四','五','六']\r\n let day = new Date().getDay()\r\n state.weekDay = '星期' + week[day]\r\n let curHour = Number(curTime.slice(10,13))\r\n if(curHour>=5&&curHour<=10){state.dayTime = '上午'}\r\n if(curHour>10&&curHour<=12){state.dayTime = '中午'}\r\n if(curHour>12&&curHour<=18){state.dayTime = '下午'}\r\n if(curHour>18&&curHour<=22){state.dayTime = '晚上'}\r\n if(curHour>22){state.dayTime = '午夜'}\r\n }\r\n // 下拉菜单点击时\r\n const onLoginOut = () => {\r\n ElMessageBox({\r\n closeOnClickModal: false,\r\n closeOnPressEscape: false,\r\n title: t('message.user.logOutTitle'),\r\n message: t('message.user.logOutMessage'),\r\n showCancelButton: true,\r\n confirmButtonText: t('message.user.logOutConfirm'),\r\n cancelButtonText: t('message.user.logOutCancel'),\r\n buttonSize: 'default',\r\n beforeClose: (action, instance, done) => {\r\n if (action === 'confirm') {\r\n instance.confirmButtonLoading = true;\r\n instance.confirmButtonText = t('message.user.logOutExit');\r\n setTimeout(() => {\r\n done();\r\n setTimeout(() => {\r\n instance.confirmButtonLoading = false;\r\n }, 300);\r\n }, 700);\r\n } else {\r\n done();\r\n }\r\n }\r\n })\r\n .then(async () => {\r\n let res = await useLoginApi().signOut();\r\n if (res.data.code === '200') {\r\n Session.clear(); // 清除缓存/token等\r\n // 使用 reload 时,不需要调用 resetRoute() 重置路由\r\n window.location.reload();\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 render = (value: string) => {\r\n state.projectId = value;\r\n renderMenu();\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) state.isScreenfull = true;\r\n else state.isScreenfull = false;\r\n });\r\n };\r\n // 去风险大屏\r\n const toRiskPlatform = ()=>{\r\n router.push({\r\n name: \"bigDataScreen\"\r\n });\r\n }\r\n const throttle = (renderMenu: any, delay: number) => {\r\n let flag = true;\r\n let count = 0;\r\n return function () {\r\n if (!flag) return;\r\n flag = false;\r\n if (count === 0) {\r\n renderMenu.apply();\r\n count++;\r\n flag = true;\r\n } else {\r\n setTimeout(() => {\r\n renderMenu.apply();\r\n flag = true;\r\n }, delay);\r\n }\r\n };\r\n };\r\n\r\n //调用菜单方法\r\n const renderMenu = throttle(() => {\r\n renderFun();\r\n }, 2000);\r\n\r\n //调后台菜单接口\r\n const renderFun = async () => {\r\n Cookies.set('projectId', state.projectId);\r\n userInfos.value.projectId = state.projectId;\r\n await initBackEndControlRoutes().then(() => {\r\n let linkToMenu = [...routesList.value];\r\n if (linkToMenu && linkToMenu.length > 1) {\r\n router.push(linkToFirstMenu(JSON.parse(JSON.stringify(linkToMenu))[1]));\r\n } else {\r\n ElMessage({ type: 'warning', message: '你没有该子系统的权限' });\r\n }\r\n });\r\n };\r\n\r\n const linkToFirstMenu: any = (value: any) => {\r\n let returnMenu = value;\r\n if (returnMenu.children?.length > 0) {\r\n return linkToFirstMenu(returnMenu.children[0]);\r\n } else {\r\n return returnMenu.path;\r\n }\r\n };\r\n // //点击进入特殊作业\r\n // const toSpecialWorkSys = () => {\r\n // \trouter.push('/layoutPage');\r\n // };\r\n // 页面加载时\r\n onMounted(() => {\r\n state.once += 1;\r\n NextLoading.done()\r\n setInterval(()=>{\r\n getDateTime()\r\n },1000)\r\n // loginBg();\r\n // loginApp()\r\n });\r\n return {\r\n render,\r\n logoMini,\r\n onLoginOut,\r\n getDateTime,\r\n toRiskPlatform,\r\n onScreenfullClick,\r\n loginIconTwo,\r\n getThemeConfig,\r\n ...toRefs(state)\r\n };\r\n }\r\n});\r\n</script>\r\n\r\n<style scoped lang=\"scss\">\r\n @media screen and (min-width: 1400px) {\r\n .gridCont {\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-auto-flow: row;\r\n justify-content: center;\r\n .toplayer{\r\n width: 100%;\r\n height: 100%;\r\n position: absolute;\r\n left: 0;\r\n top: 0;\r\n display: flex;\r\n align-items: center;\r\n padding: 0 20px;\r\n z-index: 99;\r\n\r\n .itemTit {\r\n font-size: 28px;\r\n line-height: 34px;\r\n height: 40%;\r\n color: #072270;\r\n }\r\n .enTit{\r\n font-size: 18px;\r\n line-height: 20px;\r\n color: #072270;\r\n }\r\n\r\n .iconImg {\r\n width: 88px;\r\n height: 88px;\r\n margin-right: 20px;\r\n }\r\n }\r\n .bgImg {\r\n position: absolute;\r\n width: 30%;\r\n height: auto;\r\n right: -10px;\r\n top: 15px;\r\n }\r\n }\r\n\r\n\r\n .grid-content-1{\r\n grid-row-start: 1;\r\n grid-row-end: 3;\r\n\r\n .toplayer{\r\n width: 100%;\r\n height: 100%;\r\n position: absolute;\r\n left: 0;\r\n top: 0;\r\n display: flex;\r\n align-items: center;\r\n z-index: 99;\r\n\r\n &>div{\r\n display: flex;\r\n align-items: flex-start;\r\n }\r\n\r\n .itemTit1 {\r\n font-size: 34px;\r\n line-height: 42px;\r\n height: 40%;\r\n letter-spacing: 1px;\r\n color: #072270;\r\n margin-bottom: 12px;\r\n }\r\n .enTit1{\r\n font-size: 22px;\r\n line-height: 24px;\r\n color: #072270;\r\n }\r\n }\r\n .bgImg1 {\r\n position: absolute;\r\n width: 45%;\r\n height: auto;\r\n right: -20px;\r\n top: 30%;\r\n }\r\n }\r\n\r\n .bot-rights{\r\n font-size: 18px;\r\n color: #333;\r\n }\r\n }\r\n\r\n @media screen and (min-width: 1200px) and (max-width: 1400px){\r\n .gridCont {\r\n width: 100%;\r\n height: 100%;\r\n display: grid;\r\n grid-gap: 15px;\r\n grid-template-columns: repeat(3, 1fr);\r\n grid-auto-flow: row;\r\n justify-content: center;\r\n\r\n .toplayer{\r\n width: 100%;\r\n height: 100%;\r\n position: absolute;\r\n left: 0;\r\n top: 0;\r\n display: flex;\r\n align-items: center;\r\n padding: 0 20px;\r\n z-index: 99;\r\n\r\n .itemTit {\r\n font-size: 26px;\r\n line-height: 30px;\r\n height: 40%;\r\n color: #072270;\r\n margin-bottom: 2px;\r\n }\r\n .enTit{\r\n font-size: 14px;\r\n color: #072270;\r\n }\r\n\r\n .iconImg {\r\n width: 44px;\r\n height: 44px;\r\n margin-right: 10px;\r\n }\r\n\r\n }\r\n .bgImg {\r\n position: absolute;\r\n width: 30%;\r\n height: auto;\r\n right: -10px;\r\n top: 15px;\r\n }\r\n }\r\n\r\n .grid-content-1{\r\n grid-row-start: 1;\r\n grid-row-end: 3;\r\n\r\n .toplayer{\r\n width: 100%;\r\n height: 100%;\r\n position: absolute;\r\n left: 0;\r\n top: 0;\r\n display: flex;\r\n align-items: center;\r\n z-index: 99;\r\n\r\n &>div{\r\n display: flex;\r\n align-items: flex-start;\r\n }\r\n\r\n .itemTit1 {\r\n font-size: 28px;\r\n line-height: 36px;\r\n height: 40%;\r\n letter-spacing: 1px;\r\n color: #072270;\r\n margin-bottom: 12px;\r\n }\r\n .enTit1{\r\n font-size: 16px;\r\n color: #072270;\r\n }\r\n }\r\n .bgImg1 {\r\n position: absolute;\r\n width: 45%;\r\n height: auto;\r\n right: -20px;\r\n top: 30%;\r\n }\r\n }\r\n .bot-rights{\r\n font-size: 15px;\r\n color: #333;\r\n }\r\n }\r\n @media screen and (max-width: 1200px){\r\n .gridCont {\r\n width: 100%;\r\n height: 100%;\r\n display: grid;\r\n grid-gap: 10px;\r\n grid-template-columns: repeat(3, 1fr);\r\n grid-auto-flow: row;\r\n justify-content: center;\r\n\r\n .toplayer{\r\n width: 100%;\r\n height: 100%;\r\n position: absolute;\r\n left: 0;\r\n top: 0;\r\n display: flex;\r\n align-items: center;\r\n padding: 0 15px;\r\n z-index: 99;\r\n\r\n .itemTit {\r\n font-size: 18px;\r\n line-height: 22px;\r\n color: #072270;\r\n }\r\n .enTit{\r\n font-size: 12px;\r\n line-height: 14px;\r\n color: #072270;\r\n }\r\n\r\n .iconImg {\r\n width: 32px;\r\n height: 32px;\r\n margin-right: 10px;\r\n }\r\n }\r\n .bgImg {\r\n position: absolute;\r\n width: 45%;\r\n height: auto;\r\n right: -10px;\r\n top: 15px;\r\n }\r\n }\r\n\r\n .grid-content-1{\r\n grid-row-start: 1;\r\n grid-row-end: 3;\r\n\r\n .toplayer{\r\n width: 100%;\r\n height: 100%;\r\n position: absolute;\r\n left: 0;\r\n top: 0;\r\n display: flex;\r\n align-items: center;\r\n z-index: 99;\r\n\r\n &>div{\r\n display: flex;\r\n align-items: flex-start;\r\n }\r\n\r\n .itemTit1 {\r\n font-size: 24px;\r\n line-height: 36px;\r\n height: 40%;\r\n letter-spacing: 1px;\r\n color: #072270;\r\n margin-bottom: 12px;\r\n }\r\n .enTit1{\r\n font-size: 14px;\r\n color: #072270;\r\n }\r\n }\r\n .bgImg1 {\r\n position: absolute;\r\n width: 45%;\r\n height: auto;\r\n right: -20px;\r\n top: 30%;\r\n }\r\n }\r\n .bot-rights{\r\n font-size: 12px;\r\n color: #333;\r\n }\r\n }\r\n.login-container {\r\n width: 100%;\r\n height: 100%;\r\n position: relative;\r\n background: #fff;\r\n .topPanel {\r\n width: 100%;\r\n height: 260px;\r\n background: url('../../assets/newMenu/topbg.jpg') no-repeat center;\r\n background-size: 100% 100%;\r\n display: flex;\r\n justify-content: center;\r\n box-shadow: 0 8px 32px rgba(0, 0, 0, 0.1);\r\n animation: showDown 0.6s 1 ease forwards;\r\n\r\n @keyframes showDown {\r\n 100% {\r\n position: absolute;\r\n top: 0;\r\n }\r\n }\r\n }\r\n .topPanelBg{\r\n position: absolute;\r\n width: 100%;\r\n height: 60px;\r\n top: 0;\r\n left: 0;\r\n background: rgba(255,255,255,.8);\r\n z-index: 9;\r\n }\r\n .topPanelCont {\r\n position: absolute;\r\n width: 100%;\r\n height: 60px;\r\n padding: 0 50px;\r\n top: 0;\r\n left: 0;\r\n display: flex;\r\n align-items: center;\r\n justify-content: space-between;\r\n z-index: 999;\r\n\r\n .topLogo {\r\n display: flex;\r\n align-items: center;\r\n\r\n img{\r\n width: 146px;\r\n height: auto;\r\n }\r\n }\r\n\r\n .userInfo {\r\n display: flex;\r\n align-items: center;\r\n\r\n .avator {\r\n display: flex;\r\n justify-content: right;\r\n\r\n img {\r\n width: 20px;\r\n height: 20px;\r\n border-radius: 10px;\r\n }\r\n div {\r\n font-size: 15px;\r\n color: #333333;\r\n line-height: 20px;\r\n margin-left: 6px;\r\n }\r\n }\r\n span {\r\n width: 1px;\r\n height: 20px;\r\n background: #999;\r\n margin: 0 15px;\r\n }\r\n .loginOut {\r\n font-size: 15px;\r\n color: #333;\r\n line-height: 20px;\r\n cursor: pointer;\r\n\r\n &:hover {\r\n color: #006df5;\r\n }\r\n }\r\n }\r\n }\r\n .leftCont{\r\n position: absolute;\r\n left: 0;\r\n top: 0;\r\n width: 240px;\r\n height: 100%;\r\n z-index: 99;\r\n background: url('../../assets/newMenu/leftbg.png') no-repeat center;\r\n background-size: 100% 100%;\r\n }\r\n .topCont{\r\n position: absolute;\r\n width: 100%;\r\n height: 200px;\r\n left: 0;\r\n top: 60px;\r\n padding: 0 40px 0 120px;\r\n z-index: 99999;\r\n display: flex;\r\n flex-direction: column;\r\n justify-content: center;\r\n align-items: flex-start;\r\n .topInfo{\r\n width: 100%;\r\n display: flex;\r\n align-items: center;\r\n justify-content: space-between;\r\n margin-bottom: 10px;\r\n\r\n .topTit{\r\n font-size: 44px;\r\n font-family: \"PingFang SC\";\r\n font-weight: bolder;\r\n text-align: left;\r\n color: #fff;\r\n text-shadow: 0 3px 8px rgba(0,0,0,.2);\r\n }\r\n\r\n .topTime{\r\n padding: 15px 10px;\r\n box-sizing: border-box;\r\n background: rgba(6,64,195,.8);\r\n border-radius: 8px;\r\n color: #fff;\r\n font-family: \"PingFang SC\";\r\n font-weight: 600;\r\n font-size: 16px;\r\n display: flex;\r\n align-items: center;\r\n\r\n .time{\r\n font-size: 48px;\r\n }\r\n &>span{\r\n width: 1px;\r\n height: 40px;\r\n margin: 0 15px;\r\n background: #fff;\r\n }\r\n .today{\r\n display: flex;\r\n flex-direction: column;\r\n align-items: flex-start;\r\n\r\n span{\r\n font-size: 14px;\r\n }\r\n\r\n span:first-of-type{\r\n margin-right: 10px;\r\n }\r\n }\r\n }\r\n }\r\n .line{\r\n width: 120px;\r\n height: 6px;\r\n background: #00EEFF;\r\n }\r\n }\r\n .menuGrid {\r\n width: calc(100vw - 240px);\r\n height: calc(100vh - 320px);\r\n padding: 20px 20px 0;\r\n position: absolute;\r\n top: 260px;\r\n left: 240px;\r\n .gridCont {\r\n\r\n .grid-content {\r\n border-radius: 16px;\r\n position: relative;\r\n overflow: hidden;\r\n cursor: pointer;\r\n transition: 0.3s;\r\n border: none;\r\n\r\n &:hover {\r\n background-image: radial-gradient(ellipse farthest-side at 50% 100%,#48A3FF 0%,#fff 120%);\r\n box-shadow: 8px 8px 24px rgba(20,97,234,.2), -8px -8px 24px #fafafa;\r\n }\r\n }\r\n .cont-bg-1{\r\n background: #D9EAFF;\r\n }\r\n .cont-bg-2{\r\n background: #CDD6FF;\r\n }\r\n\r\n\r\n /*.grid-content-2{*/\r\n /*\tbackground-image: linear-gradient(135deg,#0098F5,#1461EA);*/\r\n /*}*/\r\n\r\n /*.grid-content-3{*/\r\n /*\tbackground-image: linear-gradient(135deg,#006DF5,#1450EA);*/\r\n /*}*/\r\n }\r\n }\r\n .bot-rights{\r\n width: calc(100vw - 240px);\r\n height: 60px;\r\n position: absolute;\r\n bottom: 0;\r\n left: 240px;\r\n z-index: 9999;\r\n display: flex;\r\n align-items: center;\r\n justify-content: center;\r\n\r\n img{\r\n width: 248px;\r\n height: 8px;\r\n }\r\n div{\r\n margin: 0 20px;\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/newHome/index.vue b/src/views/newHome/index.vue |
| | | --- a/src/views/newHome/index.vue (revision 2e0110788cc8563381d4d8050b559d8f4448c6bf) |
| | | +++ b/src/views/newHome/index.vue (date 1660871441429) |
| | | @@ -1,17 +1,13 @@ |
| | | <template> |
| | | <div class="login-container" :key="once"> |
| | | - <div class="topPanel"> |
| | | - |
| | | - </div> |
| | | - <div class="topPanelBg"> |
| | | - |
| | | - </div> |
| | | + <div class="topPanel"></div> |
| | | + <div class="topPanelBg"></div> |
| | | <div class="topPanelCont"> |
| | | <div class="topLogo"> |
| | | <img src="../../assets/newMenu/toplogo.png" /> |
| | | </div> |
| | | <div class="userInfo"> |
| | | - <div @click="onScreenfullClick" style="margin-right: 15px;cursor: pointer"> |
| | | + <div @click="onScreenfullClick" style="margin-right: 15px; cursor: pointer"> |
| | | <i class="iconfont" :title="isScreenfull ? $t('message.user.title6') : $t('message.user.title5')" :class="!isScreenfull ? 'icon-fullscreen' : 'icon-tuichuquanping'"></i> |
| | | </div> |
| | | <div class="loginOut" @click="onLoginOut">退出登录</div> |
| | | @@ -22,39 +18,36 @@ |
| | | </div> |
| | | </div> |
| | | </div> |
| | | - <div class="leftCont"> |
| | | - |
| | | - </div> |
| | | + <div class="leftCont"></div> |
| | | <div class="topCont"> |
| | | <div class="topInfo"> |
| | | - <div class="topTit"> |
| | | - 新疆国泰新华<br/>安全风险预警监测系统 |
| | | - </div> |
| | | + <div class="topTit">新疆国泰新华<br />安全风险预警监测系统</div> |
| | | <div class="topTime"> |
| | | <div class="time"> |
| | | - {{time}} |
| | | + {{ time }} |
| | | </div> |
| | | <span></span> |
| | | <div class="today"> |
| | | - <div>{{date}}</div> |
| | | - <div><span>{{weekDay}}</span><span>{{dayTime}}</span></div> |
| | | - </div> |
| | | - </div> |
| | | - </div> |
| | | - <div class="line"> |
| | | - |
| | | + <div>{{ date }}</div> |
| | | + <div> |
| | | + <span>{{ weekDay }}</span |
| | | + ><span>{{ dayTime }}</span> |
| | | + </div> |
| | | + </div> |
| | | + </div> |
| | | </div> |
| | | + <div class="line"></div> |
| | | </div> |
| | | <div class="menuGrid"> |
| | | <div class="gridCont"> |
| | | <div class="grid-content grid-content-1 cont-bg-1" v-throttle @click="toRiskPlatform"> |
| | | <div class="toplayer"> |
| | | <div> |
| | | - <img class="iconImg" src="../../assets/newMenu/icon1.png"/> |
| | | - <div> |
| | | - <div class="itemTit1">安全风险综合预警<br/>预报平台</div> |
| | | - <div class="enTit1">Security risk comprehensive early warning and forecast platform</div> |
| | | - </div> |
| | | + <img class="iconImg" src="../../assets/newMenu/icon1.png" /> |
| | | + <div> |
| | | + <div class="itemTit1">安全风险综合预警<br />预报平台</div> |
| | | + <div class="enTit1">Security risk comprehensive early warning and forecast platform</div> |
| | | + </div> |
| | | </div> |
| | | </div> |
| | | <img class="bgImg1" src="../../assets/newMenu/card-1.png" /> |
| | | @@ -162,9 +155,9 @@ |
| | | </div> |
| | | </div> |
| | | <div class="bot-rights"> |
| | | - <img src="../../assets/newMenu/pic_line1.png"> |
| | | + <img src="../../assets/newMenu/pic_line1.png" /> |
| | | <div>技术支持:苏州国科鸿宇智能科技有限公司</div> |
| | | - <img src="../../assets/newMenu/pic_line2.png"> |
| | | + <img src="../../assets/newMenu/pic_line2.png" /> |
| | | </div> |
| | | </div> |
| | | </template> |
| | | @@ -188,8 +181,8 @@ |
| | | import { useLoginApi } from '/@/api/login'; |
| | | import { useI18n } from 'vue-i18n'; |
| | | import screenfull from 'screenfull'; |
| | | -import router from '../../router' |
| | | -import Cookies from 'js-cookie' |
| | | +import router from '../../router'; |
| | | +import Cookies from 'js-cookie'; |
| | | |
| | | // 定义接口来定义对象的类型 |
| | | interface LoginState { |
| | | @@ -199,10 +192,10 @@ |
| | | projectId: string; |
| | | once: number; |
| | | isScreenfull: boolean; |
| | | - time:string; |
| | | - date:string; |
| | | - weekDay:string; |
| | | - dayTime:string |
| | | + time: string; |
| | | + date: string; |
| | | + weekDay: string; |
| | | + dayTime: string; |
| | | } |
| | | |
| | | export default defineComponent({ |
| | | @@ -226,7 +219,7 @@ |
| | | hour: '2-digit', |
| | | minute: '2-digit', |
| | | second: '2-digit' |
| | | - } |
| | | + }; |
| | | const state = reactive<LoginState>({ |
| | | tabsActiveName: 'account', |
| | | isScan: false, |
| | | @@ -245,20 +238,30 @@ |
| | | }); |
| | | |
| | | // 当前时间 |
| | | - const getDateTime = ()=>{ |
| | | - const curTime = new Date().toLocaleString('zh', timeForm).replace(/\//g,'-') |
| | | - state.time = curTime.slice(10,16) |
| | | - state.date = curTime.slice(0,10) |
| | | - let week = ['日','一','二','三','四','五','六'] |
| | | - let day = new Date().getDay() |
| | | - state.weekDay = '星期' + week[day] |
| | | - let curHour = Number(curTime.slice(10,13)) |
| | | - if(curHour>=5&&curHour<=10){state.dayTime = '上午'} |
| | | - if(curHour>10&&curHour<=12){state.dayTime = '中午'} |
| | | - if(curHour>12&&curHour<=18){state.dayTime = '下午'} |
| | | - if(curHour>18&&curHour<=22){state.dayTime = '晚上'} |
| | | - if(curHour>22){state.dayTime = '午夜'} |
| | | - } |
| | | + const getDateTime = () => { |
| | | + const curTime = new Date().toLocaleString('zh', timeForm).replace(/\//g, '-'); |
| | | + state.time = curTime.slice(10, 16); |
| | | + state.date = curTime.slice(0, 10); |
| | | + let week = ['日', '一', '二', '三', '四', '五', '六']; |
| | | + let day = new Date().getDay(); |
| | | + state.weekDay = '星期' + week[day]; |
| | | + let curHour = Number(curTime.slice(10, 13)); |
| | | + if (curHour >= 5 && curHour <= 10) { |
| | | + state.dayTime = '上午'; |
| | | + } |
| | | + if (curHour > 10 && curHour <= 12) { |
| | | + state.dayTime = '中午'; |
| | | + } |
| | | + if (curHour > 12 && curHour <= 18) { |
| | | + state.dayTime = '下午'; |
| | | + } |
| | | + if (curHour > 18 && curHour <= 22) { |
| | | + state.dayTime = '晚上'; |
| | | + } |
| | | + if (curHour > 22) { |
| | | + state.dayTime = '午夜'; |
| | | + } |
| | | + }; |
| | | // 下拉菜单点击时 |
| | | const onLoginOut = () => { |
| | | ElMessageBox({ |
| | | @@ -319,11 +322,11 @@ |
| | | }); |
| | | }; |
| | | // 去风险大屏 |
| | | - const toRiskPlatform = ()=>{ |
| | | + const toRiskPlatform = () => { |
| | | router.push({ |
| | | - name: "bigDataScreen" |
| | | + name: 'bigDataScreen' |
| | | }); |
| | | - } |
| | | + }; |
| | | const throttle = (renderMenu: any, delay: number) => { |
| | | let flag = true; |
| | | let count = 0; |
| | | @@ -377,10 +380,11 @@ |
| | | // 页面加载时 |
| | | onMounted(() => { |
| | | state.once += 1; |
| | | - NextLoading.done() |
| | | - setInterval(()=>{ |
| | | - getDateTime() |
| | | - },1000) |
| | | + NextLoading.done(); |
| | | + getDateTime(); |
| | | + setInterval(() => { |
| | | + getDateTime(); |
| | | + }, 1000); |
| | | // loginBg(); |
| | | // loginApp() |
| | | }); |
| | | @@ -400,288 +404,286 @@ |
| | | </script> |
| | | |
| | | <style scoped lang="scss"> |
| | | - @media screen and (min-width: 1400px) { |
| | | - .gridCont { |
| | | - width: 100%; |
| | | - height: 100%; |
| | | - display: grid; |
| | | - grid-gap: 20px; |
| | | - grid-template-columns: repeat(3, 1fr); |
| | | - grid-auto-flow: row; |
| | | - justify-content: center; |
| | | - .toplayer{ |
| | | - width: 100%; |
| | | - height: 100%; |
| | | - position: absolute; |
| | | - left: 0; |
| | | - top: 0; |
| | | - display: flex; |
| | | - align-items: center; |
| | | - padding: 0 20px; |
| | | - z-index: 99; |
| | | +@media screen and (min-width: 1400px) { |
| | | + .gridCont { |
| | | + width: 100%; |
| | | + height: 100%; |
| | | + display: grid; |
| | | + grid-gap: 20px; |
| | | + grid-template-columns: repeat(3, 1fr); |
| | | + grid-auto-flow: row; |
| | | + justify-content: center; |
| | | + .toplayer { |
| | | + width: 100%; |
| | | + height: 100%; |
| | | + position: absolute; |
| | | + left: 0; |
| | | + top: 0; |
| | | + display: flex; |
| | | + align-items: center; |
| | | + padding: 0 20px; |
| | | + z-index: 99; |
| | | |
| | | - .itemTit { |
| | | - font-size: 28px; |
| | | - line-height: 34px; |
| | | - height: 40%; |
| | | - color: #072270; |
| | | - } |
| | | - .enTit{ |
| | | - font-size: 18px; |
| | | - line-height: 20px; |
| | | - color: #072270; |
| | | - } |
| | | + .itemTit { |
| | | + font-size: 28px; |
| | | + line-height: 34px; |
| | | + height: 40%; |
| | | + color: #072270; |
| | | + } |
| | | + .enTit { |
| | | + font-size: 18px; |
| | | + line-height: 20px; |
| | | + color: #072270; |
| | | + } |
| | | |
| | | - .iconImg { |
| | | - width: 88px; |
| | | - height: 88px; |
| | | - margin-right: 20px; |
| | | - } |
| | | - } |
| | | - .bgImg { |
| | | - position: absolute; |
| | | - width: 30%; |
| | | - height: auto; |
| | | - right: -10px; |
| | | - top: 15px; |
| | | - } |
| | | - } |
| | | + .iconImg { |
| | | + width: 88px; |
| | | + height: 88px; |
| | | + margin-right: 20px; |
| | | + } |
| | | + } |
| | | + .bgImg { |
| | | + position: absolute; |
| | | + width: 30%; |
| | | + height: auto; |
| | | + right: -10px; |
| | | + top: 15px; |
| | | + } |
| | | + } |
| | | |
| | | - |
| | | - .grid-content-1{ |
| | | - grid-row-start: 1; |
| | | - grid-row-end: 3; |
| | | + .grid-content-1 { |
| | | + grid-row-start: 1; |
| | | + grid-row-end: 3; |
| | | |
| | | - .toplayer{ |
| | | - width: 100%; |
| | | - height: 100%; |
| | | - position: absolute; |
| | | - left: 0; |
| | | - top: 0; |
| | | - display: flex; |
| | | - align-items: center; |
| | | - z-index: 99; |
| | | + .toplayer { |
| | | + width: 100%; |
| | | + height: 100%; |
| | | + position: absolute; |
| | | + left: 0; |
| | | + top: 0; |
| | | + display: flex; |
| | | + align-items: center; |
| | | + z-index: 99; |
| | | |
| | | - &>div{ |
| | | - display: flex; |
| | | - align-items: flex-start; |
| | | - } |
| | | + & > div { |
| | | + display: flex; |
| | | + align-items: flex-start; |
| | | + } |
| | | |
| | | - .itemTit1 { |
| | | - font-size: 34px; |
| | | - line-height: 42px; |
| | | - height: 40%; |
| | | - letter-spacing: 1px; |
| | | - color: #072270; |
| | | - margin-bottom: 12px; |
| | | - } |
| | | - .enTit1{ |
| | | - font-size: 22px; |
| | | - line-height: 24px; |
| | | - color: #072270; |
| | | - } |
| | | - } |
| | | - .bgImg1 { |
| | | - position: absolute; |
| | | - width: 45%; |
| | | - height: auto; |
| | | - right: -20px; |
| | | - top: 30%; |
| | | - } |
| | | - } |
| | | + .itemTit1 { |
| | | + font-size: 34px; |
| | | + line-height: 42px; |
| | | + height: 40%; |
| | | + letter-spacing: 1px; |
| | | + color: #072270; |
| | | + margin-bottom: 12px; |
| | | + } |
| | | + .enTit1 { |
| | | + font-size: 22px; |
| | | + line-height: 24px; |
| | | + color: #072270; |
| | | + } |
| | | + } |
| | | + .bgImg1 { |
| | | + position: absolute; |
| | | + width: 45%; |
| | | + height: auto; |
| | | + right: -20px; |
| | | + top: 30%; |
| | | + } |
| | | + } |
| | | |
| | | - .bot-rights{ |
| | | - font-size: 18px; |
| | | - color: #333; |
| | | - } |
| | | - } |
| | | + .bot-rights { |
| | | + font-size: 18px; |
| | | + color: #333; |
| | | + } |
| | | +} |
| | | |
| | | - @media screen and (min-width: 1200px) and (max-width: 1400px){ |
| | | - .gridCont { |
| | | - width: 100%; |
| | | - height: 100%; |
| | | - display: grid; |
| | | - grid-gap: 15px; |
| | | - grid-template-columns: repeat(3, 1fr); |
| | | - grid-auto-flow: row; |
| | | - justify-content: center; |
| | | +@media screen and (min-width: 1200px) and (max-width: 1400px) { |
| | | + .gridCont { |
| | | + width: 100%; |
| | | + height: 100%; |
| | | + display: grid; |
| | | + grid-gap: 15px; |
| | | + grid-template-columns: repeat(3, 1fr); |
| | | + grid-auto-flow: row; |
| | | + justify-content: center; |
| | | |
| | | - .toplayer{ |
| | | - width: 100%; |
| | | - height: 100%; |
| | | - position: absolute; |
| | | - left: 0; |
| | | - top: 0; |
| | | - display: flex; |
| | | - align-items: center; |
| | | - padding: 0 20px; |
| | | - z-index: 99; |
| | | + .toplayer { |
| | | + width: 100%; |
| | | + height: 100%; |
| | | + position: absolute; |
| | | + left: 0; |
| | | + top: 0; |
| | | + display: flex; |
| | | + align-items: center; |
| | | + padding: 0 20px; |
| | | + z-index: 99; |
| | | |
| | | - .itemTit { |
| | | - font-size: 26px; |
| | | - line-height: 30px; |
| | | - height: 40%; |
| | | - color: #072270; |
| | | - margin-bottom: 2px; |
| | | - } |
| | | - .enTit{ |
| | | - font-size: 14px; |
| | | - color: #072270; |
| | | - } |
| | | + .itemTit { |
| | | + font-size: 26px; |
| | | + line-height: 30px; |
| | | + height: 40%; |
| | | + color: #072270; |
| | | + margin-bottom: 2px; |
| | | + } |
| | | + .enTit { |
| | | + font-size: 14px; |
| | | + color: #072270; |
| | | + } |
| | | |
| | | - .iconImg { |
| | | - width: 44px; |
| | | - height: 44px; |
| | | - margin-right: 10px; |
| | | - } |
| | | - |
| | | - } |
| | | - .bgImg { |
| | | - position: absolute; |
| | | - width: 30%; |
| | | - height: auto; |
| | | - right: -10px; |
| | | - top: 15px; |
| | | - } |
| | | - } |
| | | + .iconImg { |
| | | + width: 44px; |
| | | + height: 44px; |
| | | + margin-right: 10px; |
| | | + } |
| | | + } |
| | | + .bgImg { |
| | | + position: absolute; |
| | | + width: 30%; |
| | | + height: auto; |
| | | + right: -10px; |
| | | + top: 15px; |
| | | + } |
| | | + } |
| | | |
| | | - .grid-content-1{ |
| | | - grid-row-start: 1; |
| | | - grid-row-end: 3; |
| | | + .grid-content-1 { |
| | | + grid-row-start: 1; |
| | | + grid-row-end: 3; |
| | | |
| | | - .toplayer{ |
| | | - width: 100%; |
| | | - height: 100%; |
| | | - position: absolute; |
| | | - left: 0; |
| | | - top: 0; |
| | | - display: flex; |
| | | - align-items: center; |
| | | - z-index: 99; |
| | | + .toplayer { |
| | | + width: 100%; |
| | | + height: 100%; |
| | | + position: absolute; |
| | | + left: 0; |
| | | + top: 0; |
| | | + display: flex; |
| | | + align-items: center; |
| | | + z-index: 99; |
| | | |
| | | - &>div{ |
| | | - display: flex; |
| | | - align-items: flex-start; |
| | | - } |
| | | + & > div { |
| | | + display: flex; |
| | | + align-items: flex-start; |
| | | + } |
| | | |
| | | - .itemTit1 { |
| | | - font-size: 28px; |
| | | - line-height: 36px; |
| | | - height: 40%; |
| | | - letter-spacing: 1px; |
| | | - color: #072270; |
| | | - margin-bottom: 12px; |
| | | - } |
| | | - .enTit1{ |
| | | - font-size: 16px; |
| | | - color: #072270; |
| | | - } |
| | | - } |
| | | - .bgImg1 { |
| | | - position: absolute; |
| | | - width: 45%; |
| | | - height: auto; |
| | | - right: -20px; |
| | | - top: 30%; |
| | | - } |
| | | - } |
| | | - .bot-rights{ |
| | | - font-size: 15px; |
| | | - color: #333; |
| | | - } |
| | | - } |
| | | - @media screen and (max-width: 1200px){ |
| | | - .gridCont { |
| | | - width: 100%; |
| | | - height: 100%; |
| | | - display: grid; |
| | | - grid-gap: 10px; |
| | | - grid-template-columns: repeat(3, 1fr); |
| | | - grid-auto-flow: row; |
| | | - justify-content: center; |
| | | + .itemTit1 { |
| | | + font-size: 28px; |
| | | + line-height: 36px; |
| | | + height: 40%; |
| | | + letter-spacing: 1px; |
| | | + color: #072270; |
| | | + margin-bottom: 12px; |
| | | + } |
| | | + .enTit1 { |
| | | + font-size: 16px; |
| | | + color: #072270; |
| | | + } |
| | | + } |
| | | + .bgImg1 { |
| | | + position: absolute; |
| | | + width: 45%; |
| | | + height: auto; |
| | | + right: -20px; |
| | | + top: 30%; |
| | | + } |
| | | + } |
| | | + .bot-rights { |
| | | + font-size: 15px; |
| | | + color: #333; |
| | | + } |
| | | +} |
| | | +@media screen and (max-width: 1200px) { |
| | | + .gridCont { |
| | | + width: 100%; |
| | | + height: 100%; |
| | | + display: grid; |
| | | + grid-gap: 10px; |
| | | + grid-template-columns: repeat(3, 1fr); |
| | | + grid-auto-flow: row; |
| | | + justify-content: center; |
| | | |
| | | - .toplayer{ |
| | | - width: 100%; |
| | | - height: 100%; |
| | | - position: absolute; |
| | | - left: 0; |
| | | - top: 0; |
| | | - display: flex; |
| | | - align-items: center; |
| | | - padding: 0 15px; |
| | | - z-index: 99; |
| | | + .toplayer { |
| | | + width: 100%; |
| | | + height: 100%; |
| | | + position: absolute; |
| | | + left: 0; |
| | | + top: 0; |
| | | + display: flex; |
| | | + align-items: center; |
| | | + padding: 0 15px; |
| | | + z-index: 99; |
| | | |
| | | - .itemTit { |
| | | - font-size: 18px; |
| | | - line-height: 22px; |
| | | - color: #072270; |
| | | - } |
| | | - .enTit{ |
| | | - font-size: 12px; |
| | | - line-height: 14px; |
| | | - color: #072270; |
| | | - } |
| | | + .itemTit { |
| | | + font-size: 18px; |
| | | + line-height: 22px; |
| | | + color: #072270; |
| | | + } |
| | | + .enTit { |
| | | + font-size: 12px; |
| | | + line-height: 14px; |
| | | + color: #072270; |
| | | + } |
| | | |
| | | - .iconImg { |
| | | - width: 32px; |
| | | - height: 32px; |
| | | - margin-right: 10px; |
| | | - } |
| | | - } |
| | | - .bgImg { |
| | | - position: absolute; |
| | | - width: 45%; |
| | | - height: auto; |
| | | - right: -10px; |
| | | - top: 15px; |
| | | - } |
| | | - } |
| | | + .iconImg { |
| | | + width: 32px; |
| | | + height: 32px; |
| | | + margin-right: 10px; |
| | | + } |
| | | + } |
| | | + .bgImg { |
| | | + position: absolute; |
| | | + width: 45%; |
| | | + height: auto; |
| | | + right: -10px; |
| | | + top: 15px; |
| | | + } |
| | | + } |
| | | |
| | | - .grid-content-1{ |
| | | - grid-row-start: 1; |
| | | - grid-row-end: 3; |
| | | + .grid-content-1 { |
| | | + grid-row-start: 1; |
| | | + grid-row-end: 3; |
| | | |
| | | - .toplayer{ |
| | | - width: 100%; |
| | | - height: 100%; |
| | | - position: absolute; |
| | | - left: 0; |
| | | - top: 0; |
| | | - display: flex; |
| | | - align-items: center; |
| | | - z-index: 99; |
| | | + .toplayer { |
| | | + width: 100%; |
| | | + height: 100%; |
| | | + position: absolute; |
| | | + left: 0; |
| | | + top: 0; |
| | | + display: flex; |
| | | + align-items: center; |
| | | + z-index: 99; |
| | | |
| | | - &>div{ |
| | | - display: flex; |
| | | - align-items: flex-start; |
| | | - } |
| | | + & > div { |
| | | + display: flex; |
| | | + align-items: flex-start; |
| | | + } |
| | | |
| | | - .itemTit1 { |
| | | - font-size: 24px; |
| | | - line-height: 36px; |
| | | - height: 40%; |
| | | - letter-spacing: 1px; |
| | | - color: #072270; |
| | | - margin-bottom: 12px; |
| | | - } |
| | | - .enTit1{ |
| | | - font-size: 14px; |
| | | - color: #072270; |
| | | - } |
| | | - } |
| | | - .bgImg1 { |
| | | - position: absolute; |
| | | - width: 45%; |
| | | - height: auto; |
| | | - right: -20px; |
| | | - top: 30%; |
| | | - } |
| | | - } |
| | | - .bot-rights{ |
| | | - font-size: 12px; |
| | | - color: #333; |
| | | - } |
| | | - } |
| | | + .itemTit1 { |
| | | + font-size: 24px; |
| | | + line-height: 36px; |
| | | + height: 40%; |
| | | + letter-spacing: 1px; |
| | | + color: #072270; |
| | | + margin-bottom: 12px; |
| | | + } |
| | | + .enTit1 { |
| | | + font-size: 14px; |
| | | + color: #072270; |
| | | + } |
| | | + } |
| | | + .bgImg1 { |
| | | + position: absolute; |
| | | + width: 45%; |
| | | + height: auto; |
| | | + right: -20px; |
| | | + top: 30%; |
| | | + } |
| | | + } |
| | | + .bot-rights { |
| | | + font-size: 12px; |
| | | + color: #333; |
| | | + } |
| | | +} |
| | | .login-container { |
| | | width: 100%; |
| | | height: 100%; |
| | | @@ -704,13 +706,13 @@ |
| | | } |
| | | } |
| | | } |
| | | - .topPanelBg{ |
| | | + .topPanelBg { |
| | | position: absolute; |
| | | width: 100%; |
| | | height: 60px; |
| | | top: 0; |
| | | left: 0; |
| | | - background: rgba(255,255,255,.8); |
| | | + background: rgba(255, 255, 255, 0.8); |
| | | z-index: 9; |
| | | } |
| | | .topPanelCont { |
| | | @@ -729,7 +731,7 @@ |
| | | display: flex; |
| | | align-items: center; |
| | | |
| | | - img{ |
| | | + img { |
| | | width: 146px; |
| | | height: auto; |
| | | } |
| | | @@ -773,7 +775,7 @@ |
| | | } |
| | | } |
| | | } |
| | | - .leftCont{ |
| | | + .leftCont { |
| | | position: absolute; |
| | | left: 0; |
| | | top: 0; |
| | | @@ -783,7 +785,7 @@ |
| | | background: url('../../assets/newMenu/leftbg.png') no-repeat center; |
| | | background-size: 100% 100%; |
| | | } |
| | | - .topCont{ |
| | | + .topCont { |
| | | position: absolute; |
| | | width: 100%; |
| | | height: 200px; |
| | | @@ -795,62 +797,62 @@ |
| | | flex-direction: column; |
| | | justify-content: center; |
| | | align-items: flex-start; |
| | | - .topInfo{ |
| | | + .topInfo { |
| | | width: 100%; |
| | | display: flex; |
| | | align-items: center; |
| | | justify-content: space-between; |
| | | margin-bottom: 10px; |
| | | |
| | | - .topTit{ |
| | | + .topTit { |
| | | font-size: 44px; |
| | | - font-family: "PingFang SC"; |
| | | + font-family: 'PingFang SC'; |
| | | font-weight: bolder; |
| | | text-align: left; |
| | | color: #fff; |
| | | - text-shadow: 0 3px 8px rgba(0,0,0,.2); |
| | | + text-shadow: 0 3px 8px rgba(0, 0, 0, 0.2); |
| | | } |
| | | |
| | | - .topTime{ |
| | | + .topTime { |
| | | padding: 15px 10px; |
| | | box-sizing: border-box; |
| | | - background: rgba(6,64,195,.8); |
| | | + background: rgba(6, 64, 195, 0.8); |
| | | border-radius: 8px; |
| | | color: #fff; |
| | | - font-family: "PingFang SC"; |
| | | + font-family: 'PingFang SC'; |
| | | font-weight: 600; |
| | | font-size: 16px; |
| | | display: flex; |
| | | align-items: center; |
| | | |
| | | - .time{ |
| | | + .time { |
| | | font-size: 48px; |
| | | } |
| | | - &>span{ |
| | | + & > span { |
| | | width: 1px; |
| | | height: 40px; |
| | | margin: 0 15px; |
| | | background: #fff; |
| | | } |
| | | - .today{ |
| | | + .today { |
| | | display: flex; |
| | | flex-direction: column; |
| | | align-items: flex-start; |
| | | |
| | | - span{ |
| | | + span { |
| | | font-size: 14px; |
| | | } |
| | | |
| | | - span:first-of-type{ |
| | | + span:first-of-type { |
| | | margin-right: 10px; |
| | | } |
| | | } |
| | | } |
| | | } |
| | | - .line{ |
| | | + .line { |
| | | width: 120px; |
| | | height: 6px; |
| | | - background: #00EEFF; |
| | | + background: #00eeff; |
| | | } |
| | | } |
| | | .menuGrid { |
| | | @@ -861,7 +863,6 @@ |
| | | top: 260px; |
| | | left: 240px; |
| | | .gridCont { |
| | | - |
| | | .grid-content { |
| | | border-radius: 16px; |
| | | position: relative; |
| | | @@ -871,17 +872,16 @@ |
| | | border: none; |
| | | |
| | | &:hover { |
| | | - background-image: radial-gradient(ellipse farthest-side at 50% 100%,#48A3FF 0%,#fff 120%); |
| | | - box-shadow: 8px 8px 24px rgba(20,97,234,.2), -8px -8px 24px #fafafa; |
| | | + background-image: radial-gradient(ellipse farthest-side at 50% 100%, #48a3ff 0%, #fff 120%); |
| | | + box-shadow: 8px 8px 24px rgba(20, 97, 234, 0.2), -8px -8px 24px #fafafa; |
| | | } |
| | | } |
| | | - .cont-bg-1{ |
| | | - background: #D9EAFF; |
| | | + .cont-bg-1 { |
| | | + background: #d9eaff; |
| | | } |
| | | - .cont-bg-2{ |
| | | - background: #CDD6FF; |
| | | + .cont-bg-2 { |
| | | + background: #cdd6ff; |
| | | } |
| | | - |
| | | |
| | | /*.grid-content-2{*/ |
| | | /* background-image: linear-gradient(135deg,#0098F5,#1461EA);*/ |
| | | @@ -892,7 +892,7 @@ |
| | | /*}*/ |
| | | } |
| | | } |
| | | - .bot-rights{ |
| | | + .bot-rights { |
| | | width: calc(100vw - 240px); |
| | | height: 60px; |
| | | position: absolute; |
| | | @@ -903,11 +903,11 @@ |
| | | align-items: center; |
| | | justify-content: center; |
| | | |
| | | - img{ |
| | | + img { |
| | | width: 248px; |
| | | height: 8px; |
| | | } |
| | | - div{ |
| | | + div { |
| | | margin: 0 20px; |
| | | } |
| | | } |
| | | Index: src/api/specialWorkSystem/approveRule/index.ts |
| | | IDEA additional info: |
| | | Subsystem: com.intellij.openapi.diff.impl.patch.BaseRevisionTextPatchEP |
| | | <+>import request from '/@/utils/request';\r\n\r\nexport function approveRuleApi() {\r\n return {\r\n // v1\r\n getApproveRuleList: (data: object) => {\r\n return request({\r\n url: import.meta.env.VITE_API_URL + `/rule/listByPage`,\r\n method: 'post',\r\n data: data\r\n });\r\n },\r\n // v1\r\n addApproveRule: (data: object) => {\r\n return request({\r\n url: import.meta.env.VITE_API_URL + `/rule/save`,\r\n method: 'post',\r\n data: data\r\n });\r\n },\r\n // v1\r\n modApproveRule: (data: object) => {\r\n return request({\r\n url: import.meta.env.VITE_API_URL + `/rule/update`,\r\n method: 'post',\r\n data: data\r\n });\r\n },\r\n // v1\r\n deleteApproveRule: (data: object) => {\r\n return request({\r\n url: import.meta.env.VITE_API_URL + `/work/ruleItemStand/delete`,\r\n method: 'post',\r\n data: data\r\n });\r\n },\r\n // v1\r\n getAllApproveRuleList: (data: {}) => {\r\n return request({\r\n url: import.meta.env.VITE_API_URL + `/prevent/device/select/listDevices`,\r\n method: 'post',\r\n data\r\n });\r\n }\r\n };\r\n}\r\n |
| | | Subsystem: com.intellij.openapi.diff.impl.patch.CharsetEP |
| | | <+>UTF-8 |
| | | =================================================================== |
| | | diff --git a/src/api/specialWorkSystem/approveRule/index.ts b/src/api/specialWorkSystem/approveRule/index.ts |
| | | --- a/src/api/specialWorkSystem/approveRule/index.ts (revision 2e0110788cc8563381d4d8050b559d8f4448c6bf) |
| | | +++ b/src/api/specialWorkSystem/approveRule/index.ts (date 1660889194066) |
| | | @@ -29,7 +29,7 @@ |
| | | // v1 |
| | | deleteApproveRule: (data: object) => { |
| | | return request({ |
| | | - url: import.meta.env.VITE_API_URL + `/work/ruleItemStand/delete`, |
| | | + url: import.meta.env.VITE_API_URL + `/rule/del`, |
| | | method: 'post', |
| | | data: data |
| | | }); |
对比新文件 |
| | |
| | | <changelist name="Uncommitted_changes_before_Update_at_2022_8_19_16_50_[Default_Changelist]" date="1660899123237" recycled="true" deleted="true"> |
| | | <option name="PATH" value="$PROJECT_DIR$/.idea/shelf/Uncommitted_changes_before_Update_at_2022_8_19_16_50_[Default_Changelist]/shelved.patch" /> |
| | | <option name="DESCRIPTION" value="Uncommitted changes before Update at 2022/8/19 16:50 [Default Changelist]" /> |
| | | <binary> |
| | | <option name="BEFORE_PATH" value=".idea/shelf/Uncommitted_changes_before_Update_at_2022_8_11_19_22_[Default_Changelist]/companyLogo.png" /> |
| | | <option name="AFTER_PATH" /> |
| | | <option name="SHELVED_PATH" /> |
| | | </binary> |
| | | </changelist> |
| | |
| | | <!-- </router-view>--> |
| | | <el-config-provider :size="getGlobalComponentSize" :locale="i18nLocale"> |
| | | <router-view v-show="themeConfig.lockScreenTime > 1" /> |
| | | <router-view v-show="themeConfig.lockScreenTime > 1" /> |
| | | <LockScreen v-if="themeConfig.isLockScreen" /> |
| | | <Setings ref="setingsRef" v-show="themeConfig.lockScreenTime > 1" /> |
| | | <CloseFull v-if="!themeConfig.isLockScreen" /> |
| | |
| | | // v1 |
| | | deleteApproveRule: (data: object) => { |
| | | return request({ |
| | | url: import.meta.env.VITE_API_URL + `/work/ruleItemStand/delete`, |
| | | url: import.meta.env.VITE_API_URL + `/rule/del`, |
| | | method: 'post', |
| | | data: data |
| | | }); |
| | |
| | | <template> |
| | | <div class="layout-view-bg-white flex layout-view-link" :style="{ height: `calc(100vh - ${setLinkHeight}` }"> |
| | | <a :href="currentRouteMeta.isLink" target="_blank" rel="opener" class="flex-margin"> |
| | | {{ $t(currentRouteMeta.title) }}:{{ currentRouteMeta.isLink }} |
| | | </a> |
| | | </div> |
| | | <div class="layout-view-bg-white flex layout-view-link" :style="{ height: `calc(100vh - ${setLinkHeight}` }"> |
| | | <a :href="currentRouteMeta.isLink" target="_blank" rel="opener" class="flex-margin"> {{ $t(currentRouteMeta.title) }}:{{ currentRouteMeta.isLink }} </a> |
| | | </div> |
| | | </template> |
| | | |
| | | <script lang="ts"> |
| | |
| | | |
| | | // 定义接口来定义对象的类型 |
| | | interface LinkViewState { |
| | | currentRouteMeta: { |
| | | isLink: string; |
| | | title: string; |
| | | }; |
| | | currentRouteMeta: { |
| | | isLink: string; |
| | | title: string; |
| | | }; |
| | | } |
| | | interface LinkViewRouteMeta extends RouteMeta { |
| | | isLink: string; |
| | | title: string; |
| | | isLink: string; |
| | | title: string; |
| | | } |
| | | |
| | | export default defineComponent({ |
| | | name: 'layoutLinkView', |
| | | setup() { |
| | | const storesThemeConfig = useThemeConfig(); |
| | | const { themeConfig } = storeToRefs(storesThemeConfig); |
| | | const route = useRoute(); |
| | | const state = reactive<LinkViewState>({ |
| | | currentRouteMeta: { |
| | | isLink: '', |
| | | title: '', |
| | | }, |
| | | }); |
| | | // 设置 link 的高度 |
| | | const setLinkHeight = computed(() => { |
| | | let { isTagsview } = themeConfig.value; |
| | | if (isTagsview) return `115px`; |
| | | else return `80px`; |
| | | }); |
| | | // 监听路由的变化,设置内容 |
| | | watch( |
| | | () => route.path, |
| | | () => { |
| | | state.currentRouteMeta = <LinkViewRouteMeta>route.meta; |
| | | }, |
| | | { |
| | | immediate: true, |
| | | } |
| | | ); |
| | | return { |
| | | setLinkHeight, |
| | | ...toRefs(state), |
| | | }; |
| | | }, |
| | | name: 'layoutLinkView', |
| | | setup() { |
| | | const storesThemeConfig = useThemeConfig(); |
| | | const { themeConfig } = storeToRefs(storesThemeConfig); |
| | | const route = useRoute(); |
| | | const state = reactive<LinkViewState>({ |
| | | currentRouteMeta: { |
| | | isLink: '', |
| | | title: '' |
| | | } |
| | | }); |
| | | // 设置 link 的高度 |
| | | const setLinkHeight = computed(() => { |
| | | let { isTagsview } = themeConfig.value; |
| | | if (isTagsview) return `115px`; |
| | | else return `80px`; |
| | | }); |
| | | // 监听路由的变化,设置内容 |
| | | watch( |
| | | () => route.path, |
| | | () => { |
| | | state.currentRouteMeta = <LinkViewRouteMeta>route.meta; |
| | | }, |
| | | { |
| | | immediate: true |
| | | } |
| | | ); |
| | | return { |
| | | setLinkHeight, |
| | | ...toRefs(state) |
| | | }; |
| | | } |
| | | }); |
| | | </script> |
| | |
| | | import { ElMessage, ElMessageBox } from 'element-plus'; |
| | | import JSONbig from 'json-bigint'; |
| | | import Cookies from 'js-cookie'; |
| | | import {useLoginApi} from "/@/api/login"; |
| | | import { Session, } from '/@/utils/storage'; |
| | | import { useLoginApi } from '/@/api/login'; |
| | | import { Session } from '/@/utils/storage'; |
| | | |
| | | // var jsonBig = require('json-bigint')({ "storeAsString": true }); |
| | | // 配置新建一个 axios 实例 |
| | |
| | | // 对响应数据做点什么 |
| | | if (response.data.code && response.data.code === 'A0213') { |
| | | ElMessage.error('用户uid不存在'); |
| | | Session.clear(); |
| | | window.location.href = '/'; |
| | | useLoginApi() |
| | | .signOut() |
| | | .then(() => { |
| | | Session.clear(); |
| | | window.location.href = '/'; |
| | | }); |
| | | } else if (response.data.code && response.data.code === 'A0215') { |
| | | ElMessage.error('token失效'); |
| | | // logOut; |
| | | useLoginApi().signOut().then(()=>{ |
| | | Session.clear(); |
| | | window.location.href = '/'; |
| | | }) |
| | | useLoginApi() |
| | | .signOut() |
| | | .then(() => { |
| | | Session.clear(); |
| | | window.location.href = '/'; |
| | | }); |
| | | } |
| | | // if(response.data.code && response.data.code !== '200'){ |
| | | return Promise.resolve(response); |
| | |
| | | if (error.message.indexOf('timeout') != -1) { |
| | | ElMessage.error('网络超时'); |
| | | setTimeout(() => { |
| | | // Session.clear(); |
| | | Session.clear(); |
| | | window.location.href = '/'; |
| | | }, 1000); |
| | | } else if (error.message == 'Network Error') { |
| | | ElMessage.error('网络连接错误'); |
| | | // setTimeout(() => { |
| | | // Session.clear(); |
| | | // window.location.href = '/'; |
| | | // }, 1000); |
| | | setTimeout(() => { |
| | | Session.clear(); |
| | | window.location.href = '/'; |
| | | }, 1000); |
| | | } else { |
| | | if (error.response.data) ElMessage.error(error.response.data.error); |
| | | else ElMessage.error('接口路径找不到'); |
| | |
| | | <el-table-column prop="quotaContent" label="指标作业" show-overflow-tooltip align="center"></el-table-column> |
| | | <el-table-column prop="secondReferenceResult" label="参数值" show-overflow-tooltip align="center"> |
| | | <template #default="scope"> |
| | | <div :style="{color: scope.row.reportResult==1?'#ff0000':'#409eff'}"> |
| | | {{scope.row.dataReportType==1?'无':scope.row.secondReferenceResult}} |
| | | <div :style="{ color: scope.row.reportResult == 1 ? '#ff0000' : '#409eff' }"> |
| | | {{ scope.row.dataReportType == 1 ? '无' : scope.row.secondReferenceResult }} |
| | | </div> |
| | | </template> |
| | | </el-table-column> |
| | | <el-table-column prop="quotaUnit" label="指标单位" show-overflow-tooltip align="center"></el-table-column> |
| | | <el-table-column prop="reportResult" label="结果" show-overflow-tooltip align="center"> |
| | | <template #default="scope"> |
| | | <div :style="{color: scope.row.reportResult==1?'#ff0000':'#409eff'}"> |
| | | {{scope.row.reportResult==0?'正常':(scope.row.reportResult==1?'异常':'无')}} |
| | | <div :style="{ color: scope.row.reportResult == 1 ? '#ff0000' : '#409eff' }"> |
| | | {{ scope.row.reportResult == 0 ? '正常' : scope.row.reportResult == 1 ? '异常' : '无' }} |
| | | </div> |
| | | </template> |
| | | </el-table-column> |
| | |
| | | rfidId: number | null; |
| | | quotaId: number | null; |
| | | quotaUnit: number | null; |
| | | reportResult: number | null |
| | | secondReferenceResult: number |null; |
| | | reportResult: number | null; |
| | | secondReferenceResult: number | null; |
| | | execSequence: number | null; |
| | | dataReportType: number | null; |
| | | firstReferenceValue: number | null; |
| | |
| | | quotaId: null, |
| | | quotaUnit: null, |
| | | execSequence: null, |
| | | secondReferenceResult:null, |
| | | secondReferenceResult: null, |
| | | reportResult: null, |
| | | dataReportType: null, |
| | | firstReferenceValue: null, |
| | |
| | | quotaUnit: null, |
| | | reportResult: null, |
| | | execSequence: null, |
| | | secondReferenceResult:null, |
| | | secondReferenceResult: null, |
| | | dataReportType: null, |
| | | firstReferenceValue: null, |
| | | secondReferenceSign: null, |
| | |
| | | data.inspectTaskForm.execDepId = res.data.data.execDepId; |
| | | giveClassGroup(); |
| | | data.inspectTaskForm = JSON.parse(JSON.stringify(res.data.data)); |
| | | console.log(data.inspectTaskForm,'this data') |
| | | console.log(data.inspectTaskForm, 'this data'); |
| | | } else { |
| | | } |
| | | }) |
| | |
| | | // const toRefer =(row, column, cellValue, index)=>{ |
| | | // return row.secondReferenceResult==0?'正常':(row.reportResult==1?'异常':'无') |
| | | // } |
| | | |
| | | |
| | | const submitInspectPoint = async () => { |
| | | if (data.title === '新增巡检任务' && data.pointTitle === '新增巡检点') { |
| | |
| | | let currentTimeInfo = currentTime.value; |
| | | // 登录成功,跳到转首页 |
| | | // 如果是复制粘贴的路径,非首页/登录页,那么登录成功后重定向到对应的路径中 |
| | | if (route.query?.redirect) { |
| | | router.push('/newMenu'); |
| | | // router.push({ |
| | | // path: <string>route.query?.redirect, |
| | | // query: Object.keys(<string>route.query?.params).length > 0 ? JSON.parse(<string>route.query?.params) : '', |
| | | // }); |
| | | } else { |
| | | router.push('/loginPage'); |
| | | } |
| | | // if (route.query?.redirect) { |
| | | // debugger; |
| | | router.push('/newMenu'); |
| | | // router.push({ |
| | | // path: <string>route.query?.redirect, |
| | | // query: Object.keys(<string>route.query?.params).length > 0 ? JSON.parse(<string>route.query?.params) : '', |
| | | // }); |
| | | // } else { |
| | | // router.push('/loginPage'); |
| | | // } |
| | | state.loading.signIn = true; |
| | | const signInText = t('message.signInText'); |
| | | ElMessage.success(`${currentTimeInfo},${signInText}`); |
对比新文件 |
| | |
| | | <template> |
| | | <div class="layout-view-bg-white flex layout-view-link" :style="{ height: `calc(100vh - ${setLinkHeight}` }"> |
| | | <a :href="currentRouteMeta.isLink" target="_blank" rel="opener" class="flex-margin"> {{ $t(currentRouteMeta.title) }}:{{ currentRouteMeta.isLink }} </a> |
| | | </div> |
| | | </template> |
| | | |
| | | <script lang="ts"> |
| | | import { defineComponent, toRefs, reactive, computed, watch, onMounted } from 'vue'; |
| | | import { useRoute, RouteMeta } from 'vue-router'; |
| | | import { storeToRefs } from 'pinia'; |
| | | import { useThemeConfig } from '/@/stores/themeConfig'; |
| | | |
| | | // 定义接口来定义对象的类型 |
| | | interface LinkViewState { |
| | | currentRouteMeta: { |
| | | isLink: string; |
| | | title: string; |
| | | }; |
| | | } |
| | | interface LinkViewRouteMeta extends RouteMeta { |
| | | isLink: string; |
| | | title: string; |
| | | } |
| | | |
| | | export default defineComponent({ |
| | | name: 'index', |
| | | setup() { |
| | | const storesThemeConfig = useThemeConfig(); |
| | | const { themeConfig } = storeToRefs(storesThemeConfig); |
| | | const route = useRoute(); |
| | | const state = reactive<LinkViewState>({ |
| | | currentRouteMeta: { |
| | | isLink: '', |
| | | title: '' |
| | | } |
| | | }); |
| | | // 设置 link 的高度 |
| | | const setLinkHeight = computed(() => { |
| | | let { isTagsview } = themeConfig.value; |
| | | if (isTagsview) return `115px`; |
| | | else return `80px`; |
| | | }); |
| | | // 监听路由的变化,设置内容 |
| | | watch( |
| | | () => route.path, |
| | | () => { |
| | | state.currentRouteMeta = <LinkViewRouteMeta>route.meta; |
| | | }, |
| | | { |
| | | immediate: true |
| | | } |
| | | ); |
| | | |
| | | onMounted(() => { |
| | | window.open(state.currentRouteMeta.isLink as string, '_blank'); |
| | | }); |
| | | |
| | | return { |
| | | setLinkHeight, |
| | | ...toRefs(state) |
| | | }; |
| | | } |
| | | }); |
| | | </script> |
| | |
| | | <template> |
| | | <div class="home-container"> |
| | | <iframe src="http://39.104.85.193/bmgz"></iframe> |
| | | </div> |
| | | <div class="home-container"> |
| | | <iframe src="http://39.104.85.193/bmgz"></iframe> |
| | | </div> |
| | | </template> |
| | | |
| | | <script> |
| | | export default { |
| | | name: 'safeKnowledgeSys', |
| | | props: { |
| | | |
| | | }, |
| | | data(){ |
| | | return{ |
| | | |
| | | } |
| | | }, |
| | | created() { |
| | | |
| | | }, |
| | | methods:{ |
| | | |
| | | } |
| | | } |
| | | name: 'safeKnowledgeSys', |
| | | props: {}, |
| | | data() { |
| | | return {}; |
| | | }, |
| | | created() {}, |
| | | methods: {} |
| | | }; |
| | | </script> |
| | | |
| | | <!-- Add "scoped" attribute to limit CSS to this component only --> |
| | | <style scoped lang="scss"> |
| | | .home-container{ |
| | | .home-container { |
| | | height: calc(100vh - 144px); |
| | | box-sizing: border-box; |
| | | overflow: hidden; |
| | | |
| | | iframe{ |
| | | width: 100%; |
| | | height: 100%; |
| | | border: none; |
| | | iframe { |
| | | width: 100%; |
| | | height: 100%; |
| | | border: none; |
| | | } |
| | | } |
| | | } |
| | | </style> |
| | |
| | | <template> |
| | | <div class="home-container"> |
| | | <el-tabs v-model="activeName" class="demo-tabs" @tab-click="handleClick"> |
| | | <el-tab-pane label="申请中" name="1"> |
| | | <div style="height: 100%"> |
| | | <el-row class="homeCard"> |
| | | <el-col :span="8"> |
| | | <div class="grid-content topInfo"> |
| | | <el-input v-model="searchWord" placeholder="作业证名称"></el-input> |
| | | <el-button type="primary">查询</el-button> |
| | | <el-button plain>重置</el-button> |
| | | </div> |
| | | </el-col> |
| | | </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="toApply()">申请</el-button> |
| | | <!-- <el-button type="danger" :icon="Delete" size="default">删除</el-button>--> |
| | | <!-- <el-button type="success" size="default">设置分类</el-button>--> |
| | | </el-col> |
| | | <el-button type="primary" :icon="Refresh" size="default" @click="reLoadData()"/> |
| | | </el-row> |
| | | <el-table |
| | | ref="multipleTableRef" |
| | | :data="applyData" |
| | | style="width: 100%" |
| | | height="calc(100% - 100px)" |
| | | :header-cell-style="{background: '#fafafa'}" |
| | | > |
| | | <el-table-column property="workPermitNo" label="作业申请单号" width="180"/> |
| | | <el-table-column property="applyUname" label="申请人"/> |
| | | <el-table-column property="depName" label="部门名称"/> |
| | | <el-table-column property="operators" label="作业人"/> |
| | | <el-table-column property="workTypeDesc" label="作业类型"/> |
| | | <el-table-column property="workLevelDesc" label="作业等级"/> |
| | | <el-table-column property="applyTime" label="申请时间" width="180"/> |
| | | <el-table-column label="申请状态" width="180"> |
| | | <template #default="scope"> |
| | | <el-tag type="success">{{ scope.row.statusDesc}}</el-tag> |
| | | </template> |
| | | </el-table-column> |
| | | <el-table-column fixed="right" label="操作" align="center" width="250"> |
| | | <template #default="scope"> |
| | | <el-button link type="primary" size="small" :icon="View" @click="viewRecord(scope.row)">查看</el-button> |
| | | <el-button link type="success" size="small" :icon="Finished" @click="viewStatus(scope.row)">进度</el-button> |
| | | <el-button link type="warning" size="small" :icon="Delete" @click="deleteRecordBtn(scope.row)">取消</el-button> |
| | | </template> |
| | | </el-table-column> |
| | | </el-table> |
| | | <div class="pageBtn"> |
| | | <el-pagination v-model:currentPage="pageIndex1" v-model:page-size="pageSize1" :page-sizes="[10, 15]" small="false" background layout="total, sizes, prev, pager, next, jumper" :total="totalSize1" @size-change="handleSizeChange1" @current-change="handleCurrentChange1" /> |
| | | </div> |
| | | </div> |
| | | </div> |
| | | </div> |
| | | <el-dialog v-model="dialogDetails" title="作业申请详情"> |
| | | <el-form :model="details" label-width="120px"> |
| | | <el-form-item label="作业申请单号"> |
| | | <el-input |
| | | v-model="details.workPermitNo" |
| | | readonly |
| | | /> |
| | | </el-form-item> |
| | | <el-form-item label="申请人"> |
| | | <el-input |
| | | v-model="details.applyUname" |
| | | readonly |
| | | /> |
| | | </el-form-item> |
| | | <el-form-item label="部门名称"> |
| | | <el-input |
| | | v-model="details.depName" |
| | | readonly |
| | | /> |
| | | </el-form-item> |
| | | <el-form-item label="作业人"> |
| | | <el-input |
| | | v-model="details.operators" |
| | | readonly |
| | | type="textarea" |
| | | /> |
| | | </el-form-item> |
| | | <el-form-item label="作业类型"> |
| | | <el-input |
| | | v-model="details.workTypeDesc" |
| | | readonly |
| | | /> |
| | | </el-form-item> |
| | | <el-form-item label="作业等级"> |
| | | <el-input |
| | | v-model="details.workLevelDesc" |
| | | readonly |
| | | /> |
| | | </el-form-item> |
| | | <el-form-item label="作业内容"> |
| | | <el-input |
| | | v-model="details.workContent" |
| | | readonly |
| | | type="textarea" |
| | | /> |
| | | </el-form-item> |
| | | <el-form-item label="作业地址"> |
| | | <el-input |
| | | v-model="details.workLocation" |
| | | readonly |
| | | type="textarea" |
| | | /> |
| | | </el-form-item> |
| | | <el-form-item label="作业方式"> |
| | | <el-input |
| | | v-model="details.workDetail.hotMethod" |
| | | readonly |
| | | type="textarea" |
| | | /> |
| | | </el-form-item> |
| | | <el-form-item label="关联其他作业"> |
| | | <el-input |
| | | v-model="details.workDetail.otherSpecialWork" |
| | | readonly |
| | | type="textarea" |
| | | /> |
| | | </el-form-item> |
| | | <el-form-item label="期望开始时间"> |
| | | <el-input |
| | | v-model="details.expStartTime" |
| | | readonly |
| | | /> |
| | | </el-form-item> |
| | | <el-form-item label="期望结束时间"> |
| | | <el-input |
| | | v-model="details.expEndTime" |
| | | readonly |
| | | /> |
| | | </el-form-item> |
| | | <el-form-item label="申请时间"> |
| | | <el-input |
| | | v-model="details.applyTime" |
| | | readonly |
| | | /> |
| | | </el-form-item> |
| | | <el-form-item label="当前状态"> |
| | | <el-input |
| | | v-model="details.statusDesc" |
| | | readonly |
| | | /> |
| | | </el-form-item> |
| | | <el-form-item> |
| | | <el-button type="primary" @click="dialogDetails = false" size="default">确认</el-button> |
| | | </el-form-item> |
| | | </el-form> |
| | | </el-dialog> |
| | | <el-dialog v-model="dialogStatus" title="作业申请进度"> |
| | | <el-form v-if="approveInfo.operators.length>0" style="margin-bottom: 40px"> |
| | | <el-form-item label="申请作业人"> |
| | | <el-input |
| | | v-model="approveInfo.operators" |
| | | readonly |
| | | type="textarea" |
| | | /> |
| | | </el-form-item> |
| | | </el-form> |
| | | <div style="display: flex;flex-direction: column-reverse"> |
| | | <div v-for="(item,index) in approveInfo.approvalSteps" class="stepItem"> |
| | | <div class="stepNum">{{item.stepSerial}}</div> |
| | | <div class="stepCard"> |
| | | <el-card class="box-card" shadow="always"> |
| | | <div class="text">审批结果:<span>{{item.approvalResultDesc}}</span></div> |
| | | <div class="text">审批类型:<span>{{item.typeDesc}}</span></div> |
| | | <div class="text" v-show="item.startApprovalTime !=null">开始时间:<span>{{item.startApprovalTime}}</span></div> |
| | | <div class="approveUnit"> |
| | | <div class="item-tit"><span>审批人</span><span>审批状态</span></div> |
| | | <div class="item-cont" v-for="i in item.stepUnits"><span>{{i.approvalUname}}</span><span>{{i.resultDesc}}</span></div> |
| | | </div> |
| | | <div class="approveItem"> |
| | | <div class="item-tit"><span>审批项目</span><span>类型</span><div>措施标准</div></div> |
| | | <div class="item-cont" v-for="i in item.stepItems"><span>{{i.itemName}}</span><span>{{i.typeDesc}}</span> |
| | | <div v-if="i.measure !== null"> |
| | | <div><span>作业类型:</span><span>{{i.measure.workTypeDesc}}</span></div> |
| | | <div><span>措施内容:</span><span>{{i.measure.context}}</span></div> |
| | | </div> |
| | | <div v-if="i.stand !== null"> |
| | | <div><span>标题名称:</span><span>{{i.stand.title}}</span></div> |
| | | <div><span>标准内容:</span><span>{{i.stand.typeDesc}}</span></div> |
| | | </div> |
| | | </div> |
| | | </div> |
| | | <div class="text" v-show="item.expFinishApprovalTime !=null">期望结束时间:<span>{{item.expFinishApprovalTime}}</span></div> |
| | | <div class="text" v-show="item.finishApprovalTime !=null">结束时间:<span>{{item.finishApprovalTime}}</span></div> |
| | | </el-card> |
| | | </div> |
| | | </div> |
| | | </div> |
| | | </el-dialog> |
| | | <el-dialog v-model="deleteDialog" title="提示" width="30%" center @close="indexClear"> |
| | | <span>您确定要取消该条申请吗?</span> |
| | | <template #footer> |
| | | <span class="dialog-footer"> |
| | | <el-button @click="deleteDialog = false" size="default">取消</el-button> |
| | | <el-button type="primary" @click="conFirmDelete" size="default">确认</el-button> |
| | | </span> |
| | | </template> |
| | | </el-dialog> |
| | | </el-tab-pane> |
| | | <el-tab-pane label="已通过" name="2"> |
| | | <div style="height: 100%"> |
| | | <el-row class="homeCard"> |
| | | <el-col :span="8"> |
| | | <div class="grid-content topInfo"> |
| | | <el-input v-model="searchWord" placeholder="作业证名称"></el-input> |
| | | <el-button type="primary">查询</el-button> |
| | | <el-button plain>重置</el-button> |
| | | </div> |
| | | </el-col> |
| | | </el-row> |
| | | <div class="homeCard"> |
| | | <div class="main-card"> |
| | | <el-table |
| | | ref="multipleTableRef" |
| | | :data="passedData" |
| | | style="width: 100%" |
| | | height="calc(100% - 48px)" |
| | | :header-cell-style="{background: '#fafafa'}" |
| | | @selection-change="handleSelectionChange" |
| | | > |
| | | <el-table-column type="selection" width="55" /> |
| | | <el-table-column type="index" label="编号" width="200"/> |
| | | <el-table-column property="level" label="作业证等级" width="180" sortable /> |
| | | <el-table-column property="applyDate" label="申请日期" sortable /> |
| | | <el-table-column property="name" label="申请人" width="180"/> |
| | | <el-table-column property="department" label="申请部门" width="180" /> |
| | | <el-table-column label="申请状态" width="180"> |
| | | <template #default="scope"> |
| | | <el-tag type="success">{{ scope.row.status }}</el-tag> |
| | | </template> |
| | | </el-table-column> |
| | | </el-table> |
| | | <div class="pageBtn"> |
| | | <el-pagination v-model:currentPage="pageIndex2" v-model:page-size="pageSize2" :page-sizes="[10, 15]" small="false" background layout="total, sizes, prev, pager, next, jumper" :total="totalSize2" @size-change="handleSizeChange2" @current-change="handleCurrentChange2" /> |
| | | </div> |
| | | </div> |
| | | </div> |
| | | </div> |
| | | </el-tab-pane> |
| | | </el-tabs> |
| | | </div> |
| | | <div class="home-container"> |
| | | <el-tabs v-model="activeName" class="demo-tabs" @tab-click="handleClick"> |
| | | <el-tab-pane label="申请中" name="1"> |
| | | <div style="height: 100%"> |
| | | <el-row class="homeCard"> |
| | | <el-col :span="8"> |
| | | <div class="grid-content topInfo"> |
| | | <el-input v-model="searchWord" placeholder="作业证名称"></el-input> |
| | | <el-button type="primary">查询</el-button> |
| | | <el-button plain>重置</el-button> |
| | | </div> |
| | | </el-col> |
| | | </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="toApply()">申请</el-button> |
| | | <!-- <el-button type="danger" :icon="Delete" size="default">删除</el-button>--> |
| | | <!-- <el-button type="success" size="default">设置分类</el-button>--> |
| | | </el-col> |
| | | <el-button type="primary" :icon="Refresh" size="default" @click="reLoadData()" /> |
| | | </el-row> |
| | | <el-table ref="multipleTableRef" :data="applyData" style="width: 100%" height="calc(100% - 100px)" :header-cell-style="{ background: '#fafafa' }"> |
| | | <el-table-column property="workPermitNo" label="作业申请单号" width="180" /> |
| | | <el-table-column property="applyUname" label="申请人" /> |
| | | <el-table-column property="depName" label="部门名称" /> |
| | | <el-table-column property="operators" label="作业人" /> |
| | | <el-table-column property="workTypeDesc" label="作业类型" /> |
| | | <el-table-column property="workLevelDesc" label="作业等级" /> |
| | | <el-table-column property="applyTime" label="申请时间" width="180" /> |
| | | <el-table-column label="申请状态" width="180"> |
| | | <template #default="scope"> |
| | | <el-tag type="success">{{ scope.row.statusDesc }}</el-tag> |
| | | </template> |
| | | </el-table-column> |
| | | <el-table-column fixed="right" label="操作" align="center" width="250"> |
| | | <template #default="scope"> |
| | | <el-button link type="primary" size="small" :icon="View" @click="viewRecord(scope.row)">查看</el-button> |
| | | <el-button link type="success" size="small" :icon="Finished" @click="viewStatus(scope.row)">进度</el-button> |
| | | <el-button link type="warning" size="small" :icon="Delete" @click="deleteRecordBtn(scope.row)">取消</el-button> |
| | | </template> |
| | | </el-table-column> |
| | | </el-table> |
| | | <div class="pageBtn"> |
| | | <el-pagination v-model:currentPage="pageIndex1" v-model:page-size="pageSize1" :page-sizes="[10, 15]" small="false" background layout="total, sizes, prev, pager, next, jumper" :total="totalSize1" @size-change="handleSizeChange1" @current-change="handleCurrentChange1" /> |
| | | </div> |
| | | </div> |
| | | </div> |
| | | </div> |
| | | <el-dialog v-model="dialogDetails" title="作业申请详情"> |
| | | <el-form :model="details" label-width="120px"> |
| | | <el-form-item label="作业申请单号"> |
| | | <el-input v-model="details.workPermitNo" readonly /> |
| | | </el-form-item> |
| | | <el-form-item label="申请人"> |
| | | <el-input v-model="details.applyUname" readonly /> |
| | | </el-form-item> |
| | | <el-form-item label="部门名称"> |
| | | <el-input v-model="details.depName" readonly /> |
| | | </el-form-item> |
| | | <el-form-item label="作业人"> |
| | | <el-input v-model="details.operators" readonly type="textarea" /> |
| | | </el-form-item> |
| | | <el-form-item label="作业类型"> |
| | | <el-input v-model="details.workTypeDesc" readonly /> |
| | | </el-form-item> |
| | | <el-form-item label="作业等级"> |
| | | <el-input v-model="details.workLevelDesc" readonly /> |
| | | </el-form-item> |
| | | <el-form-item label="作业内容"> |
| | | <el-input v-model="details.workContent" readonly type="textarea" /> |
| | | </el-form-item> |
| | | <el-form-item label="作业地址"> |
| | | <el-input v-model="details.workLocation" readonly type="textarea" /> |
| | | </el-form-item> |
| | | <el-form-item label="作业方式"> |
| | | <el-input v-model="details.workDetail.hotMethod" readonly type="textarea" /> |
| | | </el-form-item> |
| | | <el-form-item label="关联其他作业"> |
| | | <el-input v-model="details.workDetail.otherSpecialWork" readonly type="textarea" /> |
| | | </el-form-item> |
| | | <el-form-item label="期望开始时间"> |
| | | <el-input v-model="details.expStartTime" readonly /> |
| | | </el-form-item> |
| | | <el-form-item label="期望结束时间"> |
| | | <el-input v-model="details.expEndTime" readonly /> |
| | | </el-form-item> |
| | | <el-form-item label="申请时间"> |
| | | <el-input v-model="details.applyTime" readonly /> |
| | | </el-form-item> |
| | | <el-form-item label="当前状态"> |
| | | <el-input v-model="details.statusDesc" readonly /> |
| | | </el-form-item> |
| | | <el-form-item> |
| | | <el-button type="primary" @click="dialogDetails = false" size="default">确认</el-button> |
| | | </el-form-item> |
| | | </el-form> |
| | | </el-dialog> |
| | | <el-dialog v-model="dialogStatus" title="作业申请进度"> |
| | | <el-form v-if="approveInfo.operators.length > 0" style="margin-bottom: 40px"> |
| | | <el-form-item label="申请作业人"> |
| | | <el-input v-model="approveInfo.operators" readonly type="textarea" /> |
| | | </el-form-item> |
| | | </el-form> |
| | | <div style="display: flex; flex-direction: column-reverse"> |
| | | <div v-for="(item, index) in approveInfo.approvalSteps" class="stepItem"> |
| | | <div class="stepNum">{{ item.stepSerial }}</div> |
| | | <div class="stepCard"> |
| | | <el-card class="box-card" shadow="always"> |
| | | <div class="text"> |
| | | 审批结果:<span>{{ item.approvalResultDesc }}</span> |
| | | </div> |
| | | <div class="text"> |
| | | 审批类型:<span>{{ item.typeDesc }}</span> |
| | | </div> |
| | | <div class="text" v-show="item.startApprovalTime != null"> |
| | | 开始时间:<span>{{ item.startApprovalTime }}</span> |
| | | </div> |
| | | <div class="approveUnit"> |
| | | <div class="item-tit"><span>审批人</span><span>审批状态</span></div> |
| | | <div class="item-cont" v-for="i in item.stepUnits"> |
| | | <span>{{ i.approvalUname }}</span |
| | | ><span>{{ i.resultDesc }}</span> |
| | | </div> |
| | | </div> |
| | | <div class="approveItem"> |
| | | <div class="item-tit"> |
| | | <span>审批项目</span><span>类型</span> |
| | | <div>措施标准</div> |
| | | </div> |
| | | <div class="item-cont" v-for="i in item.stepItems"> |
| | | <span>{{ i.itemName }}</span |
| | | ><span>{{ i.typeDesc }}</span> |
| | | <div v-if="i.measure !== null"> |
| | | <div> |
| | | <span>作业类型:</span><span>{{ i.measure.workTypeDesc }}</span> |
| | | </div> |
| | | <div> |
| | | <span>措施内容:</span><span>{{ i.measure.context }}</span> |
| | | </div> |
| | | </div> |
| | | <div v-if="i.stand !== null"> |
| | | <div> |
| | | <span>标题名称:</span><span>{{ i.stand.title }}</span> |
| | | </div> |
| | | <div> |
| | | <span>标准内容:</span><span>{{ i.stand.typeDesc }}</span> |
| | | </div> |
| | | </div> |
| | | </div> |
| | | </div> |
| | | <div class="text" v-show="item.expFinishApprovalTime != null"> |
| | | 期望结束时间:<span>{{ item.expFinishApprovalTime }}</span> |
| | | </div> |
| | | <div class="text" v-show="item.finishApprovalTime != null"> |
| | | 结束时间:<span>{{ item.finishApprovalTime }}</span> |
| | | </div> |
| | | </el-card> |
| | | </div> |
| | | </div> |
| | | </div> |
| | | </el-dialog> |
| | | <el-dialog v-model="deleteDialog" title="提示" width="30%" center @close="indexClear"> |
| | | <span>您确定要取消该条申请吗?</span> |
| | | <template #footer> |
| | | <span class="dialog-footer"> |
| | | <el-button @click="deleteDialog = false" size="default">取消</el-button> |
| | | <el-button type="primary" @click="conFirmDelete" size="default">确认</el-button> |
| | | </span> |
| | | </template> |
| | | </el-dialog> |
| | | </el-tab-pane> |
| | | <el-tab-pane label="已通过" name="2"> |
| | | <div style="height: 100%"> |
| | | <el-row class="homeCard"> |
| | | <el-col :span="8"> |
| | | <div class="grid-content topInfo"> |
| | | <el-input v-model="searchWord" placeholder="作业证名称"></el-input> |
| | | <el-button type="primary">查询</el-button> |
| | | <el-button plain>重置</el-button> |
| | | </div> |
| | | </el-col> |
| | | </el-row> |
| | | <div class="homeCard"> |
| | | <div class="main-card"> |
| | | <el-table ref="multipleTableRef" :data="passedData" style="width: 100%" height="calc(100% - 48px)" :header-cell-style="{ background: '#fafafa' }" @selection-change="handleSelectionChange"> |
| | | <el-table-column type="selection" width="55" /> |
| | | <el-table-column type="index" label="编号" width="200" /> |
| | | <el-table-column property="level" label="作业证等级" width="180" sortable /> |
| | | <el-table-column property="applyDate" label="申请日期" sortable /> |
| | | <el-table-column property="name" label="申请人" width="180" /> |
| | | <el-table-column property="department" label="申请部门" width="180" /> |
| | | <el-table-column label="申请状态" width="180"> |
| | | <template #default="scope"> |
| | | <el-tag type="success">{{ scope.row.status }}</el-tag> |
| | | </template> |
| | | </el-table-column> |
| | | </el-table> |
| | | <div class="pageBtn"> |
| | | <el-pagination v-model:currentPage="pageIndex2" v-model:page-size="pageSize2" :page-sizes="[10, 15]" small="false" background layout="total, sizes, prev, pager, next, jumper" :total="totalSize2" @size-change="handleSizeChange2" @current-change="handleCurrentChange2" /> |
| | | </div> |
| | | </div> |
| | | </div> |
| | | </div> |
| | | </el-tab-pane> |
| | | </el-tabs> |
| | | </div> |
| | | </template> |
| | | |
| | | <script lang="ts"> |
| | | import { toRefs, reactive, defineComponent, ref, onMounted } from 'vue'; |
| | | import { storeToRefs } from 'pinia'; |
| | | import { initBackEndControlRoutes } from '/@/router/backEnd'; |
| | | import { useUserInfo } from '/@/stores/userInfo'; |
| | | import { Session } from '/@/utils/storage'; |
| | | import { useRouter } from 'vue-router'; |
| | | import { Edit, View, Plus, Delete, Refresh, Search, Finished } from '@element-plus/icons-vue'; |
| | | import { ElTable } from 'element-plus'; |
| | | import { FormInstance, FormRules, ElMessage } from 'element-plus'; |
| | | import { workApplyApi } from '/@/api/specialWorkSystem/workApply'; |
| | | import type { TabsPaneContext } from 'element-plus' |
| | | import { toRefs, reactive, defineComponent, ref, onMounted } from 'vue'; |
| | | import { storeToRefs } from 'pinia'; |
| | | import { initBackEndControlRoutes } from '/@/router/backEnd'; |
| | | import { useUserInfo } from '/@/stores/userInfo'; |
| | | import { Session } from '/@/utils/storage'; |
| | | import { useRouter } from 'vue-router'; |
| | | import { Edit, View, Plus, Delete, Refresh, Search, Finished } from '@element-plus/icons-vue'; |
| | | import { ElTable } from 'element-plus'; |
| | | import { FormInstance, FormRules, ElMessage } from 'element-plus'; |
| | | import { workApplyApi } from '/@/api/specialWorkSystem/workApply'; |
| | | import type { TabsPaneContext } from 'element-plus'; |
| | | |
| | | // 定义接口来定义对象的类型 |
| | | interface stateType { |
| | | applyData: Array<string>; |
| | | workTimeList: Array<string>; |
| | | multipleSelection: Array<any>; |
| | | deleteArr: Array<any>; |
| | | approveInfo: Object; |
| | | dialogDetails: boolean; |
| | | dialogStatus: boolean; |
| | | deleteDialog: boolean; |
| | | pageIndex1: number; |
| | | pageSize1: number; |
| | | chosenIndex: null | number; |
| | | deleteId: null | number; |
| | | searchWord: string; |
| | | totalSize1: number; |
| | | activeName:string; |
| | | addRecord: {}; |
| | | details: {}; |
| | | statusInfo:{} |
| | | } |
| | | // 定义接口来定义对象的类型 |
| | | interface stateType { |
| | | applyData: Array<string>; |
| | | workTimeList: Array<string>; |
| | | multipleSelection: Array<any>; |
| | | deleteArr: Array<any>; |
| | | approveInfo: Object; |
| | | dialogDetails: boolean; |
| | | dialogStatus: boolean; |
| | | deleteDialog: boolean; |
| | | pageIndex1: number; |
| | | pageSize1: number; |
| | | chosenIndex: null | number; |
| | | deleteId: null | number; |
| | | searchWord: string; |
| | | totalSize1: number; |
| | | activeName: string; |
| | | addRecord: {}; |
| | | details: {}; |
| | | statusInfo: {}; |
| | | workType: Array<type>; |
| | | } |
| | | interface type { |
| | | id: number; |
| | | name: string; |
| | | } |
| | | |
| | | export default defineComponent({ |
| | | name: 'myApply', |
| | | components: {}, |
| | | setup() { |
| | | const userInfo = useUserInfo(); |
| | | const { userInfos } = storeToRefs(userInfo); |
| | | const router = useRouter(); |
| | | const state = reactive<stateType>({ |
| | | pageIndex1: 1, |
| | | pageSize1: 10, |
| | | totalSize1: 0, |
| | | activeName: '1', |
| | | chosenIndex: null, |
| | | searchWord: '', |
| | | applyData: [], |
| | | workTimeList: [], |
| | | multipleSelection: [], |
| | | approveInfo: { |
| | | approvalSteps:[], |
| | | operators: [] |
| | | }, |
| | | dialogDetails: false, |
| | | dialogStatus: false, |
| | | deleteDialog: false, |
| | | addRecord: {}, |
| | | details: {}, |
| | | statusInfo:{}, |
| | | deleteId: null, |
| | | deleteArr: [] |
| | | }); |
| | | interface User { |
| | | name: string; |
| | | list: []; |
| | | info: string; |
| | | } |
| | | export default defineComponent({ |
| | | name: 'myApply', |
| | | components: {}, |
| | | setup() { |
| | | const userInfo = useUserInfo(); |
| | | const { userInfos } = storeToRefs(userInfo); |
| | | const router = useRouter(); |
| | | const state = reactive<stateType>({ |
| | | pageIndex1: 1, |
| | | pageSize1: 10, |
| | | totalSize1: 0, |
| | | activeName: '1', |
| | | chosenIndex: null, |
| | | searchWord: '', |
| | | applyData: [], |
| | | workTimeList: [], |
| | | multipleSelection: [], |
| | | approveInfo: { |
| | | approvalSteps: [], |
| | | operators: [] |
| | | }, |
| | | dialogDetails: false, |
| | | dialogStatus: false, |
| | | deleteDialog: false, |
| | | addRecord: {}, |
| | | details: {}, |
| | | statusInfo: {}, |
| | | deleteId: null, |
| | | deleteArr: [], |
| | | workType: [ |
| | | { id: 1, name: '动火作业' }, |
| | | { id: 2, name: '受限空间作业' }, |
| | | { id: 3, name: '吊装作业' }, |
| | | { id: 4, name: '动土作业' }, |
| | | { id: 5, name: '断路作业' }, |
| | | { id: 6, name: '高处作业' }, |
| | | { id: 7, name: '临时用电作业' }, |
| | | { id: 8, name: '盲板抽堵作业' } |
| | | ] |
| | | }); |
| | | interface User { |
| | | name: string; |
| | | list: []; |
| | | info: string; |
| | | } |
| | | |
| | | // 刷新 |
| | | const reLoadData = async () => { |
| | | getListByPage(); |
| | | }; |
| | | // 刷新 |
| | | const reLoadData = async () => { |
| | | getListByPage(); |
| | | }; |
| | | |
| | | // 填写表单 |
| | | const toApply =()=>{ |
| | | router.push({ |
| | | path: 'workTicket', |
| | | }); |
| | | } |
| | | // 填写表单 |
| | | const toApply = () => { |
| | | router.push({ |
| | | path: 'workTicket' |
| | | }); |
| | | }; |
| | | |
| | | const handleClick = (tab: TabsPaneContext, event: Event) => { |
| | | console.log(tab, event) |
| | | } |
| | | const handleClick = (tab: TabsPaneContext, event: Event) => { |
| | | console.log(tab, event); |
| | | }; |
| | | |
| | | // 分页获取工作时间组列表 |
| | | const getListByPage = async () => { |
| | | const data = { pageSize: state.pageSize1, pageIndex: state.pageIndex1, searchParams: { name: state.searchWord } }; |
| | | let res = await workApplyApi().getApplyListtPage(data); |
| | | if (res.data.code === '200') { |
| | | state.applyData = JSON.parse(JSON.stringify(res.data.data)) |
| | | state.applyData = state.applyData.map((item) => { |
| | | if (item.operators == null || item.operators == []){ |
| | | item.operators = []; |
| | | } else { |
| | | item.operators = Array.from(item.operators, ({ operatorUname }) => operatorUname); |
| | | } |
| | | return item; |
| | | }); |
| | | state.totalSize1 = res.data.total |
| | | console.log('0212121') |
| | | } else { |
| | | ElMessage({ |
| | | type: 'warning', |
| | | message: res.data.msg |
| | | }); |
| | | } |
| | | }; |
| | | // 分页获取工作时间组列表 |
| | | const getListByPage = async () => { |
| | | const data = { pageSize: state.pageSize1, pageIndex: state.pageIndex1, searchParams: { name: state.searchWord } }; |
| | | let res = await workApplyApi().getApplyListtPage(data); |
| | | if (res.data.code === '200') { |
| | | state.applyData = JSON.parse(JSON.stringify(res.data.data)); |
| | | state.applyData = state.applyData.map((item) => { |
| | | if (item.operators == null || item.operators == []) { |
| | | item.operators = []; |
| | | } else { |
| | | item.operators = Array.from(item.operators, ({ operatorUname }) => operatorUname); |
| | | } |
| | | return item; |
| | | }); |
| | | state.totalSize1 = res.data.total; |
| | | console.log('0212121'); |
| | | } else { |
| | | ElMessage({ |
| | | type: 'warning', |
| | | message: res.data.msg |
| | | }); |
| | | } |
| | | }; |
| | | |
| | | // 表格数据格式化 |
| | | const toNames = (row, column, cellValue, index) => { |
| | | if (row.list == []) { |
| | | return []; |
| | | } else { |
| | | const nameList = []; |
| | | for (let i = 0; i < row.list.length; i++) { |
| | | for (let t = 0; t < state.workTimeList.length; t++) { |
| | | if (row.list[i] == state.workTimeList[t].id) { |
| | | nameList.push(state.workTimeList[t].name); |
| | | } |
| | | } |
| | | } |
| | | return nameList.join(); |
| | | } |
| | | }; |
| | | // 表格数据格式化 |
| | | const toNames = (row, column, cellValue, index) => { |
| | | if (row.list == []) { |
| | | return []; |
| | | } else { |
| | | const nameList = []; |
| | | for (let i = 0; i < row.list.length; i++) { |
| | | for (let t = 0; t < state.workTimeList.length; t++) { |
| | | if (row.list[i] == state.workTimeList[t].id) { |
| | | nameList.push(state.workTimeList[t].name); |
| | | } |
| | | } |
| | | } |
| | | return nameList.join(); |
| | | } |
| | | }; |
| | | |
| | | // 关键词查询记录 |
| | | const searchRecord = async () => { |
| | | if (state.searchWord == '') { |
| | | ElMessage({ |
| | | type: 'warning', |
| | | message: '请输入查询关键词' |
| | | }); |
| | | } else { |
| | | getListByPage(); |
| | | } |
| | | }; |
| | | // 关键词查询记录 |
| | | const searchRecord = async () => { |
| | | if (state.searchWord == '') { |
| | | ElMessage({ |
| | | type: 'warning', |
| | | message: '请输入查询关键词' |
| | | }); |
| | | } else { |
| | | getListByPage(); |
| | | } |
| | | }; |
| | | |
| | | const clearSearch = async () => { |
| | | state.searchWord = ''; |
| | | getListByPage(); |
| | | }; |
| | | const clearSearch = async () => { |
| | | state.searchWord = ''; |
| | | getListByPage(); |
| | | }; |
| | | |
| | | // 查看进度 |
| | | const viewStatus = (row)=>{ |
| | | getStatus({ workApplyId: row.workApplyId }); |
| | | state.dialogStatus = true |
| | | }; |
| | | // 查看进度 |
| | | const viewStatus = (row) => { |
| | | getStatus({ workApplyId: row.workApplyId }); |
| | | state.dialogStatus = true; |
| | | }; |
| | | |
| | | // 查询进度方法 |
| | | const getStatus = async (data: any) => { |
| | | let res = await workApplyApi().getStatus(data); |
| | | if (res.data.code === '200') { |
| | | state.approveInfo = JSON.parse(JSON.stringify(res.data.data)) |
| | | state.approveInfo.operators = Array.from(state.approveInfo.operators, ({ operatorUname }) => operatorUname); |
| | | console.log(state.approveInfo,'steps') |
| | | } else { |
| | | ElMessage({ |
| | | type: 'warning', |
| | | message: res.data.msg |
| | | }); |
| | | } |
| | | }; |
| | | // 查询进度方法 |
| | | const getStatus = async (data: any) => { |
| | | let res = await workApplyApi().getStatus(data); |
| | | if (res.data.code === '200') { |
| | | state.approveInfo = JSON.parse(JSON.stringify(res.data.data)); |
| | | state.approveInfo.operators = Array.from(state.approveInfo.operators, ({ operatorUname }) => operatorUname); |
| | | console.log(state.approveInfo, 'steps'); |
| | | } else { |
| | | ElMessage({ |
| | | type: 'warning', |
| | | message: res.data.msg |
| | | }); |
| | | } |
| | | }; |
| | | |
| | | const deleteRecordBtn = (row) => { |
| | | state.deleteId = row.workApplyId; |
| | | state.deleteDialog = true; |
| | | }; |
| | | const deleteRecordBtn = (row) => { |
| | | state.deleteId = row.workApplyId; |
| | | state.deleteDialog = true; |
| | | }; |
| | | |
| | | // 取消申请方法 |
| | | const deleteRecord = async (data: any) => { |
| | | let res = await workApplyApi().cancelApply(data); |
| | | if (res.data.code === '200') { |
| | | ElMessage({ |
| | | type: 'success', |
| | | message: res.data.msg |
| | | }); |
| | | getListByPage(); |
| | | } else { |
| | | ElMessage({ |
| | | type: 'warning', |
| | | message: res.data.msg |
| | | }); |
| | | } |
| | | }; |
| | | // 取消申请方法 |
| | | const deleteRecord = async (data: any) => { |
| | | let res = await workApplyApi().cancelApply(data); |
| | | if (res.data.code === '200') { |
| | | ElMessage({ |
| | | type: 'success', |
| | | message: res.data.msg |
| | | }); |
| | | getListByPage(); |
| | | } else { |
| | | ElMessage({ |
| | | type: 'warning', |
| | | message: res.data.msg |
| | | }); |
| | | } |
| | | }; |
| | | |
| | | const conFirmDelete = () => { |
| | | deleteRecord({ workApplyId: state.deleteId }); |
| | | state.deleteDialog = false; |
| | | }; |
| | | const conFirmDelete = () => { |
| | | deleteRecord({ workApplyId: state.deleteId }); |
| | | state.deleteDialog = false; |
| | | }; |
| | | |
| | | const handleSizeChange1 = (val: number) => { |
| | | state.pageSize1 = val; |
| | | getListByPage(); |
| | | }; |
| | | const handleCurrentChange1 = (val: number) => { |
| | | state.pageIndex1 = val; |
| | | getListByPage(); |
| | | }; |
| | | const handleSizeChange1 = (val: number) => { |
| | | state.pageSize1 = val; |
| | | getListByPage(); |
| | | }; |
| | | const handleCurrentChange1 = (val: number) => { |
| | | state.pageIndex1 = val; |
| | | getListByPage(); |
| | | }; |
| | | |
| | | // 查看记录 |
| | | const viewRecord = (row) => { |
| | | state.details = JSON.parse(JSON.stringify(row)); |
| | | state.details.workDetail.otherSpecialWork = state.details.workDetail.otherSpecialWork.split(',') |
| | | if(state.details.workDetail.otherSpecialWork == null || state.details.workDetail.otherSpecialWork == []){state.details.workDetail.otherSpecialWork = []} |
| | | else{ |
| | | state.details.workDetail.otherSpecialWork.map(item =>{ |
| | | console.log(item,'item') |
| | | if(item == '1'){ |
| | | item = '动火作业' |
| | | return item |
| | | } else if(item == '2'){ |
| | | item = '受限空间作业' |
| | | return item |
| | | } else if(item == '3'){ |
| | | item = '吊装作业' |
| | | return item |
| | | } else if(item == '4'){ |
| | | item = '动土作业' |
| | | return item |
| | | } else if(item == '5'){ |
| | | item = '断路作业' |
| | | return item |
| | | } else if(item == '6'){ |
| | | item = '高处作业' |
| | | return item |
| | | } else if(item == '7'){ |
| | | item = '临时用电作业' |
| | | return item |
| | | } else { |
| | | item = '盲板抽堵作业' |
| | | return item |
| | | } |
| | | }) |
| | | } |
| | | console.log(state.details.workDetail.otherSpecialWork,'666666') |
| | | state.dialogDetails = true; |
| | | }; |
| | | // 查看记录 |
| | | const viewRecord = (row: any) => { |
| | | row.workDetail.otherSpecialWork = JSON.parse(JSON.stringify(row.workDetail.otherSpecialWork.split(','))).map((item: Array<string>) => { |
| | | return state.workType.find((i: { id: number }) => i.id === Number(item))?.name; |
| | | }); |
| | | state.details = JSON.parse(JSON.stringify(row)); |
| | | // state.details.workDetail.otherSpecialWork = state.details.workDetail.otherSpecialWork.split(','); |
| | | // if (state.details.workDetail.otherSpecialWork == null || state.details.workDetail.otherSpecialWork == []) { |
| | | // state.details.workDetail.otherSpecialWork = []; |
| | | // } else { |
| | | // state.details.workDetail.otherSpecialWork.map((item) => { |
| | | // console.log(item, 'item'); |
| | | // if (item == '1') { |
| | | // item = '动火作业'; |
| | | // return item; |
| | | // } else if (item == '2') { |
| | | // item = '受限空间作业'; |
| | | // return item; |
| | | // } else if (item == '3') { |
| | | // item = '吊装作业'; |
| | | // return item; |
| | | // } else if (item == '4') { |
| | | // item = '动土作业'; |
| | | // return item; |
| | | // } else if (item == '5') { |
| | | // item = '断路作业'; |
| | | // return item; |
| | | // } else if (item == '6') { |
| | | // item = '高处作业'; |
| | | // return item; |
| | | // } else if (item == '7') { |
| | | // item = '临时用电作业'; |
| | | // return item; |
| | | // } else { |
| | | // item = '盲板抽堵作业'; |
| | | // return item; |
| | | // } |
| | | // }); |
| | | // } |
| | | // console.log(state.details.workDetail.otherSpecialWork, '666666'); |
| | | state.dialogDetails = true; |
| | | }; |
| | | |
| | | // 折线图 |
| | | const renderMenu = async (value: string) => { |
| | | Session.set('projectId', value); |
| | | userInfos.value.projectId = value; |
| | | await initBackEndControlRoutes(); |
| | | }; |
| | | |
| | | // 折线图 |
| | | const renderMenu = async (value: string) => { |
| | | Session.set('projectId', value); |
| | | userInfos.value.projectId = value; |
| | | await initBackEndControlRoutes(); |
| | | }; |
| | | // 页面载入时执行方法 |
| | | onMounted(() => { |
| | | getListByPage(); |
| | | }); |
| | | |
| | | // 页面载入时执行方法 |
| | | onMounted(() => { |
| | | getListByPage(); |
| | | }); |
| | | |
| | | return { |
| | | View, |
| | | Edit, |
| | | Delete, |
| | | Refresh, |
| | | Plus, |
| | | Finished, |
| | | reLoadData, |
| | | toApply, |
| | | handleClick, |
| | | toNames, |
| | | searchRecord, |
| | | clearSearch, |
| | | viewRecord, |
| | | viewStatus, |
| | | deleteRecordBtn, |
| | | conFirmDelete, |
| | | getListByPage, |
| | | handleSizeChange1, |
| | | handleCurrentChange1, |
| | | ...toRefs(state) |
| | | }; |
| | | } |
| | | }); |
| | | return { |
| | | View, |
| | | Edit, |
| | | Delete, |
| | | Refresh, |
| | | Plus, |
| | | Finished, |
| | | reLoadData, |
| | | toApply, |
| | | handleClick, |
| | | toNames, |
| | | searchRecord, |
| | | clearSearch, |
| | | viewRecord, |
| | | viewStatus, |
| | | deleteRecordBtn, |
| | | conFirmDelete, |
| | | getListByPage, |
| | | handleSizeChange1, |
| | | handleCurrentChange1, |
| | | ...toRefs(state) |
| | | }; |
| | | } |
| | | }); |
| | | </script> |
| | | |
| | | <style scoped lang="scss"> |
| | | $homeNavLengh: 8; |
| | | .home-container { |
| | | height: calc(100vh - 144px); |
| | | box-sizing: border-box; |
| | | overflow: hidden; |
| | | .demo-tabs{ |
| | | width: 100%; |
| | | height: 100%; |
| | | $homeNavLengh: 8; |
| | | .home-container { |
| | | height: calc(100vh - 144px); |
| | | box-sizing: border-box; |
| | | overflow: hidden; |
| | | .demo-tabs { |
| | | width: 100%; |
| | | height: 100%; |
| | | |
| | | &::v-deep(.el-tabs__content){ |
| | | height: calc(100% - 60px); |
| | | } |
| | | &::v-deep(.el-tabs__content) { |
| | | height: calc(100% - 60px); |
| | | } |
| | | |
| | | .el-tab-pane{ |
| | | height: 100%; |
| | | } |
| | | } |
| | | .homeCard{ |
| | | width: 100%; |
| | | padding: 20px; |
| | | box-sizing: border-box; |
| | | background: #fff; |
| | | border-radius: 4px; |
| | | .el-tab-pane { |
| | | height: 100%; |
| | | } |
| | | } |
| | | .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; |
| | | .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); |
| | | } |
| | | } |
| | | .stepItem{ |
| | | display: flex; |
| | | align-items: flex-start; |
| | | margin-top: 30px; |
| | | margin-left: 30px; |
| | | padding-bottom: 30px; |
| | | padding-left: 40px; |
| | | border-left: 1px solid #a0cfff; |
| | | position: relative; |
| | | &:first-of-type{ |
| | | margin-top: 30px; |
| | | } |
| | | &:first-of-type{ |
| | | margin-bottom: 0; |
| | | border-left: none; |
| | | } |
| | | .stepNum { |
| | | position: absolute; |
| | | width: 40px; |
| | | height: 40px; |
| | | border-radius: 20px; |
| | | box-sizing: border-box; |
| | | font-size: 18px; |
| | | color: #333; |
| | | border: 1px solid #a0cfff; |
| | | line-height: 38px; |
| | | text-align: center; |
| | | left: -20px; |
| | | top: -30px; |
| | | background: #d9ecff; |
| | | } |
| | | .stepCard { |
| | | width: 100%; |
| | | margin-top: -30px; |
| | | .demo-pagination-block + .demo-pagination-block { |
| | | margin-top: 10px; |
| | | } |
| | | .demo-pagination-block .demonstration { |
| | | margin-bottom: 16px; |
| | | } |
| | | } |
| | | } |
| | | &:last-of-type { |
| | | height: calc(100% - 100px); |
| | | } |
| | | } |
| | | .stepItem { |
| | | display: flex; |
| | | align-items: flex-start; |
| | | margin-top: 30px; |
| | | margin-left: 30px; |
| | | padding-bottom: 30px; |
| | | padding-left: 40px; |
| | | border-left: 1px solid #a0cfff; |
| | | position: relative; |
| | | &:first-of-type { |
| | | margin-top: 30px; |
| | | } |
| | | &:first-of-type { |
| | | margin-bottom: 0; |
| | | border-left: none; |
| | | } |
| | | .stepNum { |
| | | position: absolute; |
| | | width: 40px; |
| | | height: 40px; |
| | | border-radius: 20px; |
| | | box-sizing: border-box; |
| | | font-size: 18px; |
| | | color: #333; |
| | | border: 1px solid #a0cfff; |
| | | line-height: 38px; |
| | | text-align: center; |
| | | left: -20px; |
| | | top: -30px; |
| | | background: #d9ecff; |
| | | } |
| | | .stepCard { |
| | | width: 100%; |
| | | margin-top: -30px; |
| | | |
| | | .box-card { |
| | | width: 100%; |
| | | .box-card { |
| | | width: 100%; |
| | | |
| | | .card-header { |
| | | display: flex; |
| | | justify-content: space-between; |
| | | align-items: center; |
| | | .card-header { |
| | | display: flex; |
| | | justify-content: space-between; |
| | | align-items: center; |
| | | |
| | | span{ |
| | | font-weight: bold; |
| | | margin-left: 10px; |
| | | } |
| | | } |
| | | span { |
| | | font-weight: bold; |
| | | margin-left: 10px; |
| | | } |
| | | } |
| | | |
| | | .text { |
| | | width: 100%; |
| | | font-size: 14px; |
| | | margin-bottom: 10px; |
| | | padding-left: 10px; |
| | | .text { |
| | | width: 100%; |
| | | font-size: 14px; |
| | | margin-bottom: 10px; |
| | | padding-left: 10px; |
| | | |
| | | span{ |
| | | font-weight: bolder; |
| | | color: #409EFF; |
| | | } |
| | | span { |
| | | font-weight: bolder; |
| | | color: #409eff; |
| | | } |
| | | |
| | | &:last-of-type{ |
| | | margin-bottom: 0; |
| | | } |
| | | } |
| | | .approveUnit{ |
| | | width: 100%; |
| | | font-size: 14px; |
| | | margin-bottom: 20px; |
| | | padding: 10px 15px; |
| | | border: 1px solid #fff; |
| | | background: #ECF8FF; |
| | | border-radius: 6px; |
| | | .item-tit{ |
| | | width: 100%; |
| | | display: flex; |
| | | color: #409EFF; |
| | | align-items: flex-start; |
| | | justify-content: space-between; |
| | | padding-bottom: 10px; |
| | | border-bottom: 1px solid #a0cfff; |
| | | &:last-of-type { |
| | | margin-bottom: 0; |
| | | } |
| | | } |
| | | .approveUnit { |
| | | width: 100%; |
| | | font-size: 14px; |
| | | margin-bottom: 20px; |
| | | padding: 10px 15px; |
| | | border: 1px solid #fff; |
| | | background: #ecf8ff; |
| | | border-radius: 6px; |
| | | .item-tit { |
| | | width: 100%; |
| | | display: flex; |
| | | color: #409eff; |
| | | align-items: flex-start; |
| | | justify-content: space-between; |
| | | padding-bottom: 10px; |
| | | border-bottom: 1px solid #a0cfff; |
| | | |
| | | &>span{ |
| | | flex: 1; |
| | | } |
| | | &>div{ |
| | | flex: 2; |
| | | text-align: center; |
| | | } |
| | | } |
| | | .item-cont{ |
| | | width: 100%; |
| | | display: flex; |
| | | align-items: center; |
| | | justify-content: space-between; |
| | | padding: 10px 0; |
| | | border-bottom: 1px solid #c6e2ff; |
| | | & > span { |
| | | flex: 1; |
| | | } |
| | | & > div { |
| | | flex: 2; |
| | | text-align: center; |
| | | } |
| | | } |
| | | .item-cont { |
| | | width: 100%; |
| | | display: flex; |
| | | align-items: center; |
| | | justify-content: space-between; |
| | | padding: 10px 0; |
| | | border-bottom: 1px solid #c6e2ff; |
| | | |
| | | &>span{ |
| | | flex: 1; |
| | | } |
| | | &>div{ |
| | | flex: 2; |
| | | text-align: center; |
| | | & > span { |
| | | flex: 1; |
| | | } |
| | | & > div { |
| | | flex: 2; |
| | | text-align: center; |
| | | |
| | | &>div{ |
| | | text-align: left; |
| | | width: 100%; |
| | | display: flex; |
| | | justify-content: center; |
| | | align-items: center; |
| | | span{ |
| | | width: 45%; |
| | | &:first-of-type{ |
| | | width: 30%; |
| | | } |
| | | } |
| | | } |
| | | } |
| | | &:last-of-type{ |
| | | border-bottom: 0; |
| | | } |
| | | } |
| | | } |
| | | .approveItem{ |
| | | width: 100%; |
| | | font-size: 14px; |
| | | margin-bottom: 20px; |
| | | padding: 10px 15px; |
| | | background: #ECF8FF; |
| | | border: 1px solid #fff; |
| | | border-radius: 6px; |
| | | .item-tit{ |
| | | width: 100%; |
| | | display: flex; |
| | | color: #409EFF; |
| | | align-items: flex-start; |
| | | justify-content: space-between; |
| | | padding-bottom: 10px; |
| | | border-bottom: 1px solid #a0cfff; |
| | | & > div { |
| | | text-align: left; |
| | | width: 100%; |
| | | display: flex; |
| | | justify-content: center; |
| | | align-items: center; |
| | | span { |
| | | width: 45%; |
| | | &:first-of-type { |
| | | width: 30%; |
| | | } |
| | | } |
| | | } |
| | | } |
| | | &:last-of-type { |
| | | border-bottom: 0; |
| | | } |
| | | } |
| | | } |
| | | .approveItem { |
| | | width: 100%; |
| | | font-size: 14px; |
| | | margin-bottom: 20px; |
| | | padding: 10px 15px; |
| | | background: #ecf8ff; |
| | | border: 1px solid #fff; |
| | | border-radius: 6px; |
| | | .item-tit { |
| | | width: 100%; |
| | | display: flex; |
| | | color: #409eff; |
| | | align-items: flex-start; |
| | | justify-content: space-between; |
| | | padding-bottom: 10px; |
| | | border-bottom: 1px solid #a0cfff; |
| | | |
| | | &>span{ |
| | | flex: 1; |
| | | } |
| | | &>div{ |
| | | flex: 2; |
| | | text-align: center; |
| | | & > span { |
| | | flex: 1; |
| | | } |
| | | & > div { |
| | | flex: 2; |
| | | text-align: center; |
| | | } |
| | | } |
| | | .item-cont { |
| | | width: 100%; |
| | | display: flex; |
| | | align-items: center; |
| | | justify-content: space-between; |
| | | padding: 10px 0; |
| | | border-bottom: 1px solid #c6e2ff; |
| | | |
| | | & > span { |
| | | flex: 1; |
| | | } |
| | | & > div { |
| | | flex: 2; |
| | | text-align: center; |
| | | |
| | | } |
| | | } |
| | | .item-cont{ |
| | | width: 100%; |
| | | display: flex; |
| | | align-items: center; |
| | | justify-content: space-between; |
| | | padding: 10px 0; |
| | | border-bottom: 1px solid #c6e2ff; |
| | | & > div { |
| | | text-align: left; |
| | | width: 100%; |
| | | display: flex; |
| | | justify-content: center; |
| | | align-items: center; |
| | | span { |
| | | width: 45%; |
| | | &:first-of-type { |
| | | width: 30%; |
| | | } |
| | | } |
| | | } |
| | | } |
| | | &:last-of-type { |
| | | border-bottom: 0; |
| | | } |
| | | } |
| | | } |
| | | } |
| | | } |
| | | &:hover .card-header { |
| | | color: #0098f5; |
| | | } |
| | | &:hover .stepNum { |
| | | border: 2px solid #0098f5; |
| | | color: #0098f5; |
| | | } |
| | | } |
| | | .el-row { |
| | | display: flex; |
| | | align-items: center; |
| | | margin-bottom: 20px; |
| | | &:last-child { |
| | | margin-bottom: 0; |
| | | } |
| | | .grid-content { |
| | | align-items: center; |
| | | min-height: 36px; |
| | | } |
| | | |
| | | &>span{ |
| | | flex: 1; |
| | | } |
| | | &>div{ |
| | | flex: 2; |
| | | text-align: center; |
| | | .topInfo { |
| | | display: flex; |
| | | align-items: center; |
| | | font-size: 16px; |
| | | font-weight: bold; |
| | | |
| | | &>div{ |
| | | text-align: left; |
| | | width: 100%; |
| | | display: flex; |
| | | justify-content: center; |
| | | align-items: center; |
| | | span{ |
| | | width: 45%; |
| | | &:first-of-type{ |
| | | width: 30%; |
| | | } |
| | | } |
| | | } |
| | | } |
| | | &:last-of-type{ |
| | | border-bottom: 0; |
| | | } |
| | | } |
| | | } |
| | | } |
| | | } |
| | | &:hover .card-header{ |
| | | color: #0098F5; |
| | | } |
| | | &:hover .stepNum{ |
| | | border: 2px solid #0098F5; |
| | | color: #0098F5; |
| | | } |
| | | } |
| | | .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; |
| | | } |
| | | } |
| | | } |
| | | .el-card{ |
| | | border: 0; |
| | | } |
| | | } |
| | | & > div { |
| | | white-space: nowrap; |
| | | margin-right: 20px; |
| | | } |
| | | } |
| | | } |
| | | .el-card { |
| | | border: 0; |
| | | } |
| | | } |
| | | </style> |
| | |
| | | <template> |
| | | <div class="home-container"> |
| | | <div style="height: 100%"> |
| | | <el-form :model="form" label-width="120px" :rules="applyRules" ref="ruleFormRef"> |
| | | <div class="homeCard"> |
| | | <el-row> |
| | | <el-col :span="12"> |
| | | <el-form-item label="作业人" prop="operatorUids"> |
| | | <el-select v-model="form.operatorUids" multiple> |
| | | <el-option |
| | | v-for="item in workerList" |
| | | :key="item.value" |
| | | :label="item.label" |
| | | :value="item.value" |
| | | /> |
| | | </el-select> |
| | | </el-form-item> |
| | | </el-col> |
| | | </el-row> |
| | | <el-row> |
| | | <el-col :span="12"> |
| | | <el-form-item label="作业等级" prop="workLevel"> |
| | | <el-select v-model="form.workLevel"> |
| | | <el-option |
| | | v-for="item in workLevelList" |
| | | :key="item.value" |
| | | :label="item.label" |
| | | :value="item.value" |
| | | /> |
| | | </el-select> |
| | | </el-form-item> |
| | | </el-col> |
| | | <el-col :span="12"> |
| | | <el-form-item label="作业时间" prop="workTimeLine"> |
| | | <el-date-picker |
| | | v-model="form.workTimeLine" |
| | | format="YYYY-MM-DD HH:mm" |
| | | value-format="YYYY-MM-DD HH:mm:00" |
| | | type="datetimerange" |
| | | range-separator="至" |
| | | start-placeholder="开始时间" |
| | | end-placeholder="结束时间" |
| | | /> |
| | | </el-form-item> |
| | | </el-col> |
| | | </el-row> |
| | | <el-row> |
| | | <el-col :span="12"> |
| | | <el-form-item label="作业内容" prop="workContent"> |
| | | <el-input |
| | | v-model="form.workContent" |
| | | autosize |
| | | type="textarea" |
| | | placeholder="请输入作业内容" |
| | | /> |
| | | </el-form-item> |
| | | </el-col> |
| | | <el-col :span="12"> |
| | | <el-form-item label="作业地址" prop="workLocation"> |
| | | <el-input |
| | | v-model="form.workLocation" |
| | | autosize |
| | | type="textarea" |
| | | placeholder="请输入作业地址" |
| | | /> |
| | | </el-form-item> |
| | | </el-col> |
| | | </el-row> |
| | | <el-row> |
| | | <el-col :span="12"> |
| | | <el-form-item label="动火方式" prop="workDetail.hotMethod"> |
| | | <el-input |
| | | v-model="form.workDetail.hotMethod" |
| | | autosize |
| | | type="textarea" |
| | | placeholder="请输入动火方式" |
| | | /> |
| | | </el-form-item> |
| | | </el-col> |
| | | <el-col :span="12"> |
| | | <el-form-item label="关联作业" prop="workDetail.otherSpecialWork"> |
| | | <el-select v-model="form.workDetail.otherSpecialWork" multiple> |
| | | <el-option |
| | | v-for="item in otherWorkList" |
| | | :key="item.value" |
| | | :label="item.label" |
| | | :value="item.value" |
| | | /> |
| | | </el-select> |
| | | </el-form-item> |
| | | </el-col> |
| | | </el-row> |
| | | </div> |
| | | </el-form> |
| | | <div class="applyBtn"> |
| | | <el-button type="primary" size="large" plain @click="submitForm(ruleFormRef)">发起申请</el-button> |
| | | </div> |
| | | </div> |
| | | </div> |
| | | <div class="home-container"> |
| | | <div style="height: 100%"> |
| | | <el-form :model="form" label-width="120px" :rules="applyRules" ref="ruleFormRef"> |
| | | <div class="homeCard"> |
| | | <el-row> |
| | | <el-col :span="12"> |
| | | <el-form-item label="作业人" prop="operatorUids"> |
| | | <el-select v-model="form.operatorUids" multiple> |
| | | <el-option v-for="item in workerList" :key="item.value" :label="item.label" :value="item.value" /> |
| | | </el-select> |
| | | </el-form-item> |
| | | </el-col> |
| | | </el-row> |
| | | <el-row> |
| | | <el-col :span="12"> |
| | | <el-form-item label="作业等级" prop="workLevel"> |
| | | <el-select v-model="form.workLevel"> |
| | | <el-option v-for="item in workLevelList" :key="item.value" :label="item.label" :value="item.value" /> |
| | | </el-select> |
| | | </el-form-item> |
| | | </el-col> |
| | | <el-col :span="12"> |
| | | <el-form-item label="作业时间" prop="workTimeLine"> |
| | | <el-date-picker v-model="form.workTimeLine" format="YYYY-MM-DD HH:mm" value-format="YYYY-MM-DD HH:mm:00" type="datetimerange" range-separator="至" start-placeholder="开始时间" end-placeholder="结束时间" /> |
| | | </el-form-item> |
| | | </el-col> |
| | | </el-row> |
| | | <el-row> |
| | | <el-col :span="12"> |
| | | <el-form-item label="作业内容" prop="workContent"> |
| | | <el-input v-model="form.workContent" autosize type="textarea" placeholder="请输入作业内容" /> |
| | | </el-form-item> |
| | | </el-col> |
| | | <el-col :span="12"> |
| | | <el-form-item label="作业地址" prop="workLocation"> |
| | | <el-input v-model="form.workLocation" autosize type="textarea" placeholder="请输入作业地址" /> |
| | | </el-form-item> |
| | | </el-col> |
| | | </el-row> |
| | | <el-row> |
| | | <el-col :span="12"> |
| | | <el-form-item label="动火方式" prop="workDetail.hotMethod"> |
| | | <el-input v-model="form.workDetail.hotMethod" autosize type="textarea" placeholder="请输入动火方式" /> |
| | | </el-form-item> |
| | | </el-col> |
| | | <el-col :span="12"> |
| | | <el-form-item label="关联作业" prop="workDetail.otherSpecialWork"> |
| | | <el-select v-model="form.workDetail.otherSpecialWork" multiple> |
| | | <el-option v-for="item in otherWorkList" :key="item.value" :label="item.label" :value="item.value" /> |
| | | </el-select> |
| | | </el-form-item> |
| | | </el-col> |
| | | </el-row> |
| | | </div> |
| | | </el-form> |
| | | <div class="applyBtn"> |
| | | <el-button type="primary" size="large" plain @click="submitForm(ruleFormRef)">发起申请</el-button> |
| | | </div> |
| | | </div> |
| | | </div> |
| | | </template> |
| | | |
| | | <script lang="ts"> |
| | | import { toRefs, reactive, defineComponent, ref, defineAsyncComponent } from 'vue'; |
| | | import { storeToRefs } from 'pinia'; |
| | | import { initBackEndControlRoutes } from '/@/router/backEnd'; |
| | | import {useUserInfo} from "/@/stores/userInfo"; |
| | | import { Session } from '/@/utils/storage'; |
| | | import { Search } from '@element-plus/icons-vue' |
| | | import { ElMessage } from 'element-plus' |
| | | import type { FormInstance, FormRules } from 'element-plus' |
| | | import { workApplyApi } from '/@/api/specialWorkSystem/workApply'; |
| | | import { toRefs, reactive, defineComponent, ref, defineAsyncComponent, onMounted } from 'vue'; |
| | | import { storeToRefs } from 'pinia'; |
| | | import { initBackEndControlRoutes } from '/@/router/backEnd'; |
| | | import { useUserInfo } from '/@/stores/userInfo'; |
| | | import { Session } from '/@/utils/storage'; |
| | | import { Search } from '@element-plus/icons-vue'; |
| | | import { ElMessage } from 'element-plus'; |
| | | import type { FormInstance, FormRules } from 'element-plus'; |
| | | import { workApplyApi } from '/@/api/specialWorkSystem/workApply'; |
| | | |
| | | interface stateType { |
| | | form: Object; |
| | | workerList: Array<any>; |
| | | workTypeList: Array<any>; |
| | | workLevelList: Array<any>; |
| | | otherWorkList: Array<any>; |
| | | } |
| | | export default defineComponent({ |
| | | name: 'workTicket', |
| | | components: {}, |
| | | setup() { |
| | | const userInfo = useUserInfo(); |
| | | const { userInfos } = storeToRefs(userInfo); |
| | | const state = reactive<stateType>({ |
| | | form: { |
| | | operatorUids: [], |
| | | workType: 1, |
| | | workLevel: null, |
| | | workContent: '', |
| | | workLocation: '', |
| | | workDetail: { |
| | | hotMethod: '', |
| | | otherSpecialWork: [] |
| | | }, |
| | | workTimeLine: [], |
| | | expStartTime: '', |
| | | expEndTime: '' |
| | | }, |
| | | workerList: [ |
| | | { |
| | | label: '张三', |
| | | value: 53 |
| | | }, |
| | | { |
| | | label: '李四', |
| | | value: 54 |
| | | }, |
| | | { |
| | | label: '测试一', |
| | | value: 55 |
| | | }, |
| | | { |
| | | label: '测试二', |
| | | value: 56 |
| | | } |
| | | ], |
| | | workTypeList: [ |
| | | { |
| | | label: '类型一', |
| | | value: 1 |
| | | }, |
| | | { |
| | | label: '类型二', |
| | | value: 2 |
| | | } |
| | | ], |
| | | workLevelList: [ |
| | | { |
| | | label: '一级动火作业', |
| | | value: 1 |
| | | }, |
| | | { |
| | | label: '二级动火作业', |
| | | value: 2 |
| | | }, |
| | | { |
| | | label: '特级动火作业', |
| | | value: 3 |
| | | } |
| | | ], |
| | | otherWorkList: [ |
| | | { |
| | | label: '动火作业', |
| | | value: 1 |
| | | }, |
| | | { |
| | | label: '受限空间作业', |
| | | value: 2 |
| | | }, |
| | | { |
| | | label: '吊装作业', |
| | | value: 3 |
| | | }, |
| | | { |
| | | label: '动土作业', |
| | | value: 4 |
| | | }, |
| | | { |
| | | label: '断路作业', |
| | | value: 5 |
| | | }, |
| | | { |
| | | label: '高处作业', |
| | | value: 6 |
| | | }, |
| | | { |
| | | label: '临时用电作业', |
| | | value: 7 |
| | | }, |
| | | { |
| | | label: '盲板抽堵作业', |
| | | value: 8 |
| | | } |
| | | ] |
| | | }); |
| | | const ruleFormRef = ref<FormInstance>(); |
| | | const applyRules = reactive<FormRules>({ |
| | | operatorUid: [{ required: true, message: '该内容不能为空', trigger: 'blur' }], |
| | | workType: [{ required: true, message: '该内容不能为空', trigger: 'blur' }], |
| | | workLevel: [{ required: true, message: '该内容不能为空', trigger: 'blur' }], |
| | | workContent: [{ required: true, message: '该内容不能为空', trigger: 'blur' }], |
| | | workLocation: [{ required: true, message: '该内容不能为空', trigger: 'blur' }], |
| | | workTimeLine: [{ required: true, message: '该内容不能为空', trigger: 'blur' }], |
| | | 'workDetail.hotMethod': [{ required: true, message: '该内容不能为空', trigger: 'blur' }], |
| | | 'workDetail.otherSpecialWork': [{ required: true, message: '该内容不能为空', trigger: 'blur' }] |
| | | }); |
| | | const submitForm = async (formEl: FormInstance | undefined) => { |
| | | if (!formEl) return; |
| | | await formEl.validate(async (valid, fields) => { |
| | | if (valid) { |
| | | state.form.expStartTime = JSON.parse(JSON.stringify(state.form.workTimeLine))[0]; |
| | | state.form.expEndTime = JSON.parse(JSON.stringify(state.form.workTimeLine))[1]; |
| | | let { workTimeLine, ...data } = JSON.parse(JSON.stringify(state.form)); |
| | | data.workDetail.otherSpecialWork = data.workDetail.otherSpecialWork.join(','); |
| | | console.log(data, 'data'); |
| | | const res = await workApplyApi().postFireApply(data); |
| | | if (res.data.code === '200') { |
| | | ElMessage({ |
| | | type: 'success', |
| | | message: '提交成功!' |
| | | }); |
| | | formEl.resetFields(); |
| | | } else { |
| | | ElMessage({ |
| | | type: 'warning', |
| | | message: res.data.msg |
| | | }); |
| | | } |
| | | } else { |
| | | console.log('error submit!', fields); |
| | | } |
| | | }); |
| | | }; |
| | | // 折线图 |
| | | const renderMenu = async (value: string) => { |
| | | Session.set('projectId', value); |
| | | userInfos.value.projectId = value; |
| | | await initBackEndControlRoutes(); |
| | | }; |
| | | |
| | | interface stateType { |
| | | form: Object, |
| | | workerList: Array<any>, |
| | | workTypeList: Array<any>, |
| | | workLevelList: Array<any>, |
| | | otherWorkList: Array<any> |
| | | } |
| | | export default defineComponent({ |
| | | name: 'workTicket', |
| | | components: {}, |
| | | setup() { |
| | | const userInfo = useUserInfo() |
| | | const { userInfos } = storeToRefs(userInfo); |
| | | const state = reactive<stateType>({ |
| | | form: { |
| | | operatorUids: [], |
| | | workType: 1, |
| | | workLevel: null, |
| | | workContent: '', |
| | | workLocation: '', |
| | | workDetail:{ |
| | | hotMethod: '', |
| | | otherSpecialWork: [] |
| | | }, |
| | | workTimeLine: [], |
| | | expStartTime: '', |
| | | expEndTime: '' |
| | | }, |
| | | workerList:[ |
| | | { |
| | | label: "张三", |
| | | value: 53 |
| | | }, |
| | | { |
| | | label: "李四", |
| | | value: 54 |
| | | }, |
| | | { |
| | | label: "测试一", |
| | | value: 55 |
| | | }, |
| | | { |
| | | label: "测试二", |
| | | value: 56 |
| | | } |
| | | ], |
| | | workTypeList: [ |
| | | { |
| | | label: "类型一", |
| | | value: 1 |
| | | }, |
| | | { |
| | | label: "类型二", |
| | | value: 2 |
| | | } |
| | | ], |
| | | workLevelList: [ |
| | | { |
| | | label: "一级动火作业", |
| | | value: 1 |
| | | }, |
| | | { |
| | | label: "二级动火作业", |
| | | value: 2 |
| | | }, |
| | | { |
| | | label: "特级动火作业", |
| | | value: 3 |
| | | } |
| | | ], |
| | | otherWorkList: [ |
| | | { |
| | | label: "动火作业", |
| | | value: 1 |
| | | }, |
| | | { |
| | | label: "受限空间作业", |
| | | value: 2 |
| | | }, |
| | | { |
| | | label: "吊装作业", |
| | | value: 3 |
| | | }, |
| | | { |
| | | label: "动土作业", |
| | | value: 4 |
| | | }, |
| | | { |
| | | label: "断路作业", |
| | | value: 5 |
| | | }, |
| | | { |
| | | label: "高处作业", |
| | | value: 6 |
| | | }, |
| | | { |
| | | label: "临时用电作业", |
| | | value: 7 |
| | | }, |
| | | { |
| | | label: "盲板抽堵作业", |
| | | value: 8 |
| | | } |
| | | ] |
| | | }); |
| | | const ruleFormRef = ref<FormInstance>() |
| | | const applyRules = reactive<FormRules>({ |
| | | operatorUid: [{ required: true, message: '该内容不能为空', trigger: 'blur' }], |
| | | workType: [{ required: true, message: '该内容不能为空', trigger: 'blur' }], |
| | | workLevel: [{ required: true, message: '该内容不能为空', trigger: 'blur' }], |
| | | workContent: [{ required: true, message: '该内容不能为空', trigger: 'blur' }], |
| | | workLocation: [{ required: true, message: '该内容不能为空', trigger: 'blur' }], |
| | | workTimeLine: [{ required: true, message: '该内容不能为空', trigger: 'blur' }], |
| | | "workDetail.hotMethod": [{ required: true, message: '该内容不能为空', trigger: 'blur' }], |
| | | "workDetail.otherSpecialWork": [{ required: true, message: '该内容不能为空', trigger: 'blur' }] |
| | | }); |
| | | const submitForm = async (formEl: FormInstance | undefined) => { |
| | | if (!formEl) return |
| | | await formEl.validate(async (valid, fields) => { |
| | | if (valid) { |
| | | state.form.expStartTime = JSON.parse(JSON.stringify(state.form.workTimeLine))[0] |
| | | state.form.expEndTime = JSON.parse(JSON.stringify(state.form.workTimeLine))[1] |
| | | let { workTimeLine, ...data } = JSON.parse(JSON.stringify(state.form)) |
| | | data.workDetail.otherSpecialWork = data.workDetail.otherSpecialWork.join(',') |
| | | console.log(data,'data') |
| | | const res = await workApplyApi().postFireApply(data) |
| | | if (res.data.code === '200') { |
| | | ElMessage({ |
| | | type: 'success', |
| | | message: '提交成功!' |
| | | }); |
| | | formEl.resetFields() |
| | | } else { |
| | | ElMessage({ |
| | | type: 'warning', |
| | | message: res.data.msg |
| | | }); |
| | | } |
| | | } else { |
| | | console.log('error submit!', fields) |
| | | } |
| | | }) |
| | | } |
| | | // 折线图 |
| | | const renderMenu = async (value: string) => { |
| | | Session.set('projectId',value) |
| | | userInfos.value.projectId = value |
| | | await initBackEndControlRoutes(); |
| | | }; |
| | | return { |
| | | renderMenu, |
| | | Search, |
| | | ruleFormRef, |
| | | applyRules, |
| | | submitForm, |
| | | ...toRefs(state), |
| | | }; |
| | | }, |
| | | }); |
| | | return { |
| | | renderMenu, |
| | | Search, |
| | | ruleFormRef, |
| | | applyRules, |
| | | submitForm, |
| | | ...toRefs(state) |
| | | }; |
| | | } |
| | | }); |
| | | </script> |
| | | |
| | | <style scoped lang="scss"> |
| | | .home-container { |
| | | height: 100%; |
| | | overflow: hidden; |
| | | position: relative; |
| | | .homeCard{ |
| | | width: 100%; |
| | | padding: 20px; |
| | | box-sizing: border-box; |
| | | background: #fff; |
| | | border-radius: 4px; |
| | | margin-bottom: 20px; |
| | | } |
| | | .applyBtn{ |
| | | width: 100%; |
| | | background: #fff; |
| | | height: 80px; |
| | | z-index: 5; |
| | | box-shadow: 0 -3px 8px rgba(150,150,150,.1); |
| | | display: flex; |
| | | align-items: center; |
| | | justify-content: center; |
| | | } |
| | | .el-row{ |
| | | margin-bottom: 20px; |
| | | } |
| | | .el-row:last-child { |
| | | margin-bottom: 0; |
| | | } |
| | | .el-input{ |
| | | width: 100% !important; |
| | | } |
| | | .el-date-editor::v-deep{ |
| | | width: 100%; |
| | | } |
| | | .el-select{ |
| | | width: 100%; |
| | | } |
| | | .el-cascader{ |
| | | width: 100% !important; |
| | | } |
| | | } |
| | | .home-container { |
| | | height: 100%; |
| | | overflow: hidden; |
| | | position: relative; |
| | | .homeCard { |
| | | width: 100%; |
| | | padding: 20px; |
| | | box-sizing: border-box; |
| | | background: #fff; |
| | | border-radius: 4px; |
| | | margin-bottom: 20px; |
| | | } |
| | | .applyBtn { |
| | | width: 100%; |
| | | background: #fff; |
| | | height: 80px; |
| | | z-index: 5; |
| | | box-shadow: 0 -3px 8px rgba(150, 150, 150, 0.1); |
| | | display: flex; |
| | | align-items: center; |
| | | justify-content: center; |
| | | } |
| | | .el-row { |
| | | margin-bottom: 20px; |
| | | } |
| | | .el-row:last-child { |
| | | margin-bottom: 0; |
| | | } |
| | | .el-input { |
| | | width: 100% !important; |
| | | } |
| | | .el-date-editor::v-deep { |
| | | width: 100%; |
| | | } |
| | | .el-select { |
| | | width: 100%; |
| | | } |
| | | .el-cascader { |
| | | width: 100% !important; |
| | | } |
| | | } |
| | | </style> |
| | |
| | | <el-row class="cardTop"> |
| | | <el-col :span="12" class="mainCardBtn"> |
| | | <el-button type="primary" :icon="Plus" size="default" @click="openApproveBasicDialog('新增', {})">新建</el-button> |
| | | <!-- <el-button type="danger" :icon="Delete" size="default" plain>删除</el-button>--> |
| | | <el-button type="danger" :icon="Delete" size="default" @click="deleteMoreApproveBasic" plain>批量删除</el-button> |
| | | </el-col> |
| | | <el-button type="primary" :icon="Refresh" size="default" /> |
| | | </el-row> |
| | |
| | | type: 'warning' |
| | | }) |
| | | .then(async () => { |
| | | let res = await approveBasicApi().deleteApproveBasic({ ids: [row.ruleStandId] }); |
| | | if (res.data.code === '200') { |
| | | state.deleteList.ids = []; |
| | | ElMessage({ |
| | | type: 'success', |
| | | duration: 2000, |
| | | message: '删除成功' |
| | | }); |
| | | await getInspectionTask(); |
| | | } else { |
| | | ElMessage({ |
| | | type: 'warning', |
| | | message: res.data.msg |
| | | }); |
| | | } |
| | | }) |
| | | .catch(() => {}); |
| | | }; |
| | | |
| | | // 批量删除 |
| | | const deleteMoreApproveBasic = (row: any) => { |
| | | ElMessageBox.confirm(`此操作将永久删除这些标准项,是否继续?`, '提示', { |
| | | confirmButtonText: '确认', |
| | | cancelButtonText: '取消', |
| | | type: 'warning' |
| | | }) |
| | | .then(async () => { |
| | | let res = await approveBasicApi().deleteApproveBasic(state.deleteList); |
| | | if (res.data.code === '200') { |
| | | ElMessage({ |
| | |
| | | parseNumber, |
| | | handleSelectionChange, |
| | | deleteApproveBasic, |
| | | deleteMoreApproveBasic, |
| | | getInspectionTask, |
| | | onHandleSizeChange, |
| | | onHandleCurrentChange, |
| | |
| | | <el-row class="homeCard"> |
| | | <div class="basic-line"> |
| | | <span>规则名称:</span> |
| | | <el-select v-model="tableData.params.searchParams.ruleName" 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> |
| | | <el-input v-model="tableData.params.searchParams.ruleName" class="input-box" placeholder="规则名称"> </el-input> |
| | | </div> |
| | | <div class="basic-line"> |
| | | <span>部门:</span> |
| | |
| | | <el-row class="cardTop"> |
| | | <el-col :span="12" class="mainCardBtn"> |
| | | <el-button type="primary" :icon="Plus" size="default" @click="openApproveRuleDialog('新增', {})">新建</el-button> |
| | | <!-- <el-button type="danger" :icon="Delete" size="default" plain>删除</el-button>--> |
| | | <el-button type="danger" :icon="Delete" size="default" @click="deleteApproveRule" plain>批量删除</el-button> |
| | | </el-col> |
| | | <el-button type="primary" :icon="Refresh" size="default" /> |
| | | </el-row> |
| | |
| | | <template #default="scope"> |
| | | <el-button link type="primary" size="small" :icon="View" @click="openApproveRuleDialog('查看', scope.row)">查看</el-button> |
| | | <el-button link type="primary" size="small" :icon="Edit" @click="openApproveRuleDialog('修改', scope.row)">修改</el-button> |
| | | <el-button link type="danger" size="small" :icon="Delete" @click="deleteApproveRule(scope.row)">删除</el-button> |
| | | </template> |
| | | </el-table-column> |
| | | </el-table> |
| | |
| | | |
| | | // 删除 |
| | | const deleteApproveRule = (row: any) => { |
| | | ElMessageBox.confirm(`此操作将永久删除该任务:“${row.unitName}”,是否继续?`, '提示', { |
| | | ElMessageBox.confirm(`此操作将永久删除该审批规则,是否继续?`, '提示', { |
| | | confirmButtonText: '确认', |
| | | cancelButtonText: '取消', |
| | | type: 'warning' |
| | | }) |
| | | .then(async () => { |
| | | let res = await approveRuleApi().deleteApproveRule({ ids: [row.id] }); |
| | | state.deleteList.ids = []; |
| | | if (res.data.code === '200') { |
| | | ElMessage({ |
| | | type: 'success', |
| | | duration: 2000, |
| | | message: '删除成功' |
| | | }); |
| | | await getApproveRule(); |
| | | } else { |
| | | ElMessage({ |
| | | type: 'warning', |
| | | message: res.data.msg |
| | | }); |
| | | } |
| | | }) |
| | | .catch(() => {}); |
| | | }; |
| | | |
| | | // 批量删除 |
| | | const deleteMoreApproveRule = (row: any) => { |
| | | ElMessageBox.confirm(`此操作将永久删除这些审批规则,是否继续?`, '提示', { |
| | | confirmButtonText: '确认', |
| | | cancelButtonText: '取消', |
| | | type: 'warning' |
| | |
| | | parseNumber, |
| | | deleteApproveRule, |
| | | getApproveRule, |
| | | deleteMoreApproveRule, |
| | | handleSelectionChange, |
| | | onHandleSizeChange, |
| | | onHandleCurrentChange, |
| | |
| | | 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); |
| | |
| | | onMounted(() => { |
| | | getMenuList(); |
| | | getRoleList(); |
| | | console.log(1); |
| | | }); |
| | | return { |
| | | parseRole, |