已修改20个文件
已删除9个文件
已添加23个文件
已重命名1个文件
| ¶Ô±ÈÐÂÎļþ |
| | |
| | | module.exports = { |
| | | env: { |
| | | browser: true, |
| | | es2021: true, |
| | | node: true, |
| | | }, |
| | | extends: [ |
| | | 'eslint:recommended', |
| | | 'plugin:vue/vue3-essential', |
| | | 'plugin:flowtype/recommended', |
| | | ], |
| | | overrides: [ |
| | | { |
| | | env: { |
| | | node: true, |
| | | }, |
| | | files: [ |
| | | '.eslintrc.{js,cjs}', |
| | | 'cypress/e2e/**/*.{cy,spec}.{js,ts,jsx,tsx}', |
| | | ], |
| | | extends: ['plugin:cypress/recommended'], |
| | | // parserOptions: { |
| | | // sourceType: 'script', |
| | | // }, |
| | | }, |
| | | ], |
| | | parser: 'vue-eslint-parser', |
| | | // parser: '@typescript-eslint/parser', |
| | | parserOptions: { |
| | | ecmaVersion: 'latest', |
| | | sourceType: 'module', |
| | | // parser: '@typescript-eslint/parser', |
| | | // parser: '@babel/eslint-parser', |
| | | // ecmaFeatures: { |
| | | // jsx: true, |
| | | // modules: true, |
| | | // }, |
| | | }, |
| | | plugins: ['vue', '@typescript-eslint'], |
| | | rules: { |
| | | // 'vue/comment-directive': 'off', |
| | | 'no-unused-vars': 1, |
| | | 'no-parsing-error': 0, |
| | | }, |
| | | }; |
| ¶Ô±ÈÐÂÎļþ |
| | |
| | | { |
| | | "$schema": "https://json.schemastore.org/prettierrc", |
| | | "semi": false, |
| | | "tabWidth": 2, |
| | | "singleQuote": true, |
| | | "printWidth": 100, |
| | | "trailingComma": "none" |
| | | } |
| | |
| | | "lint": "eslint . --ext .vue,.js,.jsx,.cjs,.mjs --fix --ignore-path .gitignore" |
| | | }, |
| | | "dependencies": { |
| | | "@ctrl/tinycolor": "^4.0.2", |
| | | "@element-plus/icons-vue": "^2.0.10", |
| | | "@vueuse/core": "^9.7.0", |
| | | "axios": "^1.2.1", |
| | | "dayjs": "^1.11.10", |
| | | "element-plus": "^2.2.26", |
| | | "pinia": "^2.0.26", |
| | | "vue": "^3.2.45", |
| | |
| | | "@babel/core": "^7.20.5", |
| | | "@babel/eslint-parser": "^7.19.1", |
| | | "@babel/preset-env": "^7.20.2", |
| | | "@typescript-eslint/eslint-plugin": "^6.10.0", |
| | | "@typescript-eslint/parser": "^6.10.0", |
| | | "@vitejs/plugin-vue": "^3.2.0", |
| | | "@vue/test-utils": "^2.2.4", |
| | | "autoprefixer": "^10.4.13", |
| | |
| | | "eslint": "^8.22.0", |
| | | "eslint-plugin-cypress": "^2.12.1", |
| | | "eslint-plugin-flowtype": "^8.0.3", |
| | | "eslint-plugin-vue": "^9.3.0", |
| | | "eslint-plugin-vue": "^9.18.1", |
| | | "jsdom": "^20.0.3", |
| | | "less": "^4.1.3", |
| | | "less-loader": "^11.1.0", |
| | | "prettier": "^3.1.0", |
| | | "sass": "^1.56.2", |
| | | "start-server-and-test": "^1.14.0", |
| | | "typescript": "^4.9.4", |
| | |
| | | * @param {Number} action 0ï¼é®é¢éè¿ï¼1ï¼é®é¢ä¸éè¿ï¼2ï¼æ´æ¹éè¿ï¼3æ´æ¹ä¸éè¿ |
| | | */ |
| | | checkProblem({ pId, action, remark = '', userId = id, userName = name }) { |
| | | return $fysp |
| | | .post('problemlist/check', { |
| | | pId: pId, |
| | | action: action, |
| | | remark: remark, |
| | | userId: userId, |
| | | userName: userName, |
| | | }) |
| | | .then((res) => res.data); |
| | | const params = `?pId=${pId}&action=${action}&remark=${remark}&userId=${userId}&userName=${userName}`; |
| | | return $fysp.post(`problemlist/check${params}`).then((res) => res.data); |
| | | }, |
| | | }; |
| | |
| | | * @param {Object} data |
| | | * @returns |
| | | */ |
| | | fetchUser(userId, page = 1, per_page = 20, data) { |
| | | fetchUser(page = 1, per_page = 20, data) { |
| | | const params = `page=${page}&per_page=${per_page}`; |
| | | return $fytz.post(`userInfo/searchUser/${userId}?${params}`, data); |
| | | return $fytz.post(`baseInfo/search/?${params}`, data).then((res) => res.data); |
| | | }, |
| | | |
| | | /** |
| | |
| | | import axios from 'axios'; |
| | | import { ElMessage } from 'element-plus'; |
| | | |
| | | const ip1 = 'http://47.100.191.150:9005/'; |
| | | // const ip1 = 'http://192.168.1.9:8080/'; |
| | | // const ip2 = 'http://47.100.191.150:9006/'; |
| | | const ip2 = 'http://192.168.1.8:8080/'; |
| | | // const ip2 = 'https://fyami.com.cn/'; |
| | | const debug = true; |
| | | |
| | | let ip1 = 'http://47.100.191.150:9005/'; |
| | | let ip1_file = 'http://47.100.191.150:9005/'; |
| | | let ip2 = 'https://fyami.com.cn/'; |
| | | let ip2_file = 'https://fyami.com.cn/'; |
| | | |
| | | if (debug) { |
| | | // ip1 = 'http://192.168.0.123:8082/'; |
| | | // ip1_file = 'http://47.100.191.150:9005/'; |
| | | ip2 = 'http://192.168.0.138:8080/'; |
| | | // ip2_file = 'https://fyami.com.cn/'; |
| | | } |
| | | |
| | | // const ip2 = 'http://192.168.0.123:8080/'; |
| | | |
| | | //é£ç¾½ç管 |
| | | const $fysp = axios.create({ |
| | | baseURL: ip1, |
| | | timeout: 10000, |
| | | }); |
| | | $fysp.imgUrl = `${ip1}images/`; |
| | | $fysp.downloadUrl = `${ip1}files/`; |
| | | $fysp.imgUrl = `${ip1_file}images/`; |
| | | $fysp.downloadUrl = `${ip1_file}files/`; |
| | | |
| | | //é£ç¾½ç¯å¢ |
| | | const $fytz = axios.create({ |
| | | baseURL: ip2, |
| | | timeout: 10000, |
| | | }); |
| | | $fytz.imgUrl = `${ip2}images/`; |
| | | $fytz.imgUrl = `${ip2_file}images/`; |
| | | |
| | | //æ·»å æ¦æªå¨ |
| | | [$fysp, $fytz].forEach((i) => { |
| | |
| | | console.log(response); |
| | | console.log('==>请æ±ç»æ'); |
| | | if (response.status == 200) { |
| | | if (response.data.success != undefined && response.data.success != null) { |
| | | if ( |
| | | response.data.success != undefined && |
| | | response.data.success != null |
| | | ) { |
| | | if (response.data.success == true) { |
| | | return response; |
| | | } else { |
| ¶Ô±ÈÐÂÎļþ |
| | |
| | | .fy-button-div { |
| | | background-color: #545c64; |
| | | color: white; |
| | | padding: 16px 24px; |
| | | font-size: 14px; |
| | | cursor: pointer; |
| | | } |
| | | |
| | | .fy-button-div:hover { |
| | | /* background-color: var(--el-menu-hover-bg-color) */ |
| | | background-color: #40464d; |
| | | } |
| | |
| | | @import './base.css'; |
| | | @import './button.css'; |
| | | |
| | | #app { |
| | | /* background-color: rgb(212, 41, 41); */ |
| | |
| | | BaseContentLayout: typeof import('./components/core/BaseContentLayout.vue')['default'] |
| | | BasePanelLayout: typeof import('./components/core/BasePanelLayout.vue')['default'] |
| | | Content: typeof import('./components/core/Content.vue')['default'] |
| | | copy: typeof import('./components/search-option/OptionScene copy.vue')['default'] |
| | | copy: typeof import('./components/search-option/FYOptionScene copy.vue')['default'] |
| | | ElAside: typeof import('element-plus/es')['ElAside'] |
| | | ElAvatar: typeof import('element-plus/es')['ElAvatar'] |
| | | ElBacktop: typeof import('element-plus/es')['ElBacktop'] |
| | |
| | | ElOption: typeof import('element-plus/es')['ElOption'] |
| | | ElPageHeader: typeof import('element-plus/es')['ElPageHeader'] |
| | | ElPagination: typeof import('element-plus/es')['ElPagination'] |
| | | ElPopover: typeof import('element-plus/es')['ElPopover'] |
| | | ElRow: typeof import('element-plus/es')['ElRow'] |
| | | ElScrollbar: typeof import('element-plus/es')['ElScrollbar'] |
| | | ElSelect: typeof import('element-plus/es')['ElSelect'] |
| | |
| | | ElTree: typeof import('element-plus/es')['ElTree'] |
| | | Footer: typeof import('./components/core/Footer.vue')['default'] |
| | | FormCol: typeof import('./components/layout/FormCol.vue')['default'] |
| | | FYForm: typeof import('./components/form/FYForm.vue')['default'] |
| | | FYOptionLocation: typeof import('./components/search-option/FYOptionLocation.vue')['default'] |
| | | FYOptionOnlineStatus: typeof import('./components/search-option/FYOptionOnlineStatus.vue')['default'] |
| | | FYOptionScene: typeof import('./components/search-option/FYOptionScene.vue')['default'] |
| | | FYOptionText: typeof import('./components/search-option/base/FYOptionText.vue')['default'] |
| | | FYOptionTime: typeof import('./components/search-option/FYOptionTime.vue')['default'] |
| | | FYOptionUserType: typeof import('./components/search-option/FYOptionUserType.vue')['default'] |
| | | FYSearchBar: typeof import('./components/search-option/FYSearchBar.vue')['default'] |
| | | FYTable: typeof import('./components/table/FYTable.vue')['default'] |
| | | Header: typeof import('./components/core/Header.vue')['default'] |
| | | Location: typeof import('./components/search-option/Location.vue')['default'] |
| | | LocationOption: typeof import('./components/search-option/LocationOption.vue')['default'] |
| | | MenuItems: typeof import('./components/core/MenuItems.vue')['default'] |
| | | OptionLocation: typeof import('./components/search-option/OptionLocation.vue')['default'] |
| | | OptionOnlineStatus: typeof import('./components/search-option/OptionOnlineStatus.vue')['default'] |
| | | OptionScene: typeof import('./components/search-option/OptionScene.vue')['default'] |
| | | ProblemCard: typeof import('./components/ProblemCard.vue')['default'] |
| | | RouterLink: typeof import('vue-router')['RouterLink'] |
| | | RouterView: typeof import('vue-router')['RouterView'] |
| | | SceneOption: typeof import('./components/search-option/SceneOption.vue')['default'] |
| | | SearchBar: typeof import('./components/SearchBar.vue')['default'] |
| | | SideList: typeof import('./components/SideList.vue')['default'] |
| | | SiderMenu: typeof import('./components/core/SiderMenu.vue')['default'] |
| | |
| | | <template> |
| | | <el-row class="layout"> |
| | | <el-col :span="16"> |
| | | <el-col :span="12"> |
| | | <el-form :inline="true" :model="formSearch"> |
| | | <el-form-item label="æ»ä»»å¡"> |
| | | <!-- <el-input v-model="formSearch.topTaskId" placeholder="æ»ä»»å¡" /> --> |
| | |
| | | </el-form-item> |
| | | </el-form> |
| | | </el-col> |
| | | <el-col :span="8"> |
| | | <el-col :span="12"> |
| | | <el-row justify="end"> |
| | | <slot name="summary"></slot> |
| | | </el-row> |
| | |
| | | } |
| | | |
| | | .el-header { |
| | | /* height: initial; */ |
| | | padding: 0; |
| | | height: initial; |
| | | padding: 0 0 0px 0; |
| | | /* background-color: rgb(216, 201, 201); */ |
| | | /* border-bottom: 1px solid var(--el-color-info-light-7); */ |
| | | margin-bottom: 4px; |
| | | } |
| | | |
| | | .el-main { |
| | |
| | | @close="handleClose" |
| | | router |
| | | > |
| | | <!-- æ é¢ --> |
| | | <el-row ref="headerRef" class="header"> |
| | | <el-space> |
| | | <el-avatar size="default" icon="UserFilled" /> |
| | | <div>{{ collapse ? '' : title }}</div> |
| | | </el-space> |
| | | </el-row> |
| | | <!-- ç³»ç»åæ¢æé® --> |
| | | <el-popover |
| | | ref="header2Ref" |
| | | placement="right" |
| | | trigger="click" |
| | | effect="dark" |
| | | :visible="popVisible" |
| | | > |
| | | <template #reference> |
| | | <div class="fy-button-div" @click="popVisible = !popVisible"> |
| | | <div style="font-size: 12px; color: gray; margin-left: 24px; margin-bottom: 4px"> |
| | | å½åç³»ç» |
| | | </div> |
| | | <el-row justify="space-between" align="middle"> |
| | | <el-space> |
| | | <el-icon :size="16"><Open /></el-icon> |
| | | <span>{{ sysName }}</span> |
| | | </el-space> |
| | | <el-icon><ArrowRight /></el-icon> |
| | | </el-row> |
| | | </div> |
| | | </template> |
| | | <div class="fy-button-div" v-for="(n, i) in sysNames" :key="i" @click="choseSys(i)"> |
| | | {{ n.name }} |
| | | </div> |
| | | </el-popover> |
| | | <!-- èå --> |
| | | <el-scrollbar :height="menuHeight" v-if="!collapse"> |
| | | <MenuItems :routes="routes" @navPage="navPage"> </MenuItems> |
| | | <MenuItems :routes="menus" @navPage="navPage"> </MenuItems> |
| | | </el-scrollbar> |
| | | |
| | | <template v-else> |
| | | <MenuItems :routes="routes" @navPage="navPage"> </MenuItems> |
| | | <MenuItems :routes="menus" @navPage="navPage"> </MenuItems> |
| | | </template> |
| | | |
| | | <!-- åæ --> |
| | | <el-row ref="subTitleRef" class="sub-title" justify="center"> |
| | | <el-space>{{ collapse ? '' : subTitle }}</el-space> |
| | | </el-row> |
| | |
| | | </template> |
| | | |
| | | <script> |
| | | import { MENU_FYSP, MENU_FYTZ, MENU_FYPW } from '../../constants/index' |
| | | |
| | | export default { |
| | | name: 'CoreSiderMenu', |
| | | props: { |
| | | collapse: { |
| | | type: Boolean, |
| | | default: false, |
| | | }, |
| | | default: false |
| | | } |
| | | }, |
| | | emits: ['navPage'], |
| | | data() { |
| | | return { |
| | | popVisible: false, |
| | | menuHeight: '600px', |
| | | title: 'çæç¯å¢çº¿ä¸ç管', |
| | | subTitle: 'Â©ä¸æµ·é£ç¾½ç¯ä¿ç§ææéå
¬å¸', |
| | | routes: [ |
| | | { |
| | | icon: 'Search', |
| | | name: 'å·¡æ¥å®¡æ ¸', |
| | | children: [ |
| | | { |
| | | path: '/procheck', |
| | | icon: 'Search', |
| | | name: 'é®é¢å®¡æ ¸', |
| | | }, |
| | | // { |
| | | // path: '/changecheck', |
| | | // icon: 'Search', |
| | | // name: 'æ´æ¹å®¡æ ¸', |
| | | // }, |
| | | ], |
| | | }, |
| | | // { |
| | | // path: '/ledger', |
| | | // icon: 'Search', |
| | | // name: 'å°è´¦å®¡æ ¸', |
| | | // }, |
| | | // { |
| | | // icon: 'Search', |
| | | // name: 'ä¸å¡åæ', |
| | | // children: [ |
| | | // { |
| | | // path: '/analysis/profollow', |
| | | // icon: 'Search', |
| | | // name: 'é®é¢å¨æè·è¸ª', |
| | | // }, |
| | | // { |
| | | // path: '/analysis/proanalysis', |
| | | // icon: 'Search', |
| | | // name: 'é®é¢æ´æ¹åæ', |
| | | // }, |
| | | // { |
| | | // path: '/analysis/standardjudge', |
| | | // icon: 'Search', |
| | | // name: 'è§èæ§è¯ä¼°', |
| | | // }, |
| | | // ], |
| | | // }, |
| | | // { |
| | | // path: '/dailyreport', |
| | | // icon: 'Search', |
| | | // name: 'æ¥æ¥ç®¡ç', |
| | | // }, |
| | | // { |
| | | // icon: 'Search', |
| | | // name: 'åºæ¯æ¥å', |
| | | // children: [ |
| | | // { |
| | | // path: '/scenereport/construction', |
| | | // icon: 'Search', |
| | | // name: 'å·¥å°', |
| | | // }, |
| | | // { |
| | | // path: '/scenereport/wharf', |
| | | // icon: 'Search', |
| | | // name: 'ç 头', |
| | | // }, |
| | | // { |
| | | // path: '/scenereport/mixing', |
| | | // icon: 'Search', |
| | | // name: 'æ
æç«', |
| | | // }, |
| | | // { |
| | | // path: '/scenereport/storage', |
| | | // icon: 'Search', |
| | | // name: 'å åº', |
| | | // }, |
| | | // ], |
| | | // }, |
| | | { |
| | | path: '/notice', |
| | | icon: 'Search', |
| | | name: 'éç¥ç®¡ç', |
| | | }, |
| | | { |
| | | icon: 'Search', |
| | | name: 'ç¨æ·ç®¡ç', |
| | | children: [ |
| | | { |
| | | group: true, |
| | | name: 'é£ç¾½ç管', |
| | | children: [ |
| | | // { |
| | | // path: '/fysp/userInfo', |
| | | // name: 'è´¦æ·ä¿¡æ¯', |
| | | // }, |
| | | { |
| | | path: '/fysp/sceneInfo', |
| | | name: 'åºæ¯ä¿¡æ¯', |
| | | }, |
| | | ], |
| | | }, |
| | | { |
| | | group: true, |
| | | name: 'é£ç¾½ç¯å¢', |
| | | children: [ |
| | | { |
| | | path: '/fytz/userInfo', |
| | | name: 'è´¦æ·ä¿¡æ¯', |
| | | }, |
| | | ], |
| | | }, |
| | | ], |
| | | }, |
| | | { |
| | | icon: 'Search', |
| | | name: 'ä¸å¡åæ', |
| | | children: [ |
| | | { |
| | | group: true, |
| | | name: 'é£ç¾½ç管', |
| | | children: [ |
| | | { |
| | | path: '/fysp/userInfo', |
| | | name: 'è´¦æ·ä¿¡æ¯', |
| | | }, |
| | | { |
| | | path: '/fysp/sceneInfo', |
| | | name: 'åºæ¯ä¿¡æ¯', |
| | | }, |
| | | ], |
| | | }, |
| | | { |
| | | group: true, |
| | | name: 'é£ç¾½ç¯å¢', |
| | | children: [ |
| | | // { |
| | | // path: '/fytz/userInfo', |
| | | // name: 'è´¦æ·ä¿¡æ¯', |
| | | // }, |
| | | ], |
| | | }, |
| | | ], |
| | | }, |
| | | // { |
| | | // path: '/scenereport/storage', |
| | | // icon: 'Search', |
| | | // name: 'ææ±¡æ½è¿', |
| | | // }, |
| | | // { |
| | | // path: '/common/userMatch', |
| | | // icon: 'Connection', |
| | | // name: 'è´¦æ·å¹é
', |
| | | // }, |
| | | { |
| | | icon: 'Search', |
| | | name: 'èµæºç®¡ç', |
| | | children: [ |
| | | { |
| | | path: '/fytz/enforceCase', |
| | | icon: 'Search', |
| | | name: 'ç£å¯æ¡ä¾', |
| | | }, |
| | | // { |
| | | // path: '/changecheck', |
| | | // icon: 'Search', |
| | | // name: 'æ´æ¹å®¡æ ¸', |
| | | // }, |
| | | ], |
| | | }, |
| | | ], |
| | | }; |
| | | sysIndex: 0, |
| | | sysNames: [ |
| | | { name: 'é£ç¾½ç管', des: '' }, |
| | | { name: 'é£ç¾½ç¯å¢', des: '' }, |
| | | { name: 'ææ±¡æ½è¿', des: '' } |
| | | ] |
| | | } |
| | | }, |
| | | computed: { |
| | | homePage() { |
| | | return this.routes[0].children |
| | | ? this.routes[0].children[0].path |
| | | : this.routes[0].path; |
| | | const paths = this.menuPath(this.menus[0]) |
| | | return paths[paths.length - 1].path |
| | | }, |
| | | sysName() { |
| | | return this.sysNames[this.sysIndex].name |
| | | }, |
| | | menus() { |
| | | return [MENU_FYSP, MENU_FYTZ, MENU_FYPW][this.sysIndex] |
| | | } |
| | | }, |
| | | methods: { |
| | | handleOpen() {}, |
| | | handleClose() {}, |
| | | choseSys(i) { |
| | | this.sysIndex = i |
| | | const paths = this.menuPath(this.menus[0]) |
| | | this.navPage(...paths) |
| | | const p = paths[paths.length - 1].path |
| | | this.$router.push(p) |
| | | this.popVisible = false |
| | | }, |
| | | navPage(...item) { |
| | | const titles = item.map((value) => { |
| | | return value.name; |
| | | }); |
| | | this.$emit('navPage', titles); |
| | | return value.name |
| | | }) |
| | | this.$emit('navPage', titles) |
| | | }, |
| | | calMenuHeight() { |
| | | const h1 = this.$refs.headerRef.$el.offsetHeight; |
| | | const h2 = this.$refs.subTitleRef.$el.offsetHeight; |
| | | return `calc(100vh - ${h1}px - ${h2}px)`; |
| | | const h1 = this.$refs.headerRef.$el.offsetHeight |
| | | const h2 = this.$refs.header2Ref.$el.offsetHeight |
| | | const h3 = this.$refs.subTitleRef.$el.offsetHeight |
| | | return `calc(100vh - ${h1}px - ${h2}px - ${h3}px)` |
| | | }, |
| | | menuPath(m) { |
| | | if (m.children) { |
| | | const arr = this.menuPath(m.children) |
| | | arr.shift(m) |
| | | return arr |
| | | } else { |
| | | return [m] |
| | | } |
| | | } |
| | | }, |
| | | created() { |
| | | this.$router.push(this.homePage); |
| | | const child = this.routes[0].children |
| | | ? this.routes[0].children[0] |
| | | : undefined; |
| | | this.navPage(this.routes[0], child); |
| | | this.$router.push(this.homePage) |
| | | this.navPage(...this.menuPath(this.menus[0])) |
| | | }, |
| | | mounted() { |
| | | this.menuHeight = this.calMenuHeight(); |
| | | }, |
| | | }; |
| | | this.menuHeight = this.calMenuHeight() |
| | | } |
| | | } |
| | | </script> |
| | | |
| | | <style scoped> |
| | |
| | | color: white; |
| | | background-color: #454f5a; |
| | | padding: 10px; |
| | | margin-bottom: 10px; |
| | | /* margin-bottom: 10px; */ |
| | | box-shadow: 0 0.4rem 0.7rem 0 #5d656e; |
| | | white-space: nowrap; |
| | | overflow: hidden; |
| ¶Ô±ÈÐÂÎļþ |
| | |
| | | <!-- åºæ¯åºæ¬ä¿¡æ¯ç¼è¾ --> |
| | | <template> |
| | | <el-form |
| | | :inline="false" |
| | | :model="formObj" |
| | | ref="formRef" |
| | | :rules="rules" |
| | | label-position="right" |
| | | label-width="150px" |
| | | > |
| | | <slot name="form-item" :formObj="formObj"></slot> |
| | | <el-form-item> |
| | | <el-button |
| | | :disabled="!edit" |
| | | type="primary" |
| | | @click="onSubmit" |
| | | :loading="loading" |
| | | >æäº¤</el-button |
| | | > |
| | | <el-button :disabled="!edit" @click="onReset">éç½®</el-button> |
| | | <el-button v-if="enableCancelBtn" @click="onCancel">åæ¶</el-button> |
| | | </el-form-item> |
| | | </el-form> |
| | | </template> |
| | | |
| | | <script setup> |
| | | /** |
| | | * 表åç¼è¾åºç±» |
| | | * 使ç¨è¯´æï¼ |
| | | * å¨ææ§½<slot name="form-item">䏿·»å èªå®ä¹<el-form-item>å
ç´ |
| | | * å¯ä¼ å
¥åå§è¡¨åæ°æ®formInfoï¼è¡¨åæ ¡éªè§årules |
| | | * å®ç°submitåcancel触å彿° |
| | | */ |
| | | import { defineProps, defineEmits, reactive, ref, watch } from 'vue'; |
| | | import { useFormConfirm } from '@/composables/formConfirm'; |
| | | |
| | | const props = defineProps({ |
| | | //表ååºæ¬ä¿¡æ¯ |
| | | formInfo: Object, |
| | | //è¡¨åæ£éªè§å |
| | | rules: Object, |
| | | //åæ¶æé®æ¯å¦å¯ç¨ |
| | | enableCancelBtn: Boolean, |
| | | //触åéç½® |
| | | reset: Boolean, |
| | | //éç¥ç¼è¾ç¶æ |
| | | isEdit: Boolean, |
| | | }); |
| | | |
| | | //触å彿°ï¼æäº¤ååæ¶ |
| | | const emit = defineEmits(['submit', 'cancel', 'update:isEdit']); |
| | | |
| | | //表åæä½å½æ° |
| | | const { formObj, formRef, edit, onSubmit, onCancel, onReset } = useFormConfirm({ |
| | | submit: { |
| | | do: submit, |
| | | }, |
| | | cancel: { |
| | | do: cancel, |
| | | }, |
| | | }); |
| | | |
| | | //å è½½ç¶æ |
| | | const loading = ref(false); |
| | | |
| | | //æäº¤æé®è§¦å |
| | | function submit() { |
| | | loading.value = true; |
| | | return new Promise((resolve, reject) => { |
| | | emit('submit', formObj, () => { |
| | | loading.value = false; |
| | | resolve(); |
| | | }); |
| | | }); |
| | | } |
| | | |
| | | //åæ¶æé®è§¦å |
| | | function cancel() { |
| | | emit('cancel'); |
| | | } |
| | | |
| | | //çå¬è¡¨ååå§æ°æ®ä¼ å
¥ |
| | | watch( |
| | | () => props.formInfo, |
| | | (nValue) => { |
| | | formObj.value = nValue; |
| | | } |
| | | ); |
| | | |
| | | //çå¬è¡¨åéç½®åè½è§¦å |
| | | watch( |
| | | () => props.reset, |
| | | (nValue) => { |
| | | if (nValue) { |
| | | onReset(); |
| | | } |
| | | } |
| | | ); |
| | | |
| | | //çå¬è¡¨åç¼è¾ç¶æ |
| | | watch(edit, (nValue) => { |
| | | emit('update:isEdit', nValue); |
| | | }); |
| | | </script> |
| | | |
| | | <style scoped></style> |
| ¶Ô±ÈÐÂÎļþ |
| | |
| | | <template> |
| | | <el-form-item :label="placeholder"> |
| | | <el-cascader |
| | | v-model="selectedOptions" |
| | | :options="locations" |
| | | :placeholder="placeholder" |
| | | :props="optionProps" |
| | | style="width: 280px" |
| | | /> |
| | | </el-form-item> |
| | | </template> |
| | | |
| | | <script> |
| | | import { enumLocation } from '@/enum/location' |
| | | |
| | | // è®°å½é项æ¯å¦æ¯èªå®ä¹ä¼ å
¥ç |
| | | let customValue = true |
| | | |
| | | export default { |
| | | props: { |
| | | // æ¯å¦å¨é¦é项夿·»å âå
¨é¨âé项 |
| | | allOption: { |
| | | type: Boolean, |
| | | default: true |
| | | }, |
| | | // æ¥è¯¢çè¡æ¿çº§å«ï¼åå¼1ï¼2ï¼3ï¼4 |
| | | level: { |
| | | type: Number, |
| | | default: 4 |
| | | }, |
| | | // ç»æè¿å |
| | | value: Object, |
| | | // æ¯å¦é»è®¤è¿ååå§é项 |
| | | initValue: { |
| | | type: Boolean, |
| | | default: true |
| | | }, |
| | | // è½å¦éæ©ä»»æä¸çº§é项 |
| | | checkStrictly: { |
| | | type: Boolean, |
| | | default: true |
| | | } |
| | | }, |
| | | emits: ['update:value'], |
| | | data() { |
| | | return { |
| | | locations: enumLocation(this.allOption, this.level), |
| | | selectedOptions: [], |
| | | optionProps: { |
| | | checkStrictly: this.checkStrictly |
| | | } |
| | | } |
| | | }, |
| | | computed: { |
| | | placeholder() { |
| | | const list = 'ç/å¸/åº/é'.split('/') |
| | | const p = [] |
| | | for (let i = 0; i < this.level; i++) { |
| | | p.push(list[i]) |
| | | } |
| | | return p.join('/') |
| | | } |
| | | }, |
| | | watch: { |
| | | selectedOptions: { |
| | | handler(nVal, oVal) { |
| | | if (nVal != oVal) { |
| | | const res = this.optionFormat(nVal) |
| | | // æ ææ¤æ¶çvalueæ´æ°æ¯ç»ä»¶å
é¨è§¦å |
| | | customValue = false |
| | | this.$emit('update:value', res) |
| | | } |
| | | }, |
| | | deep: true |
| | | }, |
| | | value: { |
| | | handler(nVal, oVal) { |
| | | // åªæå½å¼æ¯å¤é¨ä¼ å
¥æ¶ï¼æè§¦åæ´æ° |
| | | if (!customValue) { |
| | | customValue = true |
| | | return |
| | | } |
| | | if (nVal != oVal) { |
| | | if (nVal || nVal.length > 0) { |
| | | this.selectedOptions = this.optionFormatReverse(nVal); |
| | | } |
| | | } |
| | | }, |
| | | deep: true, |
| | | }, |
| | | }, |
| | | methods: { |
| | | /** |
| | | * å°åºéé¡¹ç»ææ ¼å¼å |
| | | */ |
| | | optionFormat(val) { |
| | | const res = { |
| | | pCode: null, |
| | | pName: null, |
| | | cCode: null, |
| | | cName: null, |
| | | dCode: null, |
| | | dName: null, |
| | | tCode: null, |
| | | tName: null |
| | | } |
| | | if (val.length > 0) { |
| | | res.pCode = val[0][0] |
| | | res.pName = val[0][1] |
| | | } |
| | | if (val.length > 1) { |
| | | res.cCode = val[1][0] |
| | | res.cName = val[1][1] |
| | | } |
| | | if (val.length > 2) { |
| | | res.dCode = val[2][0] |
| | | res.dName = val[2][1] |
| | | } |
| | | if (val.length > 3) { |
| | | res.tCode = val[3][0] |
| | | res.tName = val[3][1] |
| | | } |
| | | return res |
| | | }, |
| | | optionFormatReverse(val) { |
| | | const res = [] |
| | | if (val.pCode) { |
| | | res.push([val.pCode, val.pName]) |
| | | } |
| | | if (val.cCode) { |
| | | res.push([val.cCode, val.cName]) |
| | | } |
| | | if (val.dCode) { |
| | | res.push([val.dCode, val.dName]) |
| | | } |
| | | if (val.tCode) { |
| | | res.push([val.tCode, val.tName]) |
| | | } |
| | | return res |
| | | } |
| | | }, |
| | | mounted() { |
| | | if (this.initValue) { |
| | | if (this.checkStrictly) { |
| | | this.selectedOptions = [this.locations[0].value] |
| | | } else { |
| | | const f = (location) => { |
| | | if (location.children && location.children.length > 0) { |
| | | const r = f(location.children[0]) |
| | | r.unshift(location.value) |
| | | return r |
| | | } else { |
| | | return [location.value] |
| | | } |
| | | } |
| | | this.selectedOptions = f(this.locations[0]) |
| | | } |
| | | } |
| | | } |
| | | } |
| | | </script> |
| ¶Ô±ÈÐÂÎļþ |
| | |
| | | <template> |
| | | <el-form-item label="ä¸çº¿ç¶æ"> |
| | | <el-select |
| | | v-model="selectedOptions" |
| | | placeholder="ä¸çº¿ç¶æ" |
| | | style="width: 75px" |
| | | > |
| | | <el-option |
| | | v-for="s in onlineStatus" |
| | | :key="s.value" |
| | | :label="s.label" |
| | | :value="s" |
| | | /> |
| | | </el-select> |
| | | </el-form-item> |
| | | </template> |
| | | |
| | | <script> |
| | | import { enumOnlineStatus } from '@/enum/onlineStatus'; |
| | | |
| | | export default { |
| | | props: { |
| | | // æ¯å¦å¨é¦é项夿·»å âå
¨é¨âé项 |
| | | allOption: { |
| | | type: Boolean, |
| | | default: true, |
| | | }, |
| | | // è¿åç»æ |
| | | value: Object, |
| | | // æ¯å¦é»è®¤è¿ååå§é项 |
| | | initValue: { |
| | | type: Boolean, |
| | | default: true, |
| | | }, |
| | | }, |
| | | emits: ['update:value'], |
| | | data() { |
| | | return { |
| | | onlineStatus: enumOnlineStatus(), |
| | | selectedOptions: {}, |
| | | }; |
| | | }, |
| | | watch: { |
| | | selectedOptions: { |
| | | handler(nVal, oVal) { |
| | | if (nVal != oVal) { |
| | | this.$emit('update:value', nVal); |
| | | } |
| | | }, |
| | | deep: true, |
| | | }, |
| | | value: { |
| | | handler(nVal, oVal) { |
| | | if (nVal != oVal) { |
| | | this.selectedOptions = nVal; |
| | | } |
| | | }, |
| | | deep: true, |
| | | }, |
| | | }, |
| | | mounted() { |
| | | if (this.initValue) { |
| | | this.selectedOptions = this.onlineStatus[0]; |
| | | } |
| | | }, |
| | | }; |
| | | </script> |
| ¶Ô±ÈÐÂÎļþ |
| | |
| | | <template> |
| | | <el-form-item label="åºæ¯ç±»å"> |
| | | <el-select |
| | | v-model="selectedOptions" |
| | | placeholder="åºæ¯ç±»å" |
| | | style="width: 150px" |
| | | > |
| | | <el-option |
| | | v-for="s in sceneTypes" |
| | | :key="s.value" |
| | | :label="s.label" |
| | | :value="s" |
| | | /> |
| | | </el-select> |
| | | </el-form-item> |
| | | </template> |
| | | |
| | | <script> |
| | | import { enumScene } from '@/enum/scene'; |
| | | |
| | | export default { |
| | | props: { |
| | | // æ¯å¦å¨é¦é项夿·»å âå
¨é¨âé项 |
| | | allOption: { |
| | | type: Boolean, |
| | | default: true, |
| | | }, |
| | | // 1:é£ç¾½ç¯å¢ç³»ç»ï¼2ï¼é£ç¾½ç管系ç»ï¼ |
| | | type: { |
| | | type: Number, |
| | | default: 1, |
| | | }, |
| | | // è¿åç»æ |
| | | value: Object, |
| | | // æ¯å¦é»è®¤è¿ååå§é项 |
| | | initValue: { |
| | | type: Boolean, |
| | | default: true, |
| | | }, |
| | | }, |
| | | emits: ['update:value'], |
| | | data() { |
| | | return { |
| | | sceneTypes: enumScene(this.type, this.allOption), |
| | | selectedOptions: {}, |
| | | }; |
| | | }, |
| | | watch: { |
| | | selectedOptions: { |
| | | handler(nVal, oVal) { |
| | | if (nVal != oVal) { |
| | | this.$emit('update:value', nVal); |
| | | } |
| | | }, |
| | | deep: true, |
| | | }, |
| | | value: { |
| | | handler(nVal, oVal) { |
| | | if (nVal != oVal) { |
| | | this.selectedOptions = nVal; |
| | | } |
| | | }, |
| | | deep: true, |
| | | }, |
| | | }, |
| | | mounted() { |
| | | if (this.initValue) { |
| | | this.selectedOptions = this.sceneTypes[0]; |
| | | } |
| | | }, |
| | | }; |
| | | </script> |
| ¶Ô±ÈÐÂÎļþ |
| | |
| | | <template> |
| | | <el-form-item label="æ¶é´"> |
| | | <el-date-picker |
| | | v-model="selectedOptions" |
| | | type="month" |
| | | placeholder="éæ©æ¶é´" |
| | | style="width: 150px" |
| | | /> |
| | | </el-form-item> |
| | | </template> |
| | | |
| | | <script> |
| | | import dayjs from 'dayjs' |
| | | |
| | | const MONTH = 'month' |
| | | |
| | | export default { |
| | | props: { |
| | | type: { |
| | | type: String, |
| | | default: MONTH |
| | | }, |
| | | // è¿åç»æ |
| | | value: Date, |
| | | // æ¯å¦é»è®¤è¿ååå§é项 |
| | | initValue: { |
| | | type: Boolean, |
| | | default: true |
| | | } |
| | | }, |
| | | emits: ['update:value'], |
| | | data() { |
| | | return { |
| | | selectedOptions: '' |
| | | } |
| | | }, |
| | | watch: { |
| | | selectedOptions: { |
| | | handler(nVal, oVal) { |
| | | if (nVal != oVal) { |
| | | this.$emit('update:value', nVal) |
| | | } |
| | | } |
| | | }, |
| | | value: { |
| | | handler(nVal, oVal) { |
| | | if (nVal != oVal) { |
| | | this.selectedOptions = nVal |
| | | } |
| | | } |
| | | } |
| | | }, |
| | | methods: { |
| | | timeFormat() { |
| | | switch (this.type) { |
| | | case MONTH: |
| | | return 'YYYY-MM' |
| | | default: |
| | | return 'YYYY-MM' |
| | | } |
| | | } |
| | | }, |
| | | mounted() { |
| | | if (this.initValue) { |
| | | this.selectedOptions = new Date() |
| | | } |
| | | } |
| | | } |
| | | </script> |
| ¶Ô±ÈÐÂÎļþ |
| | |
| | | <template> |
| | | <el-form-item label="ç¨æ·ç±»å"> |
| | | <el-select |
| | | v-model="selectedOptions" |
| | | placeholder="ç¨æ·ç±»å" |
| | | style="width: 150px" |
| | | > |
| | | <el-option |
| | | v-for="s in userTypes" |
| | | :key="s.value" |
| | | :label="s.label" |
| | | :value="s" |
| | | /> |
| | | </el-select> |
| | | </el-form-item> |
| | | </template> |
| | | |
| | | <script> |
| | | import { enumUser } from '@/enum/user'; |
| | | |
| | | export default { |
| | | props: { |
| | | // æ¯å¦å¨é¦é项夿·»å âå
¨é¨âé项 |
| | | allOption: { |
| | | type: Boolean, |
| | | default: true, |
| | | }, |
| | | // è¿åç»æ |
| | | value: Object, |
| | | // æ¯å¦é»è®¤è¿ååå§é项 |
| | | initValue: { |
| | | type: Boolean, |
| | | default: true, |
| | | }, |
| | | }, |
| | | emits: ['update:value'], |
| | | data() { |
| | | return { |
| | | userTypes: enumUser(this.allOption), |
| | | selectedOptions: {}, |
| | | }; |
| | | }, |
| | | watch: { |
| | | selectedOptions: { |
| | | handler(nVal, oVal) { |
| | | if (nVal != oVal) { |
| | | this.$emit('update:value', nVal); |
| | | } |
| | | }, |
| | | deep: true, |
| | | }, |
| | | value: { |
| | | handler(nVal, oVal) { |
| | | if (nVal != oVal) { |
| | | this.selectedOptions = nVal; |
| | | } |
| | | }, |
| | | deep: true, |
| | | }, |
| | | }, |
| | | mounted() { |
| | | if (this.initValue) { |
| | | this.selectedOptions = this.userTypes[0]; |
| | | } |
| | | }, |
| | | }; |
| | | </script> |
| ¶Ô±ÈÐÂÎļþ |
| | |
| | | <template> |
| | | <el-form :inline="true"> |
| | | <slot name="options"></slot> |
| | | <el-form-item> |
| | | <el-button icon="Search" type="primary" @click="search">{{ btnText }}</el-button> |
| | | </el-form-item> |
| | | </el-form> |
| | | </template> |
| | | |
| | | <script> |
| | | export default { |
| | | props: { |
| | | btnText: { |
| | | type: String, |
| | | default: 'æ¥è¯¢' |
| | | } |
| | | }, |
| | | emits: ['search'], |
| | | methods: { |
| | | search() { |
| | | this.$emit('search') |
| | | } |
| | | } |
| | | } |
| | | </script> |
| ¶Ô±ÈÐÂÎļþ |
| | |
| | | <template> |
| | | <el-form-item :label="label"> |
| | | <el-input clearable v-model="searchText" :placeholder="placeholder" /> |
| | | </el-form-item> |
| | | </template> |
| | | |
| | | <script> |
| | | export default { |
| | | props: { |
| | | label: { |
| | | type: String, |
| | | default: 'æ¥è¯¢é¡¹', |
| | | }, |
| | | placeholder: { |
| | | type: String, |
| | | default: 'è¾å
¥æç´¢å
容', |
| | | }, |
| | | // è¿åç»æ |
| | | value: String, |
| | | }, |
| | | emits: ['update:value'], |
| | | data() { |
| | | return { |
| | | searchText: '', |
| | | }; |
| | | }, |
| | | watch: { |
| | | searchText(nVal, oVal) { |
| | | if (nVal != oVal) { |
| | | this.$emit('update:value', nVal); |
| | | } |
| | | }, |
| | | value(nVal, oVal) { |
| | | if (nVal != oVal) { |
| | | this.searchText = nVal; |
| | | } |
| | | }, |
| | | }, |
| | | }; |
| | | </script> |
| ¶Ô±ÈÐÂÎļþ |
| | |
| | | <template> |
| | | <el-row ref="searchRef"> |
| | | <FYSearchBar @search="onSearch"> |
| | | <template #options> |
| | | <slot name="options"></slot> |
| | | </template> |
| | | </FYSearchBar> |
| | | </el-row> |
| | | |
| | | <el-table |
| | | :data="tableData" |
| | | v-loading="loading" |
| | | table-layout="fixed" |
| | | :row-class-name="tableRowClassName" |
| | | :height="tableHeight" |
| | | > |
| | | <slot name="table-column"></slot> |
| | | </el-table> |
| | | |
| | | <el-pagination |
| | | ref="paginationRef" |
| | | class="el-pagination" |
| | | v-model:current-page="currentPage" |
| | | v-model:page-size="pageSize" |
| | | :page-sizes="[10, 20, 50, 100]" |
| | | :background="true" |
| | | layout="total, sizes, prev, pager, next, jumper" |
| | | :total="total" |
| | | /> |
| | | </template> |
| | | |
| | | <script> |
| | | /** |
| | | * æ°æ®è¡¨æ ¼ç»ä»¶ |
| | | * å¸å±ä»ä¸å¾ä¸å
æ¬äºä¸ä¸ªé¨å |
| | | * 1. æ¥è¯¢æ¡ä»¶FYSearchBar |
| | | * 2. æ°æ®è¡¨æ ¼el-table |
| | | * 3. å页ç»ä»¶el-pagination |
| | | * ä½¿ç¨æ¶éè¦å¨<slot #options>䏿·»å èªå®ä¹æ¥è¯¢é项ï¼å¨<slot #table-column>䏿·»å èªå®ä¹è¡¨æ ¼åï¼åæ¶å®ç°è§¦å彿°search |
| | | */ |
| | | export default { |
| | | props: { |
| | | rowClassName: undefined, |
| | | }, |
| | | data() { |
| | | return { |
| | | tableHeight: '500', |
| | | tableData: [], |
| | | total: 0, |
| | | currentPage: 1, |
| | | pageSize: 20, |
| | | loading: false, |
| | | }; |
| | | }, |
| | | emits: ['search'], |
| | | watch: { |
| | | currentPage(nValue, oValue) { |
| | | if (nValue != oValue) { |
| | | this.onSearch(); |
| | | } |
| | | }, |
| | | pageSize(nValue, oValue) { |
| | | if (nValue != oValue) { |
| | | this.onSearch(); |
| | | } |
| | | }, |
| | | }, |
| | | methods: { |
| | | /** |
| | | * è¡¨æ ¼æ°æ®æ¥è¯¢ï¼ä¼ é两ç»åæ°ï¼å页信æ¯ååè°å½æ° |
| | | * å页信æ¯å
æ¬å½å页ç currentPageåæ¯é¡µæ°æ®épageSize |
| | | * åè°å½æ°æ¥æ¶ä¸ä¸ªå¯¹è±¡ï¼å
æ¬è¡¨æ ¼æ°æ®æ°ç»dataåæ°æ®æ»æ°total |
| | | */ |
| | | onSearch() { |
| | | this.loading = true; |
| | | this.$emit( |
| | | 'search', |
| | | { |
| | | currentPage: this.currentPage, |
| | | pageSize: this.pageSize, |
| | | }, |
| | | (res) => { |
| | | this.tableData = res.data; |
| | | this.total = res.total; |
| | | this.loading = false; |
| | | } |
| | | ); |
| | | }, |
| | | calcTableHeight() { |
| | | const h1 = this.$refs.searchRef.$el.offsetHeight; |
| | | const h2 = this.$refs.paginationRef.$el.offsetHeight; |
| | | // return `calc(100vh - ${h1}px - ${h2}px - var(--el-main-padding) * 2 - var(--el-header-height))`; |
| | | return `calc(100vh - ${h1}px - ${h2}px - 60px - var(--el-main-padding) * 2)`; |
| | | }, |
| | | tableRowClassName({ row }) { |
| | | if (this.rowClassName) { |
| | | if (typeof this.rowClassName == 'string') { |
| | | return this.rowClassName; |
| | | } else if (typeof this.rowClassName == 'function') { |
| | | return this.rowClassName({ row }); |
| | | } |
| | | } else { |
| | | return row.extension1 != '0' ? 'online-row' : 'offline-row'; |
| | | } |
| | | }, |
| | | }, |
| | | mounted() { |
| | | this.tableHeight = this.calcTableHeight(); |
| | | this.onSearch(); |
| | | }, |
| | | }; |
| | | </script> |
| | | |
| | | <style> |
| | | .el-table .online-row { |
| | | /* background-color: rgb(4, 202, 21); */ |
| | | } |
| | | |
| | | .el-table .offline-row { |
| | | background-color: var(--el-disabled-bg-color); |
| | | color: var(--el-disabled-text-color); |
| | | } |
| | | |
| | | .el-table .cell { |
| | | white-space: nowrap; |
| | | } |
| | | |
| | | .el-pagination { |
| | | background-color: var(--el-color-white); |
| | | padding-top: 20px; |
| | | border-top: 1px solid rgba(0, 0, 0, 0.096); |
| | | /* margin-top: 2px; */ |
| | | } |
| | | </style> |
| ¶Ô±ÈÐÂÎļþ |
| | |
| | | export { MENU_FYSP, MENU_FYTZ, MENU_FYPW } from './menu' |
| ¶Ô±ÈÐÂÎļþ |
| | |
| | | const MENU_COMMON = [ |
| | | { |
| | | path: '/common/userMatch', |
| | | icon: 'Connection', |
| | | name: 'è´¦æ·å¹é
' |
| | | } |
| | | ] |
| | | |
| | | const MENU_FYSP = [ |
| | | // { |
| | | // icon: 'Search', |
| | | // name: 'å·¡æ¥å®¡æ ¸', |
| | | // children: [ |
| | | |
| | | // ] |
| | | // }, |
| | | { |
| | | path: '/fysp/procheck', |
| | | icon: 'CircleCheck', |
| | | name: 'é®é¢å®¡æ ¸' |
| | | }, |
| | | // { |
| | | // path: '/changecheck', |
| | | // icon: 'Search', |
| | | // name: 'æ´æ¹å®¡æ ¸', |
| | | // }, |
| | | { |
| | | path: '/fysp/sceneInfo', |
| | | icon: 'Files', |
| | | name: 'åºæ¯ä¿¡æ¯' |
| | | }, |
| | | { |
| | | icon: 'DocumentChecked', |
| | | name: 'èªå¨è¯ä¼°', |
| | | children: [ |
| | | { |
| | | path: '/fysp/evaluation/datasource', |
| | | icon: 'MessageBox', |
| | | name: 'è¯ä¼°æ°æ®æº', |
| | | }, |
| | | { |
| | | path: '/fysp/evaluation/resultManage', |
| | | icon: 'Tickets', |
| | | name: 'è¯ä¼°ç®¡ç', |
| | | }, |
| | | ], |
| | | }, |
| | | { |
| | | icon: 'Setting', |
| | | name: 'é
置管ç', |
| | | children: [ |
| | | { |
| | | path: '/fysp/config/problemType', |
| | | icon: 'List', |
| | | name: 'ç管é®é¢', |
| | | }, |
| | | ], |
| | | }, |
| | | |
| | | // { |
| | | // icon: 'Search', |
| | | // name: 'ä¸å¡åæ', |
| | | // children: [ |
| | | // { |
| | | // path: '/analysis/profollow', |
| | | // icon: 'Search', |
| | | // name: 'é®é¢å¨æè·è¸ª', |
| | | // }, |
| | | // { |
| | | // path: '/analysis/proanalysis', |
| | | // icon: 'Search', |
| | | // name: 'é®é¢æ´æ¹åæ', |
| | | // }, |
| | | // { |
| | | // path: '/analysis/standardjudge', |
| | | // icon: 'Search', |
| | | // name: 'è§èæ§è¯ä¼°', |
| | | // }, |
| | | // ], |
| | | // }, |
| | | // { |
| | | // path: '/dailyreport', |
| | | // icon: 'Search', |
| | | // name: 'æ¥æ¥ç®¡ç', |
| | | // }, |
| | | // { |
| | | // icon: 'Search', |
| | | // name: 'åºæ¯æ¥å', |
| | | // children: [ |
| | | // { |
| | | // path: '/scenereport/construction', |
| | | // icon: 'Search', |
| | | // name: 'å·¥å°', |
| | | // }, |
| | | // { |
| | | // path: '/scenereport/wharf', |
| | | // icon: 'Search', |
| | | // name: 'ç 头', |
| | | // }, |
| | | // { |
| | | // path: '/scenereport/mixing', |
| | | // icon: 'Search', |
| | | // name: 'æ
æç«', |
| | | // }, |
| | | // { |
| | | // path: '/scenereport/storage', |
| | | // icon: 'Search', |
| | | // name: 'å åº', |
| | | // }, |
| | | // ], |
| | | // }, |
| | | |
| | | // { |
| | | // icon: 'Search', |
| | | // name: 'ç¨æ·ç®¡ç', |
| | | // children: [ |
| | | // { |
| | | // group: true, |
| | | // name: 'é£ç¾½ç管', |
| | | // children: [ |
| | | |
| | | // ] |
| | | // }, |
| | | // ] |
| | | // }, |
| | | ...MENU_COMMON |
| | | ] |
| | | |
| | | const MENU_FYTZ = [ |
| | | { |
| | | path: '/fytz/ledger', |
| | | icon: 'Search', |
| | | name: 'å°è´¦å®¡æ ¸' |
| | | }, |
| | | { |
| | | path: '/fytz/notice', |
| | | icon: 'Message', |
| | | name: 'éç¥ç®¡ç' |
| | | }, |
| | | { |
| | | path: '/fytz/userInfo', |
| | | icon: 'User', |
| | | name: 'è´¦æ·ä¿¡æ¯' |
| | | }, |
| | | { |
| | | icon: 'Search', |
| | | name: 'èµæºç®¡ç', |
| | | children: [ |
| | | { |
| | | path: '/fytz/enforceCase', |
| | | icon: 'Search', |
| | | name: 'ç£å¯æ¡ä¾' |
| | | } |
| | | ] |
| | | }, |
| | | ...MENU_COMMON |
| | | ] |
| | | |
| | | const MENU_FYPW = [ |
| | | { |
| | | path: '/scenereport/storage', |
| | | icon: 'Search', |
| | | name: 'ææ±¡æ½è¿' |
| | | } |
| | | ] |
| | | |
| | | export { MENU_FYSP, MENU_FYTZ, MENU_FYPW, MENU_COMMON } |
| | |
| | | return [ |
| | | { |
| | | label: 'å
¨é¨', |
| | | value: ['0', 'å
¨é¨'], |
| | | value: [null, 'å
¨é¨'], |
| | | }, |
| | | { |
| | | label: '䏿µ·å¸', |
| | |
| | | } |
| | | |
| | | function getSceneName(value, type = 1) { |
| | | enumScene(type).find((v) => { |
| | | return enumScene(type).find((v) => { |
| | | if (v.value == value) { |
| | | return v; |
| | | } |
| | |
| | | return [ |
| | | { |
| | | label: 'å
¨é¨', |
| | | value: '0', |
| | | value: null, |
| | | }, |
| | | { |
| | | label: 'é¤é¥®', |
| | |
| | | return [ |
| | | { |
| | | label: 'å
¨é¨', |
| | | value: '0', |
| | | value: null, |
| | | }, |
| | | { |
| | | label: 'å·¥å°', |
| | |
| | | // åºå¿æä¸¾ |
| | | |
| | | function enumUser() { |
| | | function enumUser(allOption = true) { |
| | | const l = _enumUser(); |
| | | if (!allOption) { |
| | | l.shift(); |
| | | } |
| | | |
| | | return l; |
| | | } |
| | | |
| | | function _enumUser() { |
| | | return [ |
| | | { |
| | | label: 'å
¨é¨', |
| | |
| | | ]; |
| | | } |
| | | |
| | | function enumUserNA() { |
| | | const l = enumUser(); |
| | | l.shift(); |
| | | return l; |
| | | } |
| | | |
| | | export { enumUser, enumUserNA }; |
| | | export { enumUser }; |
| | |
| | | import { createRouter, createWebHistory, createWebHashHistory } from 'vue-router'; |
| | | import pinia from "../stores/index"; |
| | | import { useLoadingStore } from "../stores/loadingStore"; |
| | | |
| | | // eslint-disable-next-line no-unused-vars |
| | | import { createRouter, createWebHistory, createWebHashHistory } from 'vue-router' |
| | | import pinia from '../stores/index' |
| | | import { useLoadingStore } from '../stores/loadingStore' |
| | | |
| | | const routes = [ |
| | | { |
| | | //é®é¢å®¡æ ¸ |
| | | name: 'procheck', |
| | | path: '/procheck', |
| | | component: () => import('@/views/check/ProCheck.vue'), |
| | | }, |
| | | { |
| | | //æ´æ¹å®¡æ ¸ |
| | | name: 'changecheck', |
| | | path: '/changecheck', |
| | | component: () => import('@/views/check/ChangeCheck.vue'), |
| | | }, |
| | | { |
| | | //å°è´¦å®¡æ ¸ |
| | | name: 'ledger', |
| | | path: '/ledger', |
| | | component: () => import('@/views/ledger/LedgerManage.vue'), |
| | | component: () => import('@/views/check/ChangeCheck.vue') |
| | | }, |
| | | { |
| | | //é®é¢å¨æè·è¸ª |
| | | name: 'profollow', |
| | | path: '/analysis/profollow', |
| | | component: () => import('@/views/analysis/ProFollow.vue'), |
| | | component: () => import('@/views/analysis/ProFollow.vue') |
| | | }, |
| | | { |
| | | //é®é¢æ´æ¹åæ |
| | | name: 'proanalysis', |
| | | path: '/analysis/proanalysis', |
| | | component: () => import('@/views/analysis/ProAnalysis.vue'), |
| | | component: () => import('@/views/analysis/ProAnalysis.vue') |
| | | }, |
| | | { |
| | | //è§èæ§è¯ä¼° |
| | | name: 'standardjudge', |
| | | path: '/analysis/standardjudge', |
| | | component: () => import('@/views/analysis/StandardJudge.vue'), |
| | | component: () => import('@/views/analysis/StandardJudge.vue') |
| | | }, |
| | | { |
| | | //æ¥æ¥ç®¡ç |
| | | name: 'dailyreport', |
| | | path: '/dailyreport', |
| | | component: () => import('@/views/dailyreport/DailyReport.vue'), |
| | | component: () => import('@/views/dailyreport/DailyReport.vue') |
| | | }, |
| | | { |
| | | //åºæ¯æ¥å-å·¥å° |
| | | name: 'construction', |
| | | path: '/scenereport/construction', |
| | | component: () => import('@/views/scenereport/ConstructionReport.vue'), |
| | | component: () => import('@/views/scenereport/ConstructionReport.vue') |
| | | }, |
| | | { |
| | | //åºæ¯æ¥å-ç 头 |
| | | name: 'wharf', |
| | | path: '/scenereport/wharf', |
| | | component: () => import('@/views/scenereport/WharfReport.vue'), |
| | | component: () => import('@/views/scenereport/WharfReport.vue') |
| | | }, |
| | | { |
| | | //åºæ¯æ¥å-æ
æç« |
| | | name: 'mixing', |
| | | path: '/scenereport/mixing', |
| | | component: () => import('@/views/scenereport/MixingReport.vue'), |
| | | component: () => import('@/views/scenereport/MixingReport.vue') |
| | | }, |
| | | { |
| | | //åºæ¯æ¥å-å åº |
| | | name: 'storage', |
| | | path: '/scenereport/storage', |
| | | component: () => import('@/views/scenereport/StorageReport.vue'), |
| | | }, |
| | | { |
| | | //éç¥ç®¡ç |
| | | name: 'notice', |
| | | path: '/notice', |
| | | component: () => import('@/views/notice/NoticeManage.vue'), |
| | | component: () => import('@/views/scenereport/StorageReport.vue') |
| | | }, |
| | | |
| | | /**********************************é£ç¾½ç管***********************************************/ |
| | | { |
| | | //é®é¢å®¡æ ¸ |
| | | name: 'procheck', |
| | | path: '/fysp/procheck', |
| | | component: () => import('@/views/fysp/check/ProCheck.vue') |
| | | }, |
| | | { |
| | | //è´¦æ·ç®¡ç |
| | | name: 'fyspUser', |
| | | path: '/fysp/userInfo', |
| | | component: () => import('@/views/baseinfo/fysp/user/UserInfo.vue'), |
| | | component: () => import('@/views/baseinfo/fysp/user/UserInfo.vue') |
| | | }, |
| | | // { |
| | | // //åºæ¯ç®¡ç |
| | | // name: 'fyspSceneManage', |
| | | // path: '/fysp/sceneManage/', |
| | | // component: () => import('@/views/user/fysp/SceneManage.vue'), |
| | | // children: [ |
| | | |
| | | // ] |
| | | // }, |
| | | { |
| | | //ç管é®é¢ |
| | | name: 'fyspProblemType', |
| | | path: '/fysp/config/problemType', |
| | | component: () => import('@/views/fysp/config/ProblemType.vue') |
| | | }, |
| | | { |
| | | //è¯ä¼°æ°æ®æº |
| | | name: 'fyspDatasource', |
| | | path: '/fysp/evaluation/datasource', |
| | | component: () => import('@/views/fysp/evaluation/DataSource.vue') |
| | | }, |
| | | { |
| | | //è¯ä¼°ç®¡ç |
| | | name: 'fyspResultManage', |
| | | path: '/fysp/evaluation/resultManage', |
| | | component: () => import('@/views/fysp/evaluation/ResultManage.vue') |
| | | }, |
| | | { |
| | | //åºæ¯ä¿¡æ¯ |
| | | name: 'fyspSceneInfo', |
| | | path: '/fysp/sceneInfo', |
| | | component: () => import('@/views/baseinfo/fysp/scene/SceneInfo.vue'), |
| | | meta: { keepAlive: true }, |
| | | meta: { keepAlive: true } |
| | | }, |
| | | { |
| | | //åºæ¯ç¼è¾ |
| | | name: 'fyspSceneEdit', |
| | | path: '/fysp/sceneEdit/:sid', |
| | | component: () => import('@/views/baseinfo/fysp/scene/SceneEdit.vue'), |
| | | meta: { transition: 'slide-left' }, |
| | | meta: { transition: 'slide-left' } |
| | | }, |
| | | |
| | | /**********************************é£ç¾½ç¯å¢***********************************************/ |
| | | { |
| | | //å°è´¦å®¡æ ¸ |
| | | name: 'ledger', |
| | | path: '/fytz/ledger', |
| | | component: () => import('@/views/fytz/ledger/LedgerManage.vue') |
| | | }, |
| | | { |
| | | //éç¥ç®¡ç |
| | | name: 'notice', |
| | | path: '/fytz/notice', |
| | | component: () => import('@/views/notice/NoticeManage.vue') |
| | | }, |
| | | { |
| | | //è´¦æ·ç®¡ç |
| | | name: 'fytzUser', |
| | | path: '/fytz/userInfo', |
| | | component: () => import('@/views/fytz/user/UserInfo.vue'), |
| | | meta: { keepAlive: true }, |
| | | meta: { keepAlive: true } |
| | | }, |
| | | { |
| | | //è´¦æ·ç¼è¾ |
| | | name: 'fytzUserEdit', |
| | | path: '/fytz/userEdit/:userId', |
| | | component: () => import('@/views/fytz/user/UserEdit.vue'), |
| | | meta: { transition: 'slide-left' }, |
| | | meta: { transition: 'slide-left' } |
| | | }, |
| | | { |
| | | //ç¯ä¿ç£å¯æ¡ä¾ |
| | | name: 'enforceCase', |
| | | path: '/fytz/enforceCase', |
| | | component: () => import('@/views/fytz/enforce-case/EnforceCase.vue'), |
| | | component: () => import('@/views/fytz/enforce-case/EnforceCase.vue') |
| | | }, |
| | | |
| | | /**********************************éç¨æ¨¡å***********************************************/ |
| | |
| | | //è´¦æ·å¹é
|
| | | name: 'userMatch', |
| | | path: '/common/userMatch', |
| | | component: () => import('@/views/common/UserMatch.vue'), |
| | | }, |
| | | ]; |
| | | component: () => import('@/views/common/UserMatch.vue') |
| | | } |
| | | ] |
| | | |
| | | const router = createRouter({ |
| | | // history: createWebHistory(import.meta.env.BASE_URL) |
| | | history: createWebHashHistory(), |
| | | routes: routes, |
| | | }); |
| | | routes: routes |
| | | }) |
| | | |
| | | const loadingStore = useLoadingStore(pinia) |
| | | // eslint-disable-next-line no-unused-vars |
| | | router.afterEach((to, from) => { |
| | | loadingStore.clearLoading() |
| | | }) |
| | | |
| | | export { router, routes }; |
| | | export { router, routes } |
| | |
| | | <!-- åºæ¯åºæ¬ä¿¡æ¯ç¼è¾ --> |
| | | <template> |
| | | <el-form |
| | | :inline="false" |
| | | :model="formObj" |
| | | ref="formRef" |
| | | <FYForm |
| | | :form-info="_formInfo" |
| | | :rules="rules" |
| | | label-position="right" |
| | | label-width="150px" |
| | | @submit="submit" |
| | | @cancel="cancel" |
| | | > |
| | | <template #form-item="{ formObj }"> |
| | | <el-form-item label="åºæ¯åç§°" prop="name"> |
| | | <el-input |
| | | clearable |
| | |
| | | <el-form-item label="ç¼å·" prop="index"> |
| | | <el-input-number readonly v-model="formObj.index" :step="1" :min="0" /> |
| | | </el-form-item> |
| | | |
| | | <el-form-item> |
| | | <el-button |
| | | :disabled="!edit" |
| | | type="primary" |
| | | @click="onSubmit" |
| | | :loading="loading" |
| | | >æäº¤</el-button |
| | | > |
| | | <el-button :disabled="!edit" @click="onReset">éç½®</el-button> |
| | | </el-form-item> |
| | | </el-form> |
| | | </template> |
| | | </FYForm> |
| | | </template> |
| | | |
| | | <script setup> |
| | |
| | | import { enumScene } from '@/enum/scene'; |
| | | import { enumLocation } from '@/enum/location'; |
| | | import sceneApi from '@/api/fysp/sceneApi'; |
| | | import { useFormConfirm } from '@/composables/formConfirm'; |
| | | |
| | | const props = defineProps({ |
| | | //åºæ¯åºæ¬ä¿¡æ¯ |
| | |
| | | |
| | | const emit = defineEmits(['onSubmit', 'onCancel']); |
| | | |
| | | const { formObj, formRef, edit, onSubmit, onReset } = useFormConfirm({ |
| | | submit: { |
| | | do: submit, |
| | | }, |
| | | cancel: { |
| | | do: cancel, |
| | | }, |
| | | }); |
| | | const loading = ref(false); |
| | | const _formInfo = ref(); |
| | | const sceneTypes = reactive(enumScene(2, false)); |
| | | const locations = reactive(enumLocation(false)); |
| | | const cascaderProps = reactive({ |
| | |
| | | ], |
| | | }); |
| | | |
| | | // åºæ¯åºæ¬ä¿¡æ¯æ ¼å¼å |
| | | /** |
| | | * åºæ¯åºæ¬ä¿¡æ¯æ ¼å¼å |
| | | * å¯¹åºæ¯ç±»åãåºæ¯è¡æ¿åºåååºæ¯å¯ç¨ç¶æè¿è¡æ ¼å¼å |
| | | * @param {*} s åºæ¯ä¿¡æ¯ |
| | | */ |
| | | function parseSceneBaseInfo(s) { |
| | | s._typeObj = { |
| | | label: s.type, |
| | |
| | | return s; |
| | | } |
| | | // å建æ°åºæ¯ |
| | | function createScene() { |
| | | loading.value = true; |
| | | function createScene(formObj, func) { |
| | | return sceneApi |
| | | .createScene(formObj.value) |
| | | .then((res) => { |
| | | console.log(res); |
| | | .then(() => { |
| | | emit('onSubmit', formObj); |
| | | }) |
| | | .finally(() => { |
| | | loading.value = false; |
| | | func(); |
| | | }); |
| | | } |
| | | // æ´æ°åºæ¯ |
| | | function updateScene() { |
| | | loading.value = true; |
| | | function updateScene(formObj, func) { |
| | | return sceneApi |
| | | .updateScene(formObj.value) |
| | | .then((res) => { |
| | | console.log(res); |
| | | .then(() => { |
| | | emit('onSubmit', formObj); |
| | | }) |
| | | .finally(() => { |
| | | loading.value = false; |
| | | func(); |
| | | }); |
| | | } |
| | | function submit() { |
| | | function submit(formObj, func) { |
| | | // è¡æ¿åºåä¿¡æ¯å¡«å
|
| | | const a = formObj.value._locations; |
| | | if (a[0]) { |
| | |
| | | |
| | | emit('onSubmit', formObj); |
| | | |
| | | return props.create ? createScene() : updateScene(); |
| | | return props.create ? createScene(formObj, func) : updateScene(formObj, func); |
| | | } |
| | | function cancel() { |
| | | emit('onCancel'); |
| | | } |
| | | |
| | | // çå¬ä¼ å
¥çåºæ¯åºæ¬ä¿¡æ¯ï¼åç¸åºçæ°æ®æ ¼å¼å |
| | | watch( |
| | | () => props.formInfo, |
| | | (nValue) => { |
| | | formObj.value = parseSceneBaseInfo(nValue); |
| | | _formInfo.value = parseSceneBaseInfo(nValue); |
| | | } |
| | | ); |
| | | </script> |
| | |
| | | <template> |
| | | <el-row ref="searchRef"> |
| | | <el-form :inline="true" :model="formSearch"> |
| | | <el-form-item label="ç/å¸/åº/é" prop="_locations"> |
| | | <!-- <el-cascader |
| | | v-model="formSearch._locations" |
| | | :options="locations" |
| | | placeholder="ç/å¸/åº/é" |
| | | :props="props" |
| | | style="width: 280px" |
| | | /> --> |
| | | <OptionLocation |
| | | <FYTable @search="onSearch"> |
| | | <template #options> |
| | | <FYOptionLocation |
| | | :allOption="true" |
| | | :level="4" |
| | | v-model:value="formSearch._locations" |
| | | ></OptionLocation> |
| | | </el-form-item> |
| | | <el-form-item label="åºæ¯ç±»å" prop="scensetype"> |
| | | <OptionScene |
| | | ></FYOptionLocation> |
| | | <FYOptionScene |
| | | :allOption="true" |
| | | :type="2" |
| | | v-model:value="formSearch.scensetype" |
| | | ></OptionScene> |
| | | <!-- <el-select |
| | | v-model="formSearch.scensetypeid" |
| | | placeholder="åºæ¯ç±»å" |
| | | style="width: 150px" |
| | | > |
| | | <el-option |
| | | v-for="s in sceneTypes" |
| | | :key="s.value" |
| | | :label="s.label" |
| | | :value="s.value" |
| | | /> |
| | | </el-select> --> |
| | | </el-form-item> |
| | | <el-form-item label="ä¸çº¿ç¶æ" prop="online"> |
| | | <OptionOnlineStatus |
| | | ></FYOptionScene> |
| | | <FYOptionOnlineStatus |
| | | :allOption="true" |
| | | v-model:value="formSearch.online" |
| | | ></OptionOnlineStatus> |
| | | <!-- <el-select |
| | | v-model="formSearch.online" |
| | | placeholder="ä¸çº¿ç¶æ" |
| | | style="width: 75px" |
| | | > |
| | | <el-option |
| | | v-for="s in onlineStatus" |
| | | :key="s.value" |
| | | :label="s.label" |
| | | :value="s.value" |
| | | /> |
| | | </el-select> --> |
| | | </el-form-item> |
| | | <el-form-item> |
| | | <el-button icon="Search" type="primary" @click="onSearch" |
| | | >æ¥è¯¢</el-button |
| | | > |
| | | </el-form-item> |
| | | </el-form> |
| | | </el-row> |
| | | ></FYOptionOnlineStatus> |
| | | </template> |
| | | |
| | | <el-table |
| | | :data="tableData" |
| | | v-loading="loading" |
| | | table-layout="fixed" |
| | | :row-class-name="tableRowClassName" |
| | | :height="tableHeight" |
| | | > |
| | | <el-table-column prop="name" label="åç§°" width="400"> |
| | | <template #table-column> |
| | | <el-table-column fixed="left" prop="name" label="åç§°" width="400"> |
| | | <template #default="scope"> |
| | | <el-tooltip |
| | | effect="dark" |
| | |
| | | > |
| | | </template> |
| | | </el-table-column> |
| | | </el-table> |
| | | |
| | | <el-pagination |
| | | ref="paginationRef" |
| | | class="el-pagination" |
| | | v-model:current-page="currentPage" |
| | | v-model:page-size="pageSize" |
| | | :page-sizes="[10, 20, 50, 100]" |
| | | :background="true" |
| | | layout="total, sizes, prev, pager, next, jumper" |
| | | :total="total" |
| | | /> |
| | | </template> |
| | | </FYTable> |
| | | </template> |
| | | |
| | | <script> |
| | |
| | | data() { |
| | | return { |
| | | formSearch: { |
| | | _locations: [], |
| | | _locations: {}, |
| | | scensetype: {}, |
| | | online: {}, |
| | | }, |
| | | |
| | | tableData: [], |
| | | tableHeight: '500', |
| | | loading: false, |
| | | |
| | | currentPage: 1, |
| | | pageSize: 20, |
| | | total: 0, |
| | | }; |
| | | }, |
| | | watch: { |
| | | currentPage(nValue, oValue) { |
| | | if (nValue != oValue) { |
| | | this.onSearch(); |
| | | } |
| | | }, |
| | | pageSize(nValue, oValue) { |
| | | if (nValue != oValue) { |
| | | this.onSearch(); |
| | | } |
| | | }, |
| | | }, |
| | | computed: { |
| | | ...mapStores(useLoadingStore), |
| | | }, |
| | | methods: { |
| | | onSearch() { |
| | | this.loading = true; |
| | | onSearch(page, func) { |
| | | const f = this.formSearch; |
| | | const area = {}; |
| | | // è¡æ¿åºå |
| | | f._locations.length > 0 |
| | | ? (area.provincecode = f._locations[0][0]) |
| | | : (area.provincecode = null); |
| | | if (area.provincecode == '0') area.provincecode = null; |
| | | f._locations.length > 1 |
| | | ? (area.citycode = f._locations[1][0]) |
| | | : (area.citycode = null); |
| | | f._locations.length > 2 |
| | | ? (area.districtcode = f._locations[2][0]) |
| | | : (area.districtcode = null); |
| | | f._locations.length > 3 |
| | | ? (area.towncode = f._locations[3][0]) |
| | | : (area.towncode = null); |
| | | area.provincecode = f._locations.pCode |
| | | area.citycode = f._locations.cCode |
| | | area.districtcode = f._locations.dCode |
| | | area.towncode = f._locations.tCode |
| | | // åºæ¯ç±»å |
| | | area.scensetypeid = f.scensetype.value; |
| | | if (area.scensetypeid == '0') area.scensetypeid = null; |
| | | // ä¸ä¸çº¿ç¶æ |
| | | area.online = f.online.value; |
| | | |
| | | sceneApi |
| | | .searchScene(area, this.currentPage, this.pageSize) |
| | | return sceneApi |
| | | .searchScene(area, page.currentPage, page.pageSize) |
| | | .then((res) => { |
| | | if (res.success) { |
| | | this.tableData = res.data; |
| | | this.currentPage = res.head.page; |
| | | this.total = res.head.totalCount; |
| | | } |
| | | }) |
| | | .finally(() => { |
| | | this.loading = false; |
| | | func({ |
| | | data: res.data, |
| | | total: res.head.totalCount, |
| | | }); |
| | | }, |
| | | calcTableHeight() { |
| | | const h1 = this.$refs.searchRef.$el.offsetHeight; |
| | | const h2 = this.$refs.paginationRef.$el.offsetHeight; |
| | | // return `calc(100vh - ${h1}px - ${h2}px - var(--el-main-padding) * 2 - var(--el-header-height))`; |
| | | return `calc(100vh - ${h1}px - ${h2}px - 60px - var(--el-main-padding) * 2)`; |
| | | } |
| | | }); |
| | | }, |
| | | itemEdit(scope) { |
| | | scope.row.loading1 = true; |
| | |
| | | confirmTitle: msg, |
| | | onConfirm: () => { |
| | | scope.row.loading2 = true; |
| | | sceneApi |
| | | return sceneApi |
| | | .updateScene(rb) |
| | | .then((res) => { |
| | | if (res == 1) { |
| | |
| | | }, |
| | | }); |
| | | }, |
| | | tableRowClassName({ row }) { |
| | | return row.extension1 != '0' ? 'online-row' : 'offline-row'; |
| | | }, |
| | | }, |
| | | mounted() { |
| | | this.tableHeight = this.calcTableHeight(); |
| | | this.onSearch(); |
| | | }, |
| | | }; |
| | | </script> |
| | | |
| | | <style> |
| | | .el-table .online-row { |
| | | /* background-color: rgb(4, 202, 21); */ |
| | | } |
| | | |
| | | .el-table .offline-row { |
| | | background-color: var(--el-disabled-bg-color); |
| | | color: var(--el-disabled-text-color); |
| | | } |
| | | |
| | | .el-table .cell { |
| | | white-space: nowrap; |
| | | } |
| | | |
| | | .el-pagination { |
| | | background-color: var(--el-color-white); |
| | | padding-top: 20px; |
| | | border-top: 1px solid rgba(0, 0, 0, 0.096); |
| | | /* margin-top: 2px; */ |
| | | } |
| | | </style> |
| | | <style></style> |
| | |
| | | |
| | | <script setup> |
| | | import { defineProps, defineEmits, reactive, ref, watch } from 'vue'; |
| | | import { enumUserNA } from '@/enum/user'; |
| | | import { enumUser } from '@/enum/user'; |
| | | import { useFormConfirm } from '@/composables/formConfirm'; |
| | | import userApi from '@/api/fysp/userApi'; |
| | | |
| | |
| | | }); |
| | | const createLoading = ref(false); |
| | | const updateLoading = ref(false); |
| | | const userTypes = reactive(enumUserNA()); |
| | | const userTypes = reactive(enumUser()); |
| | | const rules = reactive({ |
| | | name: [ |
| | | { |
| ¶Ô±ÈÐÂÎļþ |
| | |
| | | <template> |
| | | <BaseContentLayout> |
| | | <template #header> |
| | | <SearchBar @on-submit="search"> |
| | | <template #summary> |
| | | <CompSubTaskStatistic :subtasks="subtasks"/> |
| | | </template> |
| | | </SearchBar> |
| | | </template> |
| | | <template #aside> |
| | | <SideList |
| | | :items="subtasks" |
| | | :loading="sideLoading" |
| | | @item-click="chooseSubtask" |
| | | ></SideList> |
| | | </template> |
| | | <template #main> |
| | | <ToolBar |
| | | :title="curSubtask.title" |
| | | :descriptions="proStatus" |
| | | :buttons="buttons" |
| | | :loading="mainLoading" |
| | | ></ToolBar> |
| | | <el-scrollbar |
| | | v-if="curProList.length > 0" |
| | | class="el-scrollbar" |
| | | v-loading="mainLoading" |
| | | > |
| | | <CompProblemCard |
| | | v-for="(p, i) in curProList" |
| | | :key="i" |
| | | :index="i+1" |
| | | :problem="p" |
| | | @submit="updateSubtask" |
| | | ></CompProblemCard> |
| | | </el-scrollbar> |
| | | <el-empty v-else description="ææ è®°å½" v-loading="mainLoading" /> |
| | | </template> |
| | | </BaseContentLayout> |
| | | </template> |
| | | |
| | | <script> |
| | | import taskApi from '@/api/fysp/taskApi'; |
| | | import ProCheckProxy from './ProCheckProxy'; |
| | | |
| | | import { ElMessageBox, ElNotification, ElMessage } from 'element-plus'; |
| | | |
| | | import CompProblemCard from './components/CompProblemCard.vue'; |
| | | import CompSubTaskStatistic from './components/CompSubTaskStatistic.vue'; |
| | | |
| | | export default { |
| | | components: { CompProblemCard, CompSubTaskStatistic }, |
| | | data() { |
| | | return { |
| | | //左侧èåæ å è½½ç¶æ |
| | | sideLoading: false, |
| | | //å³ä¾§å
容æ å è½½ç¶æ |
| | | mainLoading: false, |
| | | //åä»»å¡å表 |
| | | subtasks: [], |
| | | //å½åéä¸çä»»å¡ |
| | | curSubtask: {}, |
| | | //å½åä»»å¡çé®é¢å表 |
| | | curProList: [], |
| | | //æä½æé® |
| | | buttons: [ |
| | | { |
| | | name: 'æ°å¢é®é¢', |
| | | color: 'success', |
| | | }, |
| | | { |
| | | name: 'ä»»æå¾ç', |
| | | color: 'warning', |
| | | }, |
| | | { |
| | | name: 'æ¹éå®¡æ ¸', |
| | | color: 'primary', |
| | | }, |
| | | ], |
| | | }; |
| | | }, |
| | | computed: { |
| | | //é®é¢ç¶æ |
| | | proStatus() { |
| | | return ProCheckProxy.proStatusArray(this.curProList); |
| | | }, |
| | | //ä»»å¡é®é¢å®¡æ ¸æ
åµç»è®¡ä¿¡æ¯ |
| | | summary() { |
| | | const _summary = [ |
| | | { |
| | | name: '任塿»è®¡', |
| | | value: 0, |
| | | type: 'info', |
| | | }, |
| | | { |
| | | name: 'é®é¢æªå®¡æ ¸', |
| | | value: 0, |
| | | type: 'success', |
| | | icon: 'SuccessFilled', |
| | | }, |
| | | { |
| | | name: 'é®é¢é¨åå®¡æ ¸', |
| | | value: 0, |
| | | type: 'success', |
| | | icon: 'SuccessFilled', |
| | | }, |
| | | { |
| | | name: 'é®é¢å
¨é¨å®¡æ ¸', |
| | | value: 0, |
| | | type: 'success', |
| | | icon: 'SuccessFilled', |
| | | }, |
| | | { |
| | | name: 'æªæ´æ¹', |
| | | value: 0, |
| | | type: 'info', |
| | | icon: 'WarningFilled', |
| | | }, |
| | | { |
| | | name: 'æ´æ¹æªå®¡æ ¸', |
| | | value: 0, |
| | | type: 'info', |
| | | icon: 'WarningFilled', |
| | | }, |
| | | { |
| | | name: 'æ´æ¹é¨åå®¡æ ¸', |
| | | value: 0, |
| | | type: 'warning', |
| | | icon: 'WarningFilled', |
| | | }, |
| | | { |
| | | name: 'æ´æ¹å
¨é¨å®¡æ ¸', |
| | | value: 0, |
| | | type: 'warning', |
| | | icon: 'WarningFilled', |
| | | }, |
| | | ]; |
| | | |
| | | this.subtasks.forEach((s) => { |
| | | _summary[0].value++; |
| | | |
| | | if (s.data.proNum == 0) { |
| | | _summary[1].value++; |
| | | } else if (s.data.proCheckedNum == 0) { |
| | | _summary[3].value++; |
| | | } else if (s.data.proCheckedNum < s.data.proNum) { |
| | | _summary[2].value++; |
| | | } else { |
| | | _summary[1].value++; |
| | | } |
| | | }); |
| | | _summary.forEach((s, i) => { |
| | | if (i > 0) { |
| | | let per = Math.round((s.value / _summary[0].value) * 1000) / 10; |
| | | if (isNaN(per)) per = 0; |
| | | s.value = `${s.value}(${per}%)`; |
| | | } |
| | | }); |
| | | |
| | | return _summary; |
| | | }, |
| | | }, |
| | | methods: { |
| | | //æ¥è¯¢åä»»å¡ç»è®¡ä¿¡æ¯ |
| | | search(formSearch) { |
| | | this.sideLoading = true; |
| | | this.mainLoading = true; |
| | | this.curProList = []; |
| | | this.curSubtask = {}; |
| | | taskApi.getSubtaskSummary(formSearch).then((res) => { |
| | | const list = []; |
| | | res.forEach((s) => { |
| | | const t = this.getSubtaskType(s); |
| | | list.push({ |
| | | type: t, |
| | | title: s.stName, |
| | | categoly: s.stPlanTime.split('T')[0], |
| | | data: s, |
| | | }); |
| | | }); |
| | | this.subtasks = list; |
| | | if (list.length == 0) { |
| | | this.sideLoading = false; |
| | | this.mainLoading = false; |
| | | } |
| | | }); |
| | | }, |
| | | //è·åä»»å¡é®é¢çå®¡æ ¸æ
åµ |
| | | getSubtaskType(s) { |
| | | let type = 0; |
| | | if (s.proNum == 0) { |
| | | type = 2; |
| | | } else if (s.proCheckedNum == 0) { |
| | | type = 0; |
| | | } else if (s.proCheckedNum < s.proNum) { |
| | | type = 1; |
| | | } else { |
| | | type = 2; |
| | | } |
| | | return type; |
| | | }, |
| | | //ç¹å»å·¦ä¾§èåä»»å¡äºä»¶ |
| | | chooseSubtask(s) { |
| | | this.sideLoading = false; |
| | | this.mainLoading = true; |
| | | // const controller = new AbortController(); |
| | | taskApi |
| | | .getProBySubtask(s.data.stGuid) |
| | | .then((res) => { |
| | | this.curProList = res; |
| | | this.curSubtask = s; |
| | | }) |
| | | .finally(() => { |
| | | this.mainLoading = false; |
| | | }); |
| | | }, |
| | | updateSubtask() { |
| | | this.curSubtask.data.proCheckedNum++; |
| | | this.curSubtask.type = this.getSubtaskType(this.curSubtask.data); |
| | | } |
| | | }, |
| | | mounted() {}, |
| | | }; |
| | | </script> |
| | | |
| | | <style scoped> |
| | | .el-scrollbar { |
| | | height: calc(100vh - 60px * 2 - 20px * 2 - var(--height-toolbar)); |
| | | } |
| | | </style> |
| ¶Ô±ÈÐÂÎļþ |
| | |
| | | import { $fysp } from '@/api/index' |
| | | |
| | | //é®é¢ç¶æ |
| | | const proStatus = { |
| | | unCheck: 'unCheck', |
| | | pass: 'pass', |
| | | fail: 'fail', |
| | | change_unCheck: 'change_unCheck', |
| | | change_fail: 'change_fail', |
| | | change_pass: 'change_pass' |
| | | } |
| | | |
| | | export default { |
| | | //ç»è®¡é®é¢ |
| | | calProStatus(proList) { |
| | | const status = { |
| | | //é®é¢æ°é |
| | | proNum: proList.length, |
| | | //æ´æ¹æ°é |
| | | changeNum: 0, |
| | | //å¾
å®¡æ ¸æ°é |
| | | uncheckNum: 0, |
| | | //å·²å®¡æ ¸éè¿æ°é |
| | | passNum: 0, |
| | | //æªéè¿æ°é |
| | | unpassNum: 0, |
| | | //æ´æ¹ç |
| | | changePer: '0%', |
| | | //éè¿ç |
| | | passPer: '0%', |
| | | //å®¡æ ¸ç |
| | | checkPer: '0%' |
| | | } |
| | | |
| | | proList.forEach((p) => { |
| | | if (p.ischanged) status.changeNum++ |
| | | |
| | | if (p.extension3 == 'fail' || p.extension3 == 'change_fail') status.unpassNum++ |
| | | else if ( |
| | | p.extension3 == 'unCheck' || |
| | | p.extension3 == 'change_unCheck' || |
| | | (p.extension3 == 'pass' && p.ischanged) |
| | | ) |
| | | status.uncheckNum++ |
| | | else status.passNum++ |
| | | |
| | | status.changePer = |
| | | String( |
| | | (status.changeNum / status.proNum) * 100 |
| | | ? ((status.changeNum / status.proNum) * 100).toFixed(1) |
| | | : 0 |
| | | ) + '%' |
| | | status.passPer = |
| | | String( |
| | | (status.passNum / status.proNum) * 100 |
| | | ? ((status.passNum / status.proNum) * 100).toFixed(1) |
| | | : 0 |
| | | ) + '%' |
| | | status.checkPer = |
| | | String( |
| | | ((status.passNum + status.unpassNum) / status.proNum) * 100 |
| | | ? (((status.passNum + status.unpassNum) / status.proNum) * 100).toFixed(1) |
| | | : 0 |
| | | ) + '%' |
| | | }) |
| | | |
| | | return status |
| | | }, |
| | | |
| | | //ç»è®¡é®é¢ï¼è¿åæ°ç»å½¢å¼ |
| | | proStatusArray(proList) { |
| | | const status = this.calProStatus(proList) |
| | | return [ |
| | | { name: 'é®é¢æ°', value: status.proNum }, |
| | | { name: 'æ´æ¹æ°', value: status.changeNum }, |
| | | { name: 'å¾
å®¡æ ¸', value: status.uncheckNum }, |
| | | { name: 'å·²å®¡æ ¸', value: status.passNum }, |
| | | { name: 'æªéè¿', value: status.unpassNum }, |
| | | { name: 'æ´æ¹ç', value: status.changePer }, |
| | | { name: 'éè¿ç', value: status.passPer }, |
| | | { name: 'å®¡æ ¸ç', value: status.checkPer } |
| | | ] |
| | | }, |
| | | |
| | | //é®é¢å¾çåæ´æ¹å¾ç |
| | | proPics(pro) { |
| | | const pics = [ |
| | | { |
| | | title: 'é®é¢å¾ç', |
| | | path: [] |
| | | }, |
| | | { |
| | | title: 'æ´æ¹å¾ç', |
| | | path: [] |
| | | } |
| | | ] |
| | | if (pro.mediafileList) { |
| | | pro.mediafileList.forEach((m) => { |
| | | pics[m.ischanged ? 1 : 0].path.push(`${$fysp.imgUrl}${m.extension1}${m.guid}.jpg`) |
| | | }) |
| | | } |
| | | |
| | | return pics |
| | | }, |
| | | |
| | | //é®é¢å®¡æ ¸ç¶æè½¬æ¢ä¸æ |
| | | proStatusMap(p) { |
| | | switch (p) { |
| | | case proStatus.unCheck: |
| | | return { name: 'é®é¢æªå®¡æ ¸', type: 'warning', index: 0, checkable: true, deletable: true, changeable: false } |
| | | case proStatus.pass: |
| | | return { name: 'é®é¢éè¿', type: 'success', index: 1, checkable: false, deletable: true, changeable: false } |
| | | case proStatus.fail: |
| | | return { name: 'é®é¢ä¸éè¿', type: 'danger', index: 1, checkable: false, deletable: true, changeable: false } |
| | | case proStatus.change_unCheck: |
| | | return { name: 'æ´æ¹æªå®¡æ ¸', type: 'warning', index: 2, checkable: true, deletable: false, changeable: true } |
| | | case proStatus.change_fail: |
| | | return { name: 'æ´æ¹ä¸éè¿', type: 'danger', index: 3, checkable: false, deletable: false, changeable: true } |
| | | case proStatus.change_pass: |
| | | return { name: 'æ´æ¹éè¿', type: 'success', index: 3, checkable: false, deletable: false, changeable: true } |
| | | default: |
| | | return { name: 'é®é¢æªå®¡æ ¸', type: 'warning', index: 0, checkable: true, deletable: true } |
| | | } |
| | | }, |
| | | |
| | | /** |
| | | * é®é¢å®¡æ ¸åç¶æåæ¢ |
| | | * @param {String} s å½åé®é¢ç¶æ |
| | | * @param {Boolean} isPass å®¡æ ¸éè¿æé©³å |
| | | * @returns ä¸ä¸ä¸ªé®é¢ç¶æ |
| | | */ |
| | | proNextStatus(s, isPass) { |
| | | let status, action |
| | | switch (s) { |
| | | case proStatus.unCheck: |
| | | status = isPass ? proStatus.pass : proStatus.fail |
| | | action = isPass ? 0 : 1 |
| | | break |
| | | case proStatus.change_unCheck: |
| | | status = isPass ? proStatus.change_pass : proStatus.change_fail |
| | | action = isPass ? 2 : 3 |
| | | break |
| | | } |
| | | return { status: status, action: action } |
| | | } |
| | | } |
| ¶Ô±ÈÐÂÎļþ |
| | |
| | | <template> |
| | | <el-card class="layout" shadow="hover"> |
| | | <el-steps :active="proStatus.index" finish-status="success" style="" align-center> |
| | | <el-step v-for="(s, i) in getSteps" :key="i" :title="s" /> |
| | | </el-steps> |
| | | |
| | | <el-descriptions :column="3" size="small"> |
| | | <template #title> |
| | | <span class="d-index">{{ index }}</span> |
| | | <span class="d-title">{{ title }}</span> |
| | | </template> |
| | | <template #extra> |
| | | <!-- <span class="d-extra">{{ status }}</span> --> |
| | | <el-tag |
| | | style="font-size: 16px; line-height: 16px; padding: 14px" |
| | | :type="proStatus.type" |
| | | effect="plain" |
| | | size="large" |
| | | round |
| | | >{{ proStatus.name }}</el-tag |
| | | > |
| | | </template> |
| | | <el-descriptions-item |
| | | label-class-name="descriptions-label-1" |
| | | v-for="(d, i) in descriptions" |
| | | :key="i" |
| | | :label="d.name" |
| | | >{{ d.value }}</el-descriptions-item |
| | | > |
| | | </el-descriptions> |
| | | |
| | | <el-scrollbar> |
| | | <el-descriptions title=" " :column="2" direction="vertical" size="small" border> |
| | | <template v-for="(pic, t) in pics" :key="t"> |
| | | <template v-if="pic.path.length > 0"> |
| | | <el-descriptions-item |
| | | :label="pic.title" |
| | | :label-class-name="t == 0 ? 'descriptions-label-1' : 'descriptions-label-2'" |
| | | > |
| | | <el-space> |
| | | <el-image |
| | | v-for="(p, i) in pic.path" |
| | | class="image" |
| | | :key="i" |
| | | :src="p" |
| | | :preview-src-list="pic.path" |
| | | :initial-index="i" |
| | | fit="cover" |
| | | lazy |
| | | /> |
| | | </el-space> |
| | | </el-descriptions-item> |
| | | </template> |
| | | </template> |
| | | </el-descriptions> |
| | | </el-scrollbar> |
| | | |
| | | <!-- é®é¢æä½ --> |
| | | <el-row v-if="true" style="margin-top: 16px"> |
| | | <el-col :span="12"> |
| | | <el-row justify="start" class="btn-group"> |
| | | <el-button type="success" size="small" @click="updatePro" plain>ä¿®æ¹é®é¢</el-button> |
| | | <el-button |
| | | type="primary" |
| | | size="small" |
| | | @click="updateChange" |
| | | plain |
| | | :disabled="!proStatus.changeable" |
| | | >ä¿®æ¹æ´æ¹</el-button |
| | | > |
| | | </el-row> |
| | | </el-col> |
| | | <el-col :span="12"> |
| | | <el-row justify="end" class="btn-group"> |
| | | <el-button type="danger" size="small" @click="deletePro" :disabled="!proStatus.deletable" |
| | | >å é¤</el-button |
| | | > |
| | | <el-button type="warning" size="small" @click="rejectPro" :disabled="!proStatus.checkable" |
| | | >驳å</el-button |
| | | > |
| | | <el-button type="success" size="small" @click="passPro" :disabled="!proStatus.checkable" |
| | | >éè¿</el-button |
| | | > |
| | | </el-row> |
| | | </el-col> |
| | | </el-row> |
| | | </el-card> |
| | | </template> |
| | | |
| | | <script> |
| | | import ProCheckProxy from '../ProCheckProxy' |
| | | import problemApi from '@/api/fysp/problemApi' |
| | | import { useMessageBoxTip } from '@/composables/messageBox' |
| | | |
| | | export default { |
| | | props: { |
| | | problem: { |
| | | type: Object, |
| | | default: () => { |
| | | return {} |
| | | } |
| | | }, |
| | | index: { |
| | | type: Number, |
| | | default: 1 |
| | | } |
| | | }, |
| | | emits:['submit'], |
| | | data() { |
| | | return { |
| | | // å®¡æ ¸æ¥éª¤ |
| | | steps: [ |
| | | { |
| | | bef: 'é®é¢å¾
å®¡æ ¸', |
| | | aft: 'é®é¢å·²å®¡æ ¸' |
| | | }, |
| | | { |
| | | bef: 'é®é¢å¾
æ´æ¹', |
| | | aft: 'é®é¢å·²æ´æ¹' |
| | | }, |
| | | { |
| | | bef: 'æ´æ¹å¾
å®¡æ ¸', |
| | | aft: 'æ´æ¹å·²å®¡æ ¸' |
| | | } |
| | | ] |
| | | } |
| | | }, |
| | | computed: { |
| | | // é®é¢åç§° |
| | | title() { |
| | | return this.problem.problemname |
| | | }, |
| | | // é®é¢æè¿° |
| | | descriptions() { |
| | | return [ |
| | | { |
| | | name: 'é®é¢ä½ç½®', |
| | | value: this.problem.location |
| | | }, |
| | | { |
| | | name: 'æäº¤æ¶é´', |
| | | value: this.problem.time.replace('T', ' ').split('.')[0] |
| | | } |
| | | ] |
| | | }, |
| | | // é®é¢å¾ç |
| | | pics() { |
| | | return ProCheckProxy.proPics(this.problem) |
| | | }, |
| | | /** |
| | | * è·åå½åé®é¢å®¡æ ¸æ¥éª¤ |
| | | */ |
| | | getSteps() { |
| | | return this.steps.map((v, i) => { |
| | | if (i >= this.proStatus.index) { |
| | | return v.bef |
| | | } else { |
| | | return v.aft |
| | | } |
| | | }) |
| | | }, |
| | | // é®é¢ç¶æ |
| | | proStatus() { |
| | | return ProCheckProxy.proStatusMap(this.problem.extension3) |
| | | } |
| | | }, |
| | | methods: { |
| | | deletePro() {}, |
| | | rejectPro() { |
| | | this.checkPro(false) |
| | | }, |
| | | passPro() { |
| | | this.checkPro(true) |
| | | }, |
| | | checkPro(pass) { |
| | | const pro = this.problem |
| | | let doneMsg = pass ? 'éè¿' : '驳å' |
| | | useMessageBoxTip({ |
| | | confirmMsg: `确认æ¯å¦${doneMsg}该é®é¢ï¼`, |
| | | confirmTitle: 'é®é¢å®¡æ ¸', |
| | | onConfirm: () => { |
| | | const { status, action } = ProCheckProxy.proNextStatus(pro.extension3, pass) |
| | | return problemApi.checkProblem({ pId: pro.guid, action: action }).then((res) => { |
| | | if (res.success) { |
| | | pro.extension3 = status |
| | | this.$emit('submit') |
| | | } |
| | | }) |
| | | } |
| | | }) |
| | | }, |
| | | updatePro() {}, |
| | | updateChange() {} |
| | | } |
| | | } |
| | | </script> |
| | | <style scoped> |
| | | .layout { |
| | | background-color: transparent; |
| | | margin-top: 20px; |
| | | /* border: none; */ |
| | | border-color: rgba(0, 0, 0, 0.308); |
| | | } |
| | | |
| | | .image { |
| | | width: 200px; |
| | | height: 210px; |
| | | border-radius: 4px; |
| | | } |
| | | |
| | | .d-index { |
| | | display: inline-block; |
| | | width: 22px; |
| | | height: 22px; |
| | | line-height: 22px; |
| | | text-align: center; |
| | | border-radius: 50%; |
| | | color: var(--el-color-primary-light-3); |
| | | border: 2px solid var(--el-color-primary-light-3); |
| | | margin-right: 4px; |
| | | } |
| | | |
| | | .d-title { |
| | | /* background: var(--el-color-danger-light-3); */ |
| | | font-weight: 600; |
| | | font-size: var(--el-font-size-large); |
| | | } |
| | | |
| | | .d-extra { |
| | | } |
| | | |
| | | .descriptions-label-1 { |
| | | color: whitesmoke; |
| | | background: var(--el-color-danger-light-3); |
| | | } |
| | | |
| | | .descriptions-label-2 { |
| | | color: whitesmoke; |
| | | background-color: var(--el-color-success-light-3); |
| | | } |
| | | </style> |
| ¶Ô±ÈÐÂÎļþ |
| | |
| | | <template> |
| | | <el-descriptions :column="8" size="small" border direction="vertical"> |
| | | <el-descriptions-item label="任塿»è®¡">{{ summary.total }}</el-descriptions-item> |
| | | <el-descriptions-item label="é®é¢æªå®¡æ ¸">{{ summary.proUnCheck }}</el-descriptions-item> |
| | | <el-descriptions-item label="é®é¢é¨åå®¡æ ¸">{{ summary.proPartCheck }}</el-descriptions-item> |
| | | <el-descriptions-item label="é®é¢å
¨é¨å®¡æ ¸">{{ summary.proAllCheck }}</el-descriptions-item> |
| | | <el-descriptions-item label="æªæ´æ¹">{{ summary.UnChange }}</el-descriptions-item> |
| | | <el-descriptions-item label="æ´æ¹æªå®¡æ ¸">{{ summary.changeUnCheck }}</el-descriptions-item> |
| | | <el-descriptions-item label="æ´æ¹é¨åå®¡æ ¸">{{ summary.changePartCheck }}</el-descriptions-item> |
| | | <el-descriptions-item label="æ´æ¹å
¨é¨å®¡æ ¸">{{ summary.changeAllCheck }}</el-descriptions-item> |
| | | </el-descriptions> |
| | | <!-- <el-space> |
| | | <el-tag v-for="(s, i) in summary" :key="i" :type="s.type" size="small"> |
| | | <el-icon v-if="s.icon" color=""> |
| | | <component :is="s.icon"></component> |
| | | </el-icon> |
| | | {{ s.name + ': ' + s.value }} |
| | | </el-tag> |
| | | </el-space> --> |
| | | </template> |
| | | <script> |
| | | export default { |
| | | props: { |
| | | subtasks: Array |
| | | }, |
| | | computed: { |
| | | //ä»»å¡é®é¢å®¡æ ¸æ
åµç»è®¡ä¿¡æ¯ |
| | | summary() { |
| | | const _summary = { |
| | | total: 0, |
| | | proUnCheck: 0, |
| | | proPartCheck: 0, |
| | | proAllCheck: 0, |
| | | UnChange: 0, |
| | | changeUnCheck: 0, |
| | | changePartCheck: 0, |
| | | changeAllCheck: 0 |
| | | } |
| | | this.subtasks.forEach((s) => { |
| | | _summary.total++ |
| | | |
| | | // é®é¢å®¡æ ¸æ
åµ |
| | | if (s.data.proNum == 0) { |
| | | _summary.proAllCheck++ |
| | | } else if (s.data.proCheckedNum == 0) { |
| | | _summary.proUnCheck++ |
| | | } else if (s.data.proCheckedNum < s.data.proNum) { |
| | | _summary.proPartCheck++ |
| | | } else { |
| | | _summary.proAllCheck++ |
| | | } |
| | | |
| | | // æ¯å¦ææªæ´æ¹ |
| | | if (s.data.changeNum < s.data.proNum) { |
| | | _summary.UnChange++ |
| | | } |
| | | |
| | | // æ´æ¹å®¡æ ¸æ
åµ |
| | | if (s.data.proNum == 0) { |
| | | _summary.changeAllCheck++ |
| | | } else if (s.data.changeNum > 0) { |
| | | if (s.data.changeCheckedNum == 0) { |
| | | _summary.changeUnCheck++ |
| | | } else if (s.data.changeCheckedNum < s.data.changeNum) { |
| | | _summary.changePartCheck++ |
| | | } else { |
| | | _summary.changeAllCheck++ |
| | | } |
| | | } |
| | | }) |
| | | // _summary.forEach((s, i) => { |
| | | // if (i > 0) { |
| | | // let per = Math.round((s.value / _summary[0].value) * 1000) / 10 |
| | | // if (isNaN(per)) per = 0 |
| | | // s.value = `${s.value}(${per}%)` |
| | | // } |
| | | // }) |
| | | |
| | | return _summary |
| | | } |
| | | } |
| | | } |
| | | </script> |
| ¶Ô±ÈÐÂÎļþ |
| | |
| | | <template> |
| | | <div>ProblemType</div> |
| | | </template> |
| | | |
| | | <script> |
| | | export default { |
| | | name: 'ProblemType', |
| | | data() { |
| | | return { |
| | | |
| | | } |
| | | } |
| | | }; |
| | | </script> |
| ¶Ô±ÈÐÂÎļþ |
| | |
| | | <template> |
| | | <div>DataSource</div> |
| | | </template> |
| | | |
| | | <script> |
| | | export default { |
| | | name: 'DataSource', |
| | | data() { |
| | | return { |
| | | |
| | | } |
| | | } |
| | | }; |
| | | </script> |
| ¶Ô±ÈÐÂÎļþ |
| | |
| | | <template> |
| | | <CompPreCheck @pre-check="autoEvaluate"></CompPreCheck> |
| | | </template> |
| | | |
| | | <script> |
| | | import CompPreCheck from './components/CompPreCheck.vue'; |
| | | |
| | | export default { |
| | | name: 'ResultManage', |
| | | components: { CompPreCheck }, |
| | | data() { |
| | | return {}; |
| | | }, |
| | | methods:{ |
| | | /** |
| | | * éè¿èªè¯é¢æ£åï¼æ§è¡èªå¨è¯ä¼° |
| | | * @param {*} options æ¥è¯¢åæ° |
| | | */ |
| | | autoEvaluate(options){ |
| | | |
| | | } |
| | | } |
| | | }; |
| | | </script> |
| ¶Ô±ÈÐÂÎļþ |
| | |
| | | <template> |
| | | <FYSearchBar @search="preCheck"> |
| | | <template #options> |
| | | <!-- åºå¿ --> |
| | | <FYOptionLocation |
| | | :allOption="false" |
| | | :level="3" |
| | | :checkStrictly="false" |
| | | v-model:value="formSearch._locations" |
| | | ></FYOptionLocation> |
| | | <!-- åºæ¯ç±»å --> |
| | | <FYOptionScene |
| | | :allOption="false" |
| | | :type="2" |
| | | v-model:value="formSearch.scenetype" |
| | | ></FYOptionScene> |
| | | <!-- æ¶é´ --> |
| | | <FYOptionTime type="month" v-model:value="formSearch.time"></FYOptionTime> |
| | | </template> |
| | | </FYSearchBar> |
| | | <el-row> |
| | | <span>å¿«æ·éæ©</span> |
| | | <el-button v-for="(v, i) in quickSetting" :key="i" type="primary" @click="quickSet(v)">{{ |
| | | v.name |
| | | }}</el-button> |
| | | </el-row> |
| | | </template> |
| | | |
| | | <script> |
| | | /** |
| | | * èªå¨è¯ä¼°æ¡ä»¶åè§æ§æ£æ¥ |
| | | */ |
| | | export default { |
| | | name: 'CompPreCheck', |
| | | props: { |
| | | quickSetting: { |
| | | type: Array, |
| | | default: () => { |
| | | return [ |
| | | { |
| | | name: 'éå®å·¥å°', |
| | | locations: { |
| | | pCode: '31', |
| | | pName: '䏿µ·å¸', |
| | | cCode: '3100', |
| | | cName: '䏿µ·å¸', |
| | | dCode: '310106', |
| | | dName: 'éå®åº' |
| | | }, |
| | | scenetype: { label: 'å·¥å°', value: '1' } |
| | | }, |
| | | { |
| | | name: '徿±é¤é¥®', |
| | | locations: { |
| | | pCode: '31', |
| | | pName: '䏿µ·å¸', |
| | | cCode: '3100', |
| | | cName: '䏿µ·å¸', |
| | | dCode: '310104', |
| | | dName: '徿±åº' |
| | | }, |
| | | scenetype: { label: 'é¤é¥®', value: '5' } |
| | | }, |
| | | { |
| | | name: 'é山工å°', |
| | | locations: { |
| | | pCode: '31', |
| | | pName: '䏿µ·å¸', |
| | | cCode: '3100', |
| | | cName: '䏿µ·å¸', |
| | | dCode: '310116', |
| | | dName: 'éå±±åº' |
| | | }, |
| | | scenetype: { label: 'å·¥å°', value: '1' } |
| | | }, |
| | | { |
| | | name: 'éå±±ç 头', |
| | | locations: { |
| | | pCode: '31', |
| | | pName: '䏿µ·å¸', |
| | | cCode: '3100', |
| | | cName: '䏿µ·å¸', |
| | | dCode: '310116', |
| | | dName: 'éå±±åº' |
| | | }, |
| | | scenetype: { label: 'ç 头', value: '2' } |
| | | }, |
| | | { |
| | | name: 'éå±±æ
æç«', |
| | | locations: { |
| | | pCode: '31', |
| | | pName: '䏿µ·å¸', |
| | | cCode: '3100', |
| | | cName: '䏿µ·å¸', |
| | | dCode: '310116', |
| | | dName: 'éå±±åº' |
| | | }, |
| | | scenetype: { label: 'æ
æç«', value: '3' } |
| | | } |
| | | ] |
| | | } |
| | | } |
| | | }, |
| | | emits: ['preCheck'], |
| | | data() { |
| | | return { |
| | | formSearch: { |
| | | _locations: {}, |
| | | scenetype: {}, |
| | | time: undefined |
| | | } |
| | | } |
| | | }, |
| | | methods: { |
| | | /** |
| | | * èªå¨è¯ä¼°åç½®åè§æ§æ£æ¥ |
| | | * æ£æ¥æéèå´å
å项è¯ä¼°æ°æ®æºæ¯å¦å®æ´ |
| | | */ |
| | | preCheck() { |
| | | this.$emit('preCheck', this.formSearch) |
| | | }, |
| | | |
| | | /** |
| | | * å¿«é设置æ¡ä»¶ |
| | | */ |
| | | quickSet(set) { |
| | | this.formSearch._locations = set.locations |
| | | this.formSearch.scenetype = set.scenetype |
| | | |
| | | this.preCheck() |
| | | } |
| | | } |
| | | } |
| | | </script> |
| | |
| | | <template> |
| | | <el-row ref="searchRef"> |
| | | <el-col> |
| | | <el-form :inline="true" :model="formSearch"> |
| | | <el-form-item label="ç/å¸/åº/é" prop="_locations"> |
| | | <el-cascader |
| | | v-model="formSearch._locations" |
| | | :options="locations" |
| | | placeholder="ç/å¸/åº/é" |
| | | :props="props" |
| | | style="width: 280px" |
| | | /> |
| | | </el-form-item> |
| | | <el-form-item label="åºæ¯åç§°" prop="searchText"> |
| | | <el-input |
| | | clearable |
| | | v-model="formSearch.searchText" |
| | | placeholder="è¾å
¥æç´¢åºæ¯åç§°" |
| | | /> |
| | | </el-form-item> |
| | | <el-form-item label="ç¨æ·ç±»å" prop="scensetypeid"> |
| | | <el-select |
| | | v-model="formSearch.scensetypeid" |
| | | placeholder="ç¨æ·ç±»å" |
| | | style="width: 75px" |
| | | > |
| | | <el-option |
| | | v-for="s in sceneTypes" |
| | | :key="s.value" |
| | | :label="s.label" |
| | | :value="s.value" |
| | | /> |
| | | </el-select> |
| | | </el-form-item> |
| | | <el-form-item label="ä¸çº¿ç¶æ" prop="online"> |
| | | <el-select |
| | | v-model="formSearch.online" |
| | | placeholder="å
¨é¨" |
| | | style="width: 75px" |
| | | > |
| | | <el-option |
| | | v-for="s in onlineStatus" |
| | | :key="s.value" |
| | | :label="s.label" |
| | | :value="s.value" |
| | | /> |
| | | </el-select> |
| | | </el-form-item> |
| | | <el-form-item> |
| | | <el-button icon="Search" type="primary" @click="onSearch" |
| | | >æ¥è¯¢</el-button |
| | | > |
| | | </el-form-item> |
| | | </el-form> |
| | | </el-col> |
| | | </el-row> |
| | | <el-table |
| | | :data="tableData" |
| | | v-loading="loading" |
| | | table-layout="fixed" |
| | | :row-class-name="tableRowClassName" |
| | | :height="tableHeight" |
| | | > |
| | | <el-table-column prop="realname" label="å
¬å¸" align="center"> |
| | | <template #default="scope"> |
| | | <el-tooltip |
| | | effect="dark" |
| | | :content="scope.row.realname" |
| | | placement="top-start" |
| | | :show-after="500" |
| | | > |
| | | {{ scope.row.realname }} |
| | | </el-tooltip> |
| | | <FYTable @search="onSearch" :row-class-name="tableRowClassName"> |
| | | <template #options> |
| | | <FYOptionLocation |
| | | :allOption="true" |
| | | :level="4" |
| | | v-model:value="formSearch._locations" |
| | | ></FYOptionLocation> |
| | | <FYOptionText label="å
³é®å" placeholder="è¾å
¥åç§°å
³é®å" v-model:value="formSearch.searchText"></FYOptionText> |
| | | <FYOptionScene |
| | | :allOption="true" |
| | | :type="1" |
| | | v-model:value="formSearch.scensetype" |
| | | ></FYOptionScene> |
| | | <FYOptionOnlineStatus |
| | | :allOption="true" |
| | | v-model:value="formSearch.online" |
| | | ></FYOptionOnlineStatus> |
| | | </template> |
| | | </el-table-column> |
| | | <el-table-column prop="telephone" label="çµè¯" align="center" /> |
| | | |
| | | <template #table-column> |
| | | <el-table-column |
| | | prop="extension1" |
| | | label="åºå¿" |
| | | width="120" |
| | | align="center" |
| | | /> |
| | | <el-table-column prop="usertype" label="ç±»å" align="center" /> |
| | | <el-table-column prop="departmentname" label="åç§°"> |
| | | type="index" |
| | | fixed="left" |
| | | prop="userInfo.realname" |
| | | label="åç§°" |
| | | width="400" |
| | | > |
| | | <template #default="scope"> |
| | | <el-tooltip |
| | | effect="dark" |
| | | :content="scope.row.departmentname" |
| | | :content="scope.row.userInfo.realname" |
| | | placement="top-start" |
| | | :show-after="500" |
| | | > |
| | | {{ scope.row.departmentname }} |
| | | {{ scope.row.userInfo.realname }} |
| | | </el-tooltip> |
| | | </template> |
| | | </el-table-column> |
| | | <el-table-column fixed="right" label="æä½" width="140"> |
| | | <el-table-column prop="userInfo.acountname" label="è´¦å·" width="110" /> |
| | | <el-table-column prop="sceneTypeName" label="ç±»å" width="130" /> |
| | | <el-table-column prop="biProvinceName" label="ç" width="90" /> |
| | | <el-table-column prop="biCityName" label="å¸" width="90" /> |
| | | <!-- <el-table-column prop="districtname" label="åºå¿" width="90" /> --> |
| | | <el-table-column prop="userInfo.extension1" label="åºå¿" width="90" /> |
| | | <el-table-column prop="biTownName" label="è¡é" width="110" /> |
| | | <el-table-column prop="biArea" label="éä¸åº" width="110" /> |
| | | <el-table-column prop="biManagementCompany" label="ç©ä¸" min-width="110"/> |
| | | <el-table-column prop="userInfo.isenable" label="ç¶æ" width="90"> |
| | | <template #default="scope"> |
| | | {{ scope.row.userInfo.isenable ? 'ä¸çº¿ä¸' : 'å·²ä¸çº¿' }} |
| | | </template> |
| | | </el-table-column> |
| | | <el-table-column prop="userInfo.usertype" label="ç¨æ·ç±»å" width="90" /> |
| | | <el-table-column fixed="right" align="right" label="æä½" width="140"> |
| | | <template #header> |
| | | <el-button icon="DocumentAdd" type="success" @click="drawer = true" |
| | | <el-button |
| | | icon="DocumentAdd" |
| | | size="default" |
| | | type="success" |
| | | @click="drawer = true" |
| | | >æ°å¢ç¨æ·</el-button |
| | | > |
| | | </template> |
| | | <template #default="scope"> |
| | | <el-button |
| | | :loading="scope.row.loading1" |
| | | type="default" |
| | | type="primary" |
| | | size="small" |
| | | @click="editRow(scope)" |
| | | >ç¼è¾</el-button |
| | | >æ¥ç</el-button |
| | | > |
| | | <el-button |
| | | <!-- <el-button |
| | | :loading="scope.row.loading2" |
| | | :type="scope.row.extension1 != '0' ? 'danger' : 'primary'" |
| | | size="small" |
| | | @click="itemActive(scope)" |
| | | >{{ scope.row.extension1 != '0' ? 'ä¸çº¿' : 'ä¸çº¿' }}</el-button |
| | | > |
| | | > --> |
| | | </template> |
| | | </el-table-column> |
| | | </el-table> |
| | | |
| | | <el-pagination |
| | | ref="paginationRef" |
| | | class="el-pagination" |
| | | v-model:current-page="currentPage" |
| | | v-model:page-size="pageSize" |
| | | :page-sizes="[10, 20, 50, 100]" |
| | | :background="true" |
| | | layout="total, sizes, prev, pager, next, jumper" |
| | | :total="total" |
| | | /> |
| | | |
| | | </template> |
| | | </FYTable> |
| | | <CompUserInfoAddDrawer v-model:drawer="drawer"></CompUserInfoAddDrawer> |
| | | </template> |
| | | |
| | | <script> |
| | | import { enumScene } from '@/enum/scene'; |
| | | import { enumLocation } from '@/enum/location'; |
| | | import { enumOnlineStatus } from '@/enum/onlineStatus'; |
| | | import userApi from '@/api/fytz/userApi'; |
| | | import { useLoadingStore } from '@/stores/loadingStore'; |
| | | import { mapStores } from 'pinia'; |
| | | import { useMessageBoxTip } from '@/composables/messageBox'; |
| | | import CompUserInfoAddDrawer from './components/CompUserInfoAddDrawer.vue'; |
| | | import CompUserInfoAddDrawer from '@/views/fytz/user/components/CompUserInfoAddDrawer.vue'; |
| | | |
| | | export default { |
| | | components: { |
| | |
| | | }, |
| | | data() { |
| | | return { |
| | | locations: enumLocation(), |
| | | sceneTypes: enumScene(1), |
| | | onlineStatus: enumOnlineStatus(), |
| | | formSearch: { |
| | | _locations: [], |
| | | _locations: {}, |
| | | searchText: '', |
| | | scensetypeid: '', |
| | | online: '', |
| | | scensetype: {}, |
| | | online: {}, |
| | | }, |
| | | |
| | | props: { |
| | | checkStrictly: true, |
| | | }, |
| | | |
| | | tableData: [], |
| | | tableHeight: '500', |
| | | loading: false, |
| | | |
| | | currentPage: 1, |
| | | pageSize: 20, |
| | | total: 0, |
| | | |
| | | drawer: false, |
| | | }; |
| | | }, |
| | | watch: { |
| | | currentPage(nValue, oValue) { |
| | | if (nValue != oValue) { |
| | | this.onSearch(); |
| | | } |
| | | }, |
| | | pageSize(nValue, oValue) { |
| | | if (nValue != oValue) { |
| | | this.onSearch(); |
| | | } |
| | | }, |
| | | }, |
| | | computed: { |
| | | ...mapStores(useLoadingStore), |
| | | }, |
| | | methods: { |
| | | onSearch() { |
| | | this.loading = true; |
| | | onSearch(page, func) { |
| | | const f = this.formSearch; |
| | | const area = {}; |
| | | // è¡æ¿åºå |
| | | f._locations.length > 0 |
| | | ? ([area.provinceCode, area.provinceName] = f._locations[0]) |
| | | : ([area.provinceCode, area.provinceName] = [null, null]); |
| | | if (area.provinceCode == '0') |
| | | [area.provinceCode, area.provinceName] = [null, null]; |
| | | f._locations.length > 1 |
| | | ? (area.citycode = f._locations[1][0]) |
| | | : (area.citycode = null); |
| | | f._locations.length > 2 |
| | | ? ([area.districtCode, area.districtName] = f._locations[2]) |
| | | : ([area.districtCode, area.districtName] = [null, null]); |
| | | f._locations.length > 3 |
| | | ? (area.towncode = f._locations[3][0]) |
| | | : (area.towncode = null); |
| | | area.provinceCode = f._locations.pCode ? f._locations.pCode + '0000' : undefined |
| | | area.provinceName = f._locations.pName; |
| | | if (area.provinceCode == null) { |
| | | area.provinceCode = null; |
| | | area.provinceName = null; |
| | | } |
| | | area.cityCode = f._locations.cCode ? f._locations.cCode.substring(0, 3) + '100' : undefined |
| | | area.cityName = f._locations.cName; |
| | | area.districtCode = f._locations.dCode; |
| | | area.districtName = f._locations.dName; |
| | | area.townCode = f._locations.tCode; |
| | | area.townName = f._locations.tName; |
| | | // åºæ¯ç±»å |
| | | area.scensetypeid = f.scensetypeid; |
| | | if (area.scensetypeid == '0') area.scensetypeid = null; |
| | | area.sceneTypes = []; |
| | | f.scensetype.value == null |
| | | ? (area.sceneTypes = []) |
| | | : (area.sceneTypes = [f.scensetype.value]); |
| | | // ä¸ä¸çº¿ç¶æ |
| | | area.online = f.online; |
| | | area.online = f.online.value; |
| | | // å
³é®å |
| | | area.searchText = f.searchText; |
| | | |
| | | userApi |
| | | .fetchUser('00EQQVnE9QFvbkQr', this.currentPage, this.pageSize, area) |
| | | .then((res) => { |
| | | userApi.fetchUser(page.currentPage, page.pageSize, area).then((res) => { |
| | | if (res) { |
| | | this.tableData = res.data; |
| | | this.currentPage = res.headers.currentPage; |
| | | console.log(res.headers); |
| | | this.total = parseInt(res.headers.totalPage) * this.pageSize; |
| | | } |
| | | }) |
| | | .finally(() => { |
| | | this.loading = false; |
| | | func({ |
| | | data: res.data, |
| | | total: res.head.totalCount, |
| | | }); |
| | | }, |
| | | calcTableHeight() { |
| | | const h1 = this.$refs.searchRef.$el.offsetHeight; |
| | | const h2 = this.$refs.paginationRef.$el.offsetHeight; |
| | | // return `calc(100vh - ${h1}px - ${h2}px - var(--el-main-padding) * 2 - var(--el-header-height))`; |
| | | return `calc(100vh - ${h1}px - ${h2}px - 60px - var(--el-main-padding) * 2)`; |
| | | } |
| | | }); |
| | | }, |
| | | editRow(scope) { |
| | | scope.row.loading1 = true; |
| | | this.loadingStore.loadingStatus.push(() => (scope.row.loading1 = false)); |
| | | this.$router.push(`userEdit/${scope.row.guid}`); |
| | | this.$router.push(`userEdit/${scope.row.biGuid}`); |
| | | }, |
| | | itemActive(scope) { |
| | | const rb = {}; |
| | |
| | | confirmTitle: msg, |
| | | onConfirm: () => { |
| | | scope.row.loading2 = true; |
| | | userApi |
| | | return userApi |
| | | .updateScene(rb) |
| | | .then((res) => { |
| | | if (res == 1) { |
| | |
| | | }); |
| | | }, |
| | | tableRowClassName({ row }) { |
| | | return row.extension1 != '0' ? 'online-row' : 'offline-row'; |
| | | return row.userInfo.isenable ? 'online-row' : 'offline-row'; |
| | | }, |
| | | }, |
| | | mounted() { |
| | | this.formSearch.scensetypeid = this.sceneTypes[0].value; |
| | | this.formSearch._locations = [this.locations[0].value]; |
| | | this.formSearch.online = this.onlineStatus[0].value; |
| | | this.tableHeight = this.calcTableHeight(); |
| | | this.onSearch(); |
| | | }, |
| | | }; |
| | | </script> |
| | | <style> |
| | | .el-table .offline-row { |
| | | background-color: var(--el-disabled-bg-color); |
| | | color: var(--el-disabled-text-color); |
| | | } |
| | | .el-table .cell { |
| | | white-space: nowrap; |
| | | color: var(--el-disabled-text-color); |
| | | } |
| | | .el-pagination { |
| | | background-color: var(--el-color-white); |
| | | padding-top: 20px; |
| | | border-top: 1px solid rgba(0, 0, 0, 0.096); |
| | | /* margin-top: 2px; */ |
| | | } |
| | | </style> |
| | | <style></style> |
| | |
| | | <template> |
| | | <el-form |
| | | :inline="false" |
| | | :model="formObj" |
| | | ref="formRef" |
| | | <FYForm |
| | | :form-info="_formInfo" |
| | | :rules="rules" |
| | | label-position="right" |
| | | label-width="150px" |
| | | :reset="active" |
| | | v-model:is-edit="_edit" |
| | | @submit="submit" |
| | | @cancel="cancel" |
| | | > |
| | | <!-- <el-form-item label="id" prop="GUID"> |
| | | <el-input clearable v-model="formObj.GUID" placeholder="id" /> |
| | | </el-form-item> --> |
| | | <template #form-item="{ formObj }"> |
| | | <!-- <el-form-item label="头åurl" prop="HeadIconUrl"> |
| | | <el-input clearable v-model="formObj.HeadIconUrl" placeholder="头åurl" /> |
| | | <el-input |
| | | clearable |
| | | v-model="formObj.HeadIconUrl" |
| | | placeholder="头åurl" |
| | | /> |
| | | </el-form-item> --> |
| | | <el-form-item label="è´¦æ·å" prop="acountname"> |
| | | <el-input clearable v-model="formObj.acountname" placeholder="è´¦æ·å" /> |
| | |
| | | <el-input clearable v-model="formObj.realname" placeholder="ç¨æ·æµç§°" /> |
| | | </el-form-item> |
| | | <el-form-item label="å¯ç " prop="password"> |
| | | <el-col :span="18"> |
| | | <el-input |
| | | :disabled="true" |
| | | clearable |
| | | type="password" |
| | | v-model="formObj.password" |
| | | placeholder="é»è®¤å¯ç 123456" |
| | | /> |
| | | </el-col> |
| | | <el-col :span="6" v-if="!create"> |
| | | <el-row justify="end"> |
| | | <el-button type="danger" @click="onResetPw" :loading="pwLoading" |
| | | >éç½®å¯ç </el-button |
| | | > |
| | | </el-row> |
| | | </el-col> |
| | | </el-form-item> |
| | | <!-- <el-form-item label="ç¨æ·ç±»åid" prop="UserTypeID"> |
| | | <el-input |
| | | clearable |
| | | v-model="formObj.UserTypeID" |
| | | placeholder="ç¨æ·ç±»åid" |
| | | /> |
| | | </el-form-item> --> |
| | | <el-form-item label="ç¨æ·ç±»å" prop="_usertype"> |
| | | <el-select v-model="formObj._usertype" placeholder="ç¨æ·ç±»å"> |
| | | <el-option |
| | | v-for="s in userTypes" |
| | | :key="s.value" |
| | | :label="s.label" |
| | | :value="s" |
| | | /> |
| | | </el-select> |
| | | </el-form-item> |
| | | <el-form-item label="æå±ä¼ä¸" prop="departmentname"> |
| | | <FYOptionUserType |
| | | :allOption="false" |
| | | :initValue="false" |
| | | v-model:value="formObj._usertype" |
| | | ></FYOptionUserType> |
| | | <!-- <el-form-item label="æå±ä¼ä¸" prop="departmentname"> |
| | | <el-input |
| | | clearable |
| | | v-model="formObj.departmentname" |
| | | placeholder="æå±ä¼ä¸" |
| | | disabled |
| | | /> |
| | | </el-form-item> |
| | | </el-form-item> --> |
| | | <el-form-item label="æ¯å¦å¯ç¨" prop="isenable"> |
| | | <el-switch v-model="formObj.isenable" /> |
| | | <span style="margin-left: 16px">{{ |
| | |
| | | <el-form-item label="å·¥å·" prop="workno"> |
| | | <el-input clearable v-model="formObj.workno" placeholder="å·¥å·" /> |
| | | </el-form-item> |
| | | |
| | | <el-form-item label="ææº" prop="telephone"> |
| | | <el-input |
| | | clearable |
| | |
| | | placeholder="ææº" |
| | | /> |
| | | </el-form-item> |
| | | <!-- <el-form-item label="微信id" prop="WechatID"> |
| | | <el-input clearable v-model="formObj.WechatID" placeholder="微信id" /> |
| | | </el-form-item> --> |
| | | <el-form-item label="ç/å¸/åº/é" prop="_locations"> |
| | | <!-- <el-form-item label="ç/å¸/åº/é" prop="_locations"> |
| | | <el-cascader |
| | | v-model="formObj._locations" |
| | | :options="locations" |
| | |
| | | style="width: 280px" |
| | | :disabled="!create" |
| | | /> |
| | | </el-form-item> |
| | | <el-form-item label="åºæ¯ç±»å" prop="_scenetype"> |
| | | <el-select |
| | | v-model="formObj._scenetype" |
| | | placeholder="åºæ¯ç±»å" |
| | | > |
| | | <el-option |
| | | v-for="s in sceneTypes" |
| | | :key="s.value" |
| | | :label="s.label" |
| | | :value="s" |
| | | /> |
| | | </el-select> |
| | | </el-form-item> |
| | | <el-form-item> |
| | | <el-button |
| | | :disabled="!edit" |
| | | type="primary" |
| | | @click="onSubmit" |
| | | :loading="loading" |
| | | >æäº¤</el-button |
| | | > |
| | | <el-button :disabled="!edit" @click="onReset">éç½®</el-button> |
| | | </el-form-item> |
| | | </el-form> |
| | | </el-form-item> --> |
| | | <FYOptionScene |
| | | :allOption="false" |
| | | :type="1" |
| | | :initValue="false" |
| | | v-model:value="formObj._scenetype" |
| | | ></FYOptionScene> |
| | | </template> |
| | | </FYForm> |
| | | </template> |
| | | |
| | | <script setup> |
| | | import { defineProps, defineEmits, reactive, ref, watch } from 'vue'; |
| | | import { useFormConfirm } from '@/composables/formConfirm'; |
| | | import { enumUserNA } from '@/enum/user'; |
| | | import { enumScene, getSceneName } from '@/enum/scene'; |
| | | import { getSceneName } from '@/enum/scene'; |
| | | import { enumLocation } from '@/enum/location'; |
| | | import userApi from '@/api/fytz/userApi'; |
| | | |
| | |
| | | |
| | | const emit = defineEmits(['onSubmit', 'onCancel', 'update:isEdit']); |
| | | |
| | | const { formObj, formRef, edit, onSubmit, onReset } = useFormConfirm({ |
| | | defaultForm: { |
| | | isenable: true, |
| | | }, |
| | | submit: { |
| | | do: submit, |
| | | }, |
| | | cancel: { |
| | | do: cancel, |
| | | }, |
| | | }); |
| | | |
| | | const userTypes = reactive(enumUserNA()); |
| | | const sceneTypes = reactive(enumScene(1, false)); |
| | | const _formInfo = ref(); |
| | | const _edit = ref(false); |
| | | const locations = enumLocation(false); |
| | | const locationsProps = reactive({ |
| | | checkStrictly: true, |
| | | }); |
| | | const loading = ref(false); |
| | | |
| | | const rules = reactive({ |
| | | acountname: [ |
| | | { |
| | |
| | | trigger: 'blur', |
| | | }, |
| | | ], |
| | | password: [ |
| | | { |
| | | required: props.create, |
| | | message: 'å¯ç ä¸è½ä¸ºç©º', |
| | | trigger: 'blur', |
| | | }, |
| | | ], |
| | | // password: [ |
| | | // { |
| | | // required: props.create, |
| | | // message: 'å¯ç ä¸è½ä¸ºç©º', |
| | | // trigger: 'blur', |
| | | // }, |
| | | // ], |
| | | _usertype: [ |
| | | { |
| | | required: true, |
| | |
| | | value: s.usertypeid + '', |
| | | }; |
| | | |
| | | s._scenetype = { |
| | | label: getSceneName(s.extension2, 1), |
| | | value: s.extension2, |
| | | }; |
| | | s._scenetype = getSceneName(s.extension2, 1); |
| | | |
| | | s._locations = []; |
| | | // if (s.provincecode && s.provincecode.length > 0) |
| | | // s._locations.push([s.provincecode, s.provincename]); |
| | | // if (s.citycode && s.citycode.length > 0) |
| | | // s._locations.push([s.citycode, s.cityname]); |
| | | // if (s.districtcode && s.districtcode.length > 0) |
| | | // s._locations.push([s.districtcode, s.districtname]); |
| | | // if (s.towncode && s.towncode.length > 0) |
| | | // s._locations.push([s.towncode, s.townname]); |
| | | |
| | | return s; |
| | | } |
| | | |
| | | function createUser() { |
| | | loading.value = true; |
| | | function createUser(formObj, func) { |
| | | return userApi |
| | | .createUser(formObj.value) |
| | | .then(() => { |
| | | emit('onSubmit', formObj); |
| | | }) |
| | | .finally(() => { |
| | | loading.value = false; |
| | | func(); |
| | | }); |
| | | } |
| | | |
| | | function updateUser() { |
| | | loading.value = true; |
| | | function updateUser(formObj, func) { |
| | | return userApi |
| | | .updateUserInfo(formObj.value) |
| | | .then(() => { |
| | | emit('onSubmit', formObj); |
| | | }) |
| | | .finally(() => { |
| | | loading.value = false; |
| | | func(); |
| | | }); |
| | | } |
| | | |
| | | function submit() { |
| | | function submit(formObj, func) { |
| | | // è¡æ¿åºåä¿¡æ¯å¡«å
|
| | | const a = formObj.value._locations; |
| | | if (a[0]) { |
| | |
| | | const c = formObj.value._scenetype; |
| | | formObj.value.extension2 = c.value; |
| | | |
| | | return props.create ? createUser() : updateUser(); |
| | | return props.create ? createUser(formObj, func) : updateUser(formObj, func); |
| | | } |
| | | |
| | | function cancel() { |
| | |
| | | watch( |
| | | () => props.formInfo, |
| | | (nValue) => { |
| | | formObj.value = parseUserInfo(nValue); |
| | | _formInfo.value = parseUserInfo(nValue); |
| | | } |
| | | ); |
| | | |
| | | watch( |
| | | () => props.active, |
| | | (nValue) => { |
| | | if (!nValue) { |
| | | onReset(); |
| | | } |
| | | } |
| | | ); |
| | | |
| | | watch(edit, (nValue) => { |
| | | watch(_edit, (nValue) => { |
| | | emit('update:isEdit', nValue); |
| | | }); |
| | | |
| | | const pwLoading = ref(false); |
| | | </script> |
| | |
| | | include: [/\.vue$/, /\.vue\?vue/, /\.md$/], |
| | | resolvers: [ |
| | | ElementPlusResolver({ |
| | | importStyle: 'sass', |
| | | importStyle: 'sass' |
| | | }), |
| | | ], |
| | | dts: 'src/components.d.ts', |
| | |
| | | }, |
| | | }, |
| | | server: { |
| | | host: '0.0.0.0', |
| | | }, |
| | | host: '0.0.0.0' |
| | | } |
| | | }); |