Merge branch 'feature-001' of ssh://114.215.109.124:29418/supervision-vue into feature-001
| | |
| | | { |
| | | "$schema": "https://json.schemastore.org/prettierrc", |
| | | "semi": false, |
| | | "semi": true, |
| | | "tabWidth": 2, |
| | | "singleQuote": true, |
| | | "printWidth": 100, |
| | |
| | | "@vueuse/core": "^9.7.0", |
| | | "axios": "^1.2.1", |
| | | "dayjs": "^1.11.10", |
| | | "element-plus": "^2.2.26", |
| | | "element-plus": "^2.4.3", |
| | | "pinia": "^2.0.26", |
| | | "vue": "^3.2.45", |
| | | "vue-router": "^4.1.6" |
| | |
| | | } |
| | | }, |
| | | "node_modules/@element-plus/icons-vue": { |
| | | "version": "2.0.10", |
| | | "license": "MIT", |
| | | "version": "2.3.1", |
| | | "resolved": "https://registry.npmmirror.com/@element-plus/icons-vue/-/icons-vue-2.3.1.tgz", |
| | | "integrity": "sha512-XxVUZv48RZAd87ucGS48jPf6pKu0yV5UCg9f4FFwtrYxXOwWuVJo6wOvSLKEoMQKjv8GsX/mhP6UsC1lRwbUWg==", |
| | | "peerDependencies": { |
| | | "vue": "^3.2.0" |
| | | } |
| | |
| | | "license": "ISC" |
| | | }, |
| | | "node_modules/element-plus": { |
| | | "version": "2.2.26", |
| | | "license": "MIT", |
| | | "version": "2.4.3", |
| | | "resolved": "https://registry.npmmirror.com/element-plus/-/element-plus-2.4.3.tgz", |
| | | "integrity": "sha512-b3q26j+lM4SBqiyzw8HybybGnP2pk4MWgrnzzzYW5qKQUgV6EG1Zg7nMCfgCVccI8tNvZoTiUHb2mFaiB9qT8w==", |
| | | "dependencies": { |
| | | "@ctrl/tinycolor": "^3.4.1", |
| | | "@element-plus/icons-vue": "^2.0.6", |
| | | "@element-plus/icons-vue": "^2.3.1", |
| | | "@floating-ui/dom": "^1.0.1", |
| | | "@popperjs/core": "npm:@sxzz/popperjs-es@^2.11.7", |
| | | "@types/lodash": "^4.14.182", |
| | |
| | | } |
| | | }, |
| | | "@element-plus/icons-vue": { |
| | | "version": "2.0.10", |
| | | "version": "2.3.1", |
| | | "resolved": "https://registry.npmmirror.com/@element-plus/icons-vue/-/icons-vue-2.3.1.tgz", |
| | | "integrity": "sha512-XxVUZv48RZAd87ucGS48jPf6pKu0yV5UCg9f4FFwtrYxXOwWuVJo6wOvSLKEoMQKjv8GsX/mhP6UsC1lRwbUWg==", |
| | | "requires": {} |
| | | }, |
| | | "@eslint-community/eslint-utils": { |
| | |
| | | "dev": true |
| | | }, |
| | | "element-plus": { |
| | | "version": "2.2.26", |
| | | "version": "2.4.3", |
| | | "resolved": "https://registry.npmmirror.com/element-plus/-/element-plus-2.4.3.tgz", |
| | | "integrity": "sha512-b3q26j+lM4SBqiyzw8HybybGnP2pk4MWgrnzzzYW5qKQUgV6EG1Zg7nMCfgCVccI8tNvZoTiUHb2mFaiB9qT8w==", |
| | | "requires": { |
| | | "@ctrl/tinycolor": "^3.4.1", |
| | | "@element-plus/icons-vue": "^2.0.6", |
| | | "@element-plus/icons-vue": "^2.3.1", |
| | | "@floating-ui/dom": "^1.0.1", |
| | | "@popperjs/core": "npm:@sxzz/popperjs-es@^2.11.7", |
| | | "@types/lodash": "^4.14.182", |
| | |
| | | "@vueuse/core": "^9.7.0", |
| | | "axios": "^1.2.1", |
| | | "dayjs": "^1.11.10", |
| | | "element-plus": "^2.2.26", |
| | | "element-plus": "^2.4.3", |
| | | "pinia": "^2.0.26", |
| | | "vue": "^3.2.45", |
| | | "vue-router": "^4.1.6" |
¶Ô±ÈÐÂÎļþ |
| | |
| | | import { $fysp } from '../index'; |
| | | |
| | | export default { |
| | | |
| | | /** |
| | | * è·åèªå¨è¯ä¼°åå²è®°å½ |
| | | */ |
| | | fetchAutoEvaluation(param){ |
| | | return $fysp.post(`evaluation/auto/record`, param); |
| | | } |
| | | }; |
| | |
| | | */ |
| | | checkProblem({ pId, action, remark = '', userId = id, userName = name }) { |
| | | const params = `?pId=${pId}&action=${action}&remark=${remark}&userId=${userId}&userName=${userName}`; |
| | | return $fysp.post(`problemlist/check${params}`).then((res) => res.data); |
| | | return $fysp.post(`problemlist/check${params}`); |
| | | }, |
| | | }; |
| | |
| | | */ |
| | | searchScene(area, page = 1, perPage = 20) { |
| | | const params = `page=${page}&per_page=${perPage}`; |
| | | return $fysp.post(`scense/find?${params}`, area).then((res) => res.data); |
| | | return $fysp.post(`scense/find?${params}`, area); |
| | | }, |
| | | |
| | | /** |
| | |
| | | * @returns åºæ¯è¯¦æ
|
| | | */ |
| | | getSceneDetail(sId) { |
| | | return $fysp |
| | | .get(`scense/detail`, { |
| | | params: { |
| | | sceneId: sId, |
| | | }, |
| | | }) |
| | | .then((res) => res.data); |
| | | return $fysp.get(`scense/detail`, { |
| | | params: { |
| | | sceneId: sId |
| | | } |
| | | }); |
| | | }, |
| | | |
| | | /** |
| | |
| | | const rb = { |
| | | scense: scene ? scene : null, |
| | | subScene: subScene ? JSON.stringify(subScene) : null, |
| | | sceneDevice: sceneDevice ? sceneDevice : null, |
| | | sceneDevice: sceneDevice ? sceneDevice : null |
| | | }; |
| | | return $fysp |
| | | .post(`scense/detail/update?${params}`, rb) |
| | | .then((res) => res.data); |
| | | return $fysp.post(`scense/detail/update?${params}`, rb); |
| | | }, |
| | | |
| | | /** |
| | | * æ´æ°åºæ¯é¢å¤ä¿¡æ¯ |
| | | */ |
| | | updateSubScene(typeId, subScene) { |
| | | return this.updateSceneDetail(typeId, { subScene: subScene }).then( |
| | | (res) => res.data |
| | | ); |
| | | return this.updateSceneDetail(typeId, { subScene: subScene }); |
| | | }, |
| | | |
| | | /** |
| | | * æ´æ°åºæ¯è®¾å¤ä¿¡æ¯ |
| | | */ |
| | | updateSceneDevice(typeId, sceneDevice) { |
| | | return this.updateSceneDetail(typeId, { sceneDevice: sceneDevice }).then( |
| | | (res) => res.data |
| | | ); |
| | | return this.updateSceneDetail(typeId, { sceneDevice: sceneDevice }); |
| | | }, |
| | | |
| | | /** |
| | |
| | | * @param {Object} scene |
| | | */ |
| | | createScene(scene) { |
| | | return $fysp.put('scense', scene).then((res) => res.data); |
| | | return $fysp.put('scense', scene); |
| | | }, |
| | | |
| | | /** |
| | |
| | | * @param {Object} scene |
| | | */ |
| | | updateScene(scene) { |
| | | return $fysp.post('scense', scene).then((res) => res.data); |
| | | }, |
| | | return $fysp.post('scense', scene); |
| | | } |
| | | }; |
| | |
| | | * è·åé¡¶å±ä»»å¡ |
| | | */ |
| | | getTopTask() { |
| | | return $fysp.get('task/alltask/0').then((res) => res.data); |
| | | return $fysp.get('task/alltask/0'); |
| | | }, |
| | | |
| | | /** |
| | | * è·ååä»»å¡ç»è®¡ä¿¡æ¯ |
| | | */ |
| | | getSubtaskSummary({ topTaskId = undefined, sceneTypeId = undefined }) { |
| | | return $fysp |
| | | .get('subtask/summary', { |
| | | params: { |
| | | topTaskId: topTaskId, |
| | | sceneTypeId: sceneTypeId, |
| | | }, |
| | | }) |
| | | .then((res) => res.data); |
| | | return $fysp.get('subtask/summary', { |
| | | params: { |
| | | topTaskId: topTaskId, |
| | | sceneTypeId: sceneTypeId |
| | | } |
| | | }); |
| | | }, |
| | | |
| | | /** |
| | | * è·ååä»»å¡é®é¢è¯¦æ
|
| | | */ |
| | | getProBySubtask(id) { |
| | | return $fysp |
| | | .get('problemlist/subtask', { |
| | | params: { |
| | | stGuid: id, |
| | | }, |
| | | }) |
| | | .then((res) => res.data); |
| | | }, |
| | | return $fysp.get('problemlist/subtask', { |
| | | params: { |
| | | stGuid: id |
| | | } |
| | | }); |
| | | } |
| | | }; |
| | |
| | | * è·åç¨æ·è¯¦æ
|
| | | */ |
| | | getUserById(id) { |
| | | return $fysp.get(`userinfo/${id}`).then((res) => res.data); |
| | | return $fysp.get(`userinfo/${id}`); |
| | | }, |
| | | |
| | | /** |
| | | * æ´æ°ç¨æ·è¯¦æ
|
| | | */ |
| | | updateUser(user) { |
| | | return $fysp.post(`userinfo`, user).then((res) => res.data); |
| | | return $fysp.post(`userinfo`, user); |
| | | }, |
| | | |
| | | /** |
| | | * è·ååºæ¯çç¨æ·è¯¦æ
|
| | | */ |
| | | getUserByScene(sId) { |
| | | return $fysp |
| | | .get(`userinfo/scene/get?sceneId=${sId}`) |
| | | .then((res) => res.data); |
| | | return $fysp.get(`userinfo/scene/get?sceneId=${sId}`); |
| | | }, |
| | | |
| | | /** |
| | | * èªå¨åå»ºè´¦æ· |
| | | */ |
| | | autoCreateAccount(sId) { |
| | | return $fysp.post(`userinfo/create?sceneId=${sId}`).then((res) => res.data); |
| | | }, |
| | | return $fysp.post(`userinfo/create?sceneId=${sId}`); |
| | | } |
| | | }; |
| | |
| | | */ |
| | | getNoticeHistory({ type, subtype = null, page = 1, perPage = 20 }) { |
| | | const params = `userId=${id}&page=${page}&per_page=${perPage}`; |
| | | return $fytz |
| | | .post(`notifications/history?${params}`, { |
| | | ecNoticetype: type, |
| | | ecNoticesubtype: subtype, |
| | | }) |
| | | .then((res) => res.data); |
| | | return $fytz.post(`notifications/history?${params}`, { |
| | | ecNoticetype: type, |
| | | ecNoticesubtype: subtype |
| | | }); |
| | | }, |
| | | |
| | | /** |
| | | * è·åç¨æ·æªè¯»éç¥ |
| | | */ |
| | | getNotification() { |
| | | return $fytz |
| | | .get('notifications', { |
| | | params: { |
| | | userId: id, |
| | | page: 1, |
| | | per_page: 30, |
| | | }, |
| | | }) |
| | | .then((res) => res.data); |
| | | return $fytz.get('notifications', { |
| | | params: { |
| | | userId: id, |
| | | page: 1, |
| | | per_page: 30 |
| | | } |
| | | }); |
| | | }, |
| | | |
| | | /** |
| | |
| | | releaseNotice(notice) { |
| | | notice.authorId = id; |
| | | notice.authorName = name; |
| | | return $fytz |
| | | .post(`notifications/${id}/release2`, notice) |
| | | .then((res) => res.data); |
| | | }, |
| | | return $fytz.post(`notifications/${id}/release2`, notice); |
| | | } |
| | | }; |
| | |
| | | */ |
| | | fetchUser(page = 1, per_page = 20, data) { |
| | | const params = `page=${page}&per_page=${per_page}`; |
| | | return $fytz.post(`baseInfo/search/?${params}`, data).then((res) => res.data); |
| | | return $fytz.post(`baseInfo/search/?${params}`, data); |
| | | }, |
| | | |
| | | /** |
| | |
| | | * @returns |
| | | */ |
| | | fetchUserBaseInfo(userId) { |
| | | return $fytz |
| | | .get(`userInfo/baseInfo?userId=${userId}`) |
| | | .then((res) => res.data); |
| | | return $fytz.get(`userInfo/baseInfo?userId=${userId}`); |
| | | }, |
| | | |
| | | /** |
| | | * æ´æ°ç¨æ·è´¦æ·ä¿¡æ¯ |
| | | * @param {*} data |
| | | * @returns |
| | | * @param {*} data |
| | | * @returns |
| | | */ |
| | | updateUserInfo(data) { |
| | | return $fytz.post('userInfo', data).then((res) => res.data); |
| | | return $fytz.post('userInfo', data); |
| | | }, |
| | | |
| | | /** |
| | | * æ°å¢ç¨æ· |
| | | * @param {*} data |
| | | * @returns |
| | | * @param {*} data |
| | | * @returns |
| | | */ |
| | | createUser(data) { |
| | | return $fytz.put('userInfo', data).then((res) => res.data); |
| | | return $fytz.put('userInfo/create', data); |
| | | }, |
| | | |
| | | /** |
| | | * éç½®ç¨æ·å¯ç |
| | | */ |
| | | resetPassword(id) { |
| | | return $fytz.post(`userInfo/resetPw?userId=${id}`); |
| | | } |
| | | }; |
| | |
| | | let ip2_file = 'https://fyami.com.cn/'; |
| | | |
| | | if (debug) { |
| | | // ip1 = 'http://192.168.0.123:8082/'; |
| | | ip1 = 'http://192.168.0.138:8082/'; |
| | | // ip1_file = 'http://47.100.191.150:9005/'; |
| | | ip2 = 'http://192.168.0.138:8080/'; |
| | | // ip2_file = 'https://fyami.com.cn/'; |
| | |
| | | //é£ç¾½ç管 |
| | | const $fysp = axios.create({ |
| | | baseURL: ip1, |
| | | timeout: 10000, |
| | | timeout: 10000 |
| | | }); |
| | | $fysp.imgUrl = `${ip1_file}images/`; |
| | | $fysp.downloadUrl = `${ip1_file}files/`; |
| | |
| | | //é£ç¾½ç¯å¢ |
| | | const $fytz = axios.create({ |
| | | baseURL: ip2, |
| | | timeout: 10000, |
| | | timeout: 10000 |
| | | }); |
| | | $fytz.imgUrl = `${ip2_file}images/`; |
| | | |
| | |
| | | console.log(error); |
| | | ElMessage({ |
| | | message: error, |
| | | type: 'error', |
| | | type: 'error' |
| | | }); |
| | | return Promise.reject(error); |
| | | } |
| | |
| | | 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; |
| | | return response.data; |
| | | } else { |
| | | ElMessage({ |
| | | message: response.data.message, |
| | | type: 'error' |
| | | }); |
| | | return Promise.reject(response.data.message); |
| | | } |
| | | } else { |
| | | return response; |
| | | return response.data; |
| | | } |
| | | } else { |
| | | return Promise.reject(response); |
| | |
| | | console.log('==>请æ±ç»æ'); |
| | | ElMessage({ |
| | | message: error, |
| | | type: 'error', |
| | | type: 'error' |
| | | }); |
| | | return Promise.reject(error); |
| | | } |
| | |
| | | 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/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'] |
| | |
| | | ElCol: typeof import('element-plus/es')['ElCol'] |
| | | ElConfigProvider: typeof import('element-plus/es')['ElConfigProvider'] |
| | | ElContainer: typeof import('element-plus/es')['ElContainer'] |
| | | ElDatePicker: typeof import('element-plus/es')['ElDatePicker'] |
| | | ElDescriptions: typeof import('element-plus/es')['ElDescriptions'] |
| | | ElDescriptionsItem: typeof import('element-plus/es')['ElDescriptionsItem'] |
| | | ElDivider: typeof import('element-plus/es')['ElDivider'] |
| | |
| | | ElIcon: typeof import('element-plus/es')['ElIcon'] |
| | | ElImage: typeof import('element-plus/es')['ElImage'] |
| | | ElInput: typeof import('element-plus/es')['ElInput'] |
| | | ElInputNumber: typeof import('element-plus/es')['ElInputNumber'] |
| | | ElMain: typeof import('element-plus/es')['ElMain'] |
| | | ElMenu: typeof import('element-plus/es')['ElMenu'] |
| | | ElMenuItem: typeof import('element-plus/es')['ElMenuItem'] |
| | |
| | | ElTabs: typeof import('element-plus/es')['ElTabs'] |
| | | ElTag: typeof import('element-plus/es')['ElTag'] |
| | | ElTooltip: typeof import('element-plus/es')['ElTooltip'] |
| | | ElTransfer: typeof import('element-plus/es')['ElTransfer'] |
| | | ElTree: typeof import('element-plus/es')['ElTree'] |
| | | Footer: typeof import('./components/core/Footer.vue')['default'] |
| | | FormCol: typeof import('./components/layout/FormCol.vue')['default'] |
| | |
| | | FYTable: typeof import('./components/table/FYTable.vue')['default'] |
| | | Header: typeof import('./components/core/Header.vue')['default'] |
| | | MenuItems: typeof import('./components/core/MenuItems.vue')['default'] |
| | | ProblemCard: typeof import('./components/ProblemCard.vue')['default'] |
| | | RouterLink: typeof import('vue-router')['RouterLink'] |
| | | RouterView: typeof import('vue-router')['RouterView'] |
| | | SearchBar: typeof import('./components/SearchBar.vue')['default'] |
| | |
| | | </template> |
| | | |
| | | <script> |
| | | import { MENU_FYSP, MENU_FYTZ, MENU_FYPW } from '../../constants/index' |
| | | import { MENU_FYSP, MENU_FYTZ, MENU_FYPW } from '@/constants/index' |
| | | |
| | | export default { |
| | | name: 'CoreSiderMenu', |
| | |
| | | <!-- åºæ¯åºæ¬ä¿¡æ¯ç¼è¾ --> |
| | | <template> |
| | | <el-form |
| | | :inline="false" |
| | |
| | | label-width="150px" |
| | | > |
| | | <slot name="form-item" :formObj="formObj"></slot> |
| | | <el-form-item> |
| | | <el-button |
| | | :disabled="!edit" |
| | | type="primary" |
| | | @click="onSubmit" |
| | | :loading="loading" |
| | | <el-form-item v-if="showButtons"> |
| | | <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-button v-if="useReset" :disabled="!edit" @click="onReset">éç½®</el-button> |
| | | <el-button v-if="useCancel" @click="onCancel">åæ¶</el-button> |
| | | </el-form-item> |
| | | </el-form> |
| | | </template> |
| | |
| | | formInfo: Object, |
| | | //è¡¨åæ£éªè§å |
| | | rules: Object, |
| | | showButtons: { |
| | | type: Boolean, |
| | | default: true |
| | | }, |
| | | //åæ¶æé®æ¯å¦å¯ç¨ |
| | | enableCancelBtn: Boolean, |
| | | useCancel: Boolean, |
| | | //éç½®æé®æ¯å¦å¯ç¨ |
| | | useReset: Boolean, |
| | | //触åéç½® |
| | | reset: Boolean, |
| | | //éç¥ç¼è¾ç¶æ |
| | | isEdit: Boolean, |
| | | isEdit: Boolean |
| | | }); |
| | | |
| | | //触å彿°ï¼æäº¤ååæ¶ |
| | | const emit = defineEmits(['submit', 'cancel', 'update:isEdit']); |
| | | |
| | | //表åæä½å½æ° |
| | | const { formObj, formRef, edit, onSubmit, onCancel, onReset } = useFormConfirm({ |
| | | const { formObj, formRef, edit, onSubmit, onCancel, onReset, formProps } = useFormConfirm({ |
| | | submit: { |
| | | do: submit, |
| | | do: submit |
| | | }, |
| | | cancel: { |
| | | do: cancel, |
| | | }, |
| | | do: cancel |
| | | } |
| | | }); |
| | | |
| | | //å è½½ç¶æ |
| | |
| | | emit('submit', formObj, () => { |
| | | loading.value = false; |
| | | resolve(); |
| | | },(err)=>{ |
| | | loading.value = false; |
| | | reject(err); |
| | | }); |
| | | }); |
| | | } |
| | |
| | | () => props.formInfo, |
| | | (nValue) => { |
| | | formObj.value = nValue; |
| | | } |
| | | }, |
| | | { deep: false, immediate: false } |
| | | ); |
| | | |
| | | //çå¬è¡¨åéç½®åè½è§¦å |
| | |
| | | <template> |
| | | <el-form-item :label="placeholder"> |
| | | <el-form-item :label="placeholder" :prop="prop"> |
| | | <el-cascader |
| | | v-model="selectedOptions" |
| | | :options="locations" |
| | |
| | | checkStrictly: { |
| | | type: Boolean, |
| | | default: true |
| | | } |
| | | }, |
| | | prop: String |
| | | }, |
| | | emits: ['update:value'], |
| | | data() { |
| | |
| | | return |
| | | } |
| | | if (nVal != oVal) { |
| | | if (nVal || nVal.length > 0) { |
| | | this.selectedOptions = this.optionFormatReverse(nVal); |
| | | } |
| | | this.selectedOptions = this.optionFormatReverse(nVal) |
| | | } |
| | | }, |
| | | deep: true, |
| | | }, |
| | | immediate: true |
| | | } |
| | | }, |
| | | methods: { |
| | | /** |
| | |
| | | }, |
| | | 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]) |
| | | if (val) { |
| | | 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 |
| | | } |
| | |
| | | } |
| | | }, |
| | | deep: true, |
| | | immediate: true |
| | | }, |
| | | }, |
| | | mounted() { |
| | |
| | | <template> |
| | | <el-form-item label="åºæ¯ç±»å"> |
| | | <el-form-item label="åºæ¯ç±»å" :prop="prop"> |
| | | <el-select |
| | | v-model="selectedOptions" |
| | | placeholder="åºæ¯ç±»å" |
| | |
| | | type: Boolean, |
| | | default: true, |
| | | }, |
| | | prop: String |
| | | }, |
| | | emits: ['update:value'], |
| | | data() { |
| | |
| | | } |
| | | }, |
| | | deep: true, |
| | | immediate: true |
| | | }, |
| | | }, |
| | | mounted() { |
| | |
| | | if (nVal != oVal) { |
| | | this.selectedOptions = nVal |
| | | } |
| | | } |
| | | }, |
| | | immediate: true |
| | | } |
| | | }, |
| | | methods: { |
| | |
| | | <template> |
| | | <el-form-item label="ç¨æ·ç±»å"> |
| | | <el-form-item label="ç¨æ·ç±»å" :prop="prop"> |
| | | <el-select |
| | | v-model="selectedOptions" |
| | | placeholder="ç¨æ·ç±»å" |
| | |
| | | type: Boolean, |
| | | default: true, |
| | | }, |
| | | prop: String |
| | | }, |
| | | emits: ['update:value'], |
| | | data() { |
| | |
| | | } |
| | | }, |
| | | deep: true, |
| | | immediate: true |
| | | }, |
| | | }, |
| | | mounted() { |
| | |
| | | </template> |
| | | </FYSearchBar> |
| | | </el-row> |
| | | |
| | | <el-row ref="expandRef"> |
| | | <slot name="options-expand"></slot> |
| | | </el-row> |
| | | <el-table |
| | | :data="tableData" |
| | | v-loading="loading" |
| | | table-layout="fixed" |
| | | :row-class-name="tableRowClassName" |
| | | :height="tableHeight" |
| | | border |
| | | > |
| | | <slot name="table-column"></slot> |
| | | </el-table> |
| | | |
| | | <el-pagination |
| | | v-if="pagination" |
| | | ref="paginationRef" |
| | | class="el-pagination" |
| | | v-model:current-page="currentPage" |
| | |
| | | export default { |
| | | props: { |
| | | rowClassName: undefined, |
| | | pagination: { |
| | | type: Boolean, |
| | | default: true |
| | | } |
| | | }, |
| | | data() { |
| | | return { |
| | |
| | | total: 0, |
| | | currentPage: 1, |
| | | pageSize: 20, |
| | | loading: false, |
| | | }; |
| | | loading: false |
| | | } |
| | | }, |
| | | emits: ['search'], |
| | | watch: { |
| | | currentPage(nValue, oValue) { |
| | | if (nValue != oValue) { |
| | | this.onSearch(); |
| | | this.onSearch() |
| | | } |
| | | }, |
| | | pageSize(nValue, oValue) { |
| | | if (nValue != oValue) { |
| | | this.onSearch(); |
| | | this.onSearch() |
| | | } |
| | | }, |
| | | } |
| | | }, |
| | | methods: { |
| | | /** |
| | |
| | | * åè°å½æ°æ¥æ¶ä¸ä¸ªå¯¹è±¡ï¼å
æ¬è¡¨æ ¼æ°æ®æ°ç»dataåæ°æ®æ»æ°total |
| | | */ |
| | | onSearch() { |
| | | this.loading = true; |
| | | this.loading = true |
| | | this.$emit( |
| | | 'search', |
| | | { |
| | | currentPage: this.currentPage, |
| | | pageSize: this.pageSize, |
| | | pageSize: this.pageSize |
| | | }, |
| | | (res) => { |
| | | this.tableData = res.data; |
| | | this.total = res.total; |
| | | this.loading = false; |
| | | this.tableData = res.data |
| | | this.total = res.total ? res.total : 0 |
| | | this.loading = false |
| | | } |
| | | ); |
| | | ) |
| | | }, |
| | | calcTableHeight() { |
| | | const h1 = this.$refs.searchRef.$el.offsetHeight; |
| | | const h2 = this.$refs.paginationRef.$el.offsetHeight; |
| | | const h1 = this.$refs.searchRef.$el.offsetHeight |
| | | const h2 = this.$refs.paginationRef ? this.$refs.paginationRef.$el.offsetHeight : 0 |
| | | const h3 = this.$refs.expandRef.$el.offsetHeight |
| | | const h = h1 + h2 + h3 |
| | | // 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)`; |
| | | return `calc(100vh - ${h}px - 60px - var(--el-main-padding) * 2)` |
| | | }, |
| | | tableRowClassName({ row }) { |
| | | if (this.rowClassName) { |
| | | if (typeof this.rowClassName == 'string') { |
| | | return this.rowClassName; |
| | | return this.rowClassName |
| | | } else if (typeof this.rowClassName == 'function') { |
| | | return this.rowClassName({ row }); |
| | | return this.rowClassName({ row }) |
| | | } |
| | | } else { |
| | | return row.extension1 != '0' ? 'online-row' : 'offline-row'; |
| | | return row.extension1 != '0' ? 'online-row' : 'offline-row' |
| | | } |
| | | }, |
| | | } |
| | | }, |
| | | mounted() { |
| | | this.tableHeight = this.calcTableHeight(); |
| | | this.onSearch(); |
| | | }, |
| | | }; |
| | | this.tableHeight = this.calcTableHeight() |
| | | this.onSearch() |
| | | } |
| | | } |
| | | </script> |
| | | |
| | | <style> |
| | |
| | | // 表åç确认ååæ¶ |
| | | import { onActivated, onDeactivated, ref, watch } from 'vue'; |
| | | import { defineProps, onActivated, onDeactivated, ref, watch } from 'vue'; |
| | | import { useCloned } from '@vueuse/core'; |
| | | import { useMessageBoxTip, useMessageBox } from './messageBox'; |
| | | |
| | | // 表åç确认ååæ¶ |
| | | export function useFormConfirm({ |
| | | defaultForm = undefined, |
| | | submit = { |
| | | do: () => {}, |
| | | do: () => {} |
| | | }, |
| | | cancel = { |
| | | do: () => {}, |
| | | do: () => {} |
| | | }, |
| | | reset = { |
| | | do: () => {}, |
| | | }, |
| | | do: () => {} |
| | | } |
| | | }) { |
| | | if (!submit.title) submit.title = 'æäº¤'; |
| | | if (!submit.msg) submit.msg = '确认æ¯å¦æäº¤ï¼'; |
| | | if (!cancel.title) cancel.title = 'åæ¶'; |
| | | if (!cancel.msg) cancel.msg = 'æ¯å¦æ¾å¼å·²ç¼è¾çå
容ï¼'; |
| | | |
| | | const formProps = defineProps({ |
| | | // æ¯å¦å¨æäº¤æå忏
空表å |
| | | clearAftSubmit: Boolean |
| | | }); |
| | | |
| | | //表åå
容 |
| | | const formObj = ref(defaultForm ? defaultForm : {}); |
| | |
| | | edit.value = false; |
| | | isReset = true; |
| | | formObj.value = useCloned(formObjClone.cloned, { |
| | | manual: true, |
| | | manual: true |
| | | }).cloned.value; |
| | | formRef.value.clearValidate(); |
| | | }; |
| | | |
| | | // æ¸
空表å |
| | | const clear = function () { |
| | | edit.value = false; |
| | | isReset = true; |
| | | formRef.value.resetFields(); |
| | | // formRef.value.resetFields(); |
| | | edit.value = false; |
| | | }; |
| | | |
| | | // æäº¤æåå |
| | | const submited = function () { |
| | | if (formProps.clearAftSubmit) clear(); |
| | | edit.value = false; |
| | | formObjClone = useCloned(formObj, { manual: true }); |
| | | }; |
| | |
| | | confirmMsg: submit.msg, |
| | | confirmTitle: submit.title, |
| | | onConfirm: async () => { |
| | | await submit.do(); |
| | | const res = await submit.do(); |
| | | submited(); |
| | | return; |
| | | }, |
| | | return res; |
| | | } |
| | | }); |
| | | } |
| | | }); |
| | |
| | | confirmMsg: cancel.msg, |
| | | confirmTitle: cancel.title, |
| | | onConfirm: () => { |
| | | clear(); |
| | | // clear(); |
| | | return cancel.do(); |
| | | }, |
| | | } |
| | | }); |
| | | } else { |
| | | cancel.do(); |
| | |
| | | onConfirm: () => { |
| | | _reset(); |
| | | return reset.do(); |
| | | }, |
| | | } |
| | | }); |
| | | } else { |
| | | _reset(); |
| | |
| | | } |
| | | }; |
| | | |
| | | return { formObj, formRef, edit, onSubmit, onCancel, onReset }; |
| | | return { formProps, formObj, formRef, edit, onSubmit, onCancel, onReset }; |
| | | } |
| | |
| | | let msg = `å·²${doneMsg}` |
| | | if (typeof onConfirm === 'function') { |
| | | const str = await onConfirm(); |
| | | if (str && str != '') { |
| | | if (typeof str === 'string' && str != '') { |
| | | msg = `å·²${doneMsg}, ${str}` |
| | | } |
| | | } |
¶Ô±ÈÐÂÎļþ |
| | |
| | | // ç¯ä¿¡ç è½¬æ¢ |
| | | |
| | | function envCreditCode(score) { |
| | | const s = parseInt(score) |
| | | if (s <= 59) { |
| | | return { |
| | | value: 2, |
| | | name: '红ç ', |
| | | color: '#db2828' |
| | | }; |
| | | } else if (s <= 89) { |
| | | return { |
| | | value: 1, |
| | | name: 'é»ç ', |
| | | color: '#f7a62c' |
| | | }; |
| | | } else { |
| | | return { |
| | | value: 0, |
| | | name: '绿ç ', |
| | | color: '#21ba45' |
| | | }; |
| | | } |
| | | } |
| | | |
| | | export { envCreditCode }; |
| | |
| | | export { MENU_FYSP, MENU_FYTZ, MENU_FYPW } from './menu' |
| | | export { MENU_FYSP, MENU_FYTZ, MENU_FYPW } from './menu'; |
| | | export { envCreditCode } from './envCreditCode'; |
| | |
| | | { |
| | | path: '/fysp/evaluation/datasource', |
| | | icon: 'MessageBox', |
| | | name: 'è¯ä¼°æ°æ®æº', |
| | | name: 'è¯ä¼°ä»»å¡', |
| | | }, |
| | | { |
| | | path: '/fysp/evaluation/resultManage', |
| | | icon: 'Tickets', |
| | | name: 'è¯ä¼°ç®¡ç', |
| | | name: 'è¯ä¼°è®°å½', |
| | | }, |
| | | ], |
| | | }, |
| | |
| | | // å è½½ç¶æçé»è¾ç®¡ç |
| | | |
| | | import { defineStore } from 'pinia' |
| | | import { defineStore } from 'pinia'; |
| | | |
| | | export const useLoadingStore = defineStore('loading', { |
| | | state: () => { |
| | | return { |
| | | loadingStatus: [] |
| | | } |
| | | }; |
| | | }, |
| | | actions: { |
| | | pushLoading(func) { |
| | | const timeout = setTimeout(func, 3000); |
| | | this.loadingStatus.push({ t: timeout, f: func }); |
| | | }, |
| | | clearLoading() { |
| | | this.loadingStatus.forEach(l => { |
| | | if (typeof l === 'function') { |
| | | l() |
| | | } |
| | | }); |
| | | if (this.loadingStatus.length > 0) { |
| | | this.loadingStatus = [] |
| | | this.loadingStatus.forEach((obj) => { |
| | | clearTimeout(obj.t) |
| | | obj.f() |
| | | }); |
| | | this.loadingStatus = []; |
| | | } |
| | | } |
| | | } |
| | | }) |
| | | }); |
| | |
| | | <!-- åºæ¯åºæ¬ä¿¡æ¯ç¼è¾ --> |
| | | <template> |
| | | <<<<<<< HEAD |
| | | <FYForm :form-info="_formInfo" :rules="rules" @submit="submit" @cancel="cancel"> |
| | | ======= |
| | | <FYForm |
| | | :form-info="_formInfo" |
| | | :rules="rules" |
| | | :useReset="true" |
| | | @submit="submit" |
| | | @cancel="cancel" |
| | | > |
| | | >>>>>>> 356f54467f525f437f41271fb62f6be66f2ab1e5 |
| | | <template #form-item="{ formObj }"> |
| | | <el-form-item label="åºæ¯åç§°" prop="name"> |
| | | <el-input clearable show-word-limit v-model="formObj.name" placeholder="åºæ¯åç§°" /> |
| | |
| | | |
| | | const emit = defineEmits(['onSubmit', 'onCancel']) |
| | | |
| | | const _formInfo = ref() |
| | | const sceneTypes = reactive(enumScene(2, false)) |
| | | const locations = reactive(enumLocation(false)) |
| | | const _formInfo = ref({}); |
| | | const sceneTypes = reactive(enumScene(2, false)); |
| | | const locations = reactive(enumLocation(false)); |
| | | const cascaderProps = reactive({ |
| | | checkStrictly: true |
| | | }) |
| | |
| | | }, |
| | | itemEdit(scope) { |
| | | scope.row.loading1 = true; |
| | | this.loadingStore.loadingStatus.push(() => (scope.row.loading1 = false)); |
| | | this.loadingStore.pushLoading(() => (scope.row.loading1 = false)); |
| | | this.$router.push(`sceneEdit/${scope.row.guid}`); |
| | | }, |
| | | itemActive(scope) { |
| | |
| | | <template> |
| | | <div>DataSource</div> |
| | | <el-row :gutter="16"> |
| | | <el-col :span="16"> |
| | | <CompPreCheck></CompPreCheck> |
| | | </el-col> |
| | | <el-col :span="8"> |
| | | <div class="radius"></div> |
| | | </el-col> |
| | | </el-row> |
| | | </template> |
| | | |
| | | <script> |
| | | import CompPreCheck from "./components/CompPreCheck.vue"; |
| | | export default { |
| | | name: 'DataSource', |
| | | components: { CompPreCheck }, |
| | | data() { |
| | | return { |
| | | |
| | | } |
| | | return {}; |
| | | } |
| | | }; |
| | | </script> |
| | | <style scoped> |
| | | .radius { |
| | | height: 80vh; |
| | | border: 1px solid var(--el-border-color); |
| | | border-radius: var(--el-border-radius-base); |
| | | } |
| | | </style> |
| | |
| | | <template> |
| | | <CompPreCheck @pre-check="autoEvaluate"></CompPreCheck> |
| | | <!-- <CompPreCheck @pre-check="autoEvaluate"></CompPreCheck> --> |
| | | |
| | | <FYTable @search="onSearch" :pagination="false" ref="tableRef"> |
| | | <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 :initValue="false" type="month" v-model:value="formSearch.time"></FYOptionTime> |
| | | </template> |
| | | |
| | | <template #options-expand> |
| | | <CompQuickSet @quick-set="setOptions"></CompQuickSet> |
| | | </template> |
| | | |
| | | <template #table-column> |
| | | <el-table-column type="index" fixed="left" prop="sceneName" label="åç§°" width="300"> |
| | | <template #default="{ row }"> |
| | | <el-tooltip |
| | | effect="dark" |
| | | :content="row.sceneName" |
| | | placement="top-start" |
| | | :show-after="500" |
| | | > |
| | | {{ row.sceneName }} |
| | | </el-tooltip> |
| | | </template> |
| | | </el-table-column> |
| | | <el-table-column |
| | | prop="subTaskTime" |
| | | label="å·¡æ¥æ¥æ" |
| | | width="110" |
| | | sortable |
| | | :formatter="timeFormat" |
| | | /> |
| | | <el-table-column |
| | | prop="evaluation.resultscorebef" |
| | | label="å¾å" |
| | | width="90" |
| | | sortable |
| | | :sort-method="sortScore" |
| | | /> |
| | | <el-table-column prop="evaluation.resultscorebef" label="ç¯ä¿¡ç " width="100"> |
| | | <template #default="{ row }"> |
| | | <span :style="`color: ${toCode(row).color};`">{{ toCode(row).name }}</span> |
| | | </template> |
| | | </el-table-column> |
| | | |
| | | <el-table-column prop="dname" label="åºå¿" width="90" /> |
| | | <el-table-column |
| | | prop="tname" |
| | | label="è¡é" |
| | | width="110" |
| | | :filters="townFilters" |
| | | :filter-method="filterHandler" |
| | | /> |
| | | <el-table-column prop="evaluation.scenseaddress" label="å°å" /> |
| | | <!-- <el-table-column prop="biArea" label="éä¸åº" width="110" /> |
| | | <el-table-column prop="biManagementCompany" label="ç©ä¸" min-width="110"/> --> |
| | | <el-table-column fixed="right" align="right" label="æä½" width="160"> |
| | | <template #header> |
| | | <el-button icon="DocumentAdd" size="default" type="success" @click="drawer = true" |
| | | >èªå¨è¯ä¼°</el-button |
| | | > |
| | | </template> |
| | | <template #default="{ row }"> |
| | | <el-button type="primary" size="small" @click="editRow(row)">æ¥ç</el-button> |
| | | </template> |
| | | </el-table-column> |
| | | </template> |
| | | </FYTable> |
| | | </template> |
| | | |
| | | <script> |
| | | import CompPreCheck from './components/CompPreCheck.vue'; |
| | | import dayjs from 'dayjs'; |
| | | import evaluateApi from '@/api/fysp/evaluateApi'; |
| | | import { envCreditCode } from '@/constants/index'; |
| | | import CompQuickSet from './components/CompQuickSet.vue'; |
| | | |
| | | export default { |
| | | name: 'ResultManage', |
| | | components: { CompPreCheck }, |
| | | data() { |
| | | return {}; |
| | | name: 'ResultManage', |
| | | components: { CompQuickSet }, |
| | | data() { |
| | | return { |
| | | formSearch: { |
| | | locations: {}, |
| | | scenetype: {}, |
| | | time: dayjs().add(-1, 'M').date(1).toDate() |
| | | }, |
| | | townFilters: [] |
| | | }; |
| | | }, |
| | | methods: { |
| | | setOptions(param) { |
| | | this.formSearch.locations = param.locations; |
| | | this.formSearch.scenetype = param.scenetype; |
| | | this.$refs.tableRef.onSearch() |
| | | }, |
| | | methods:{ |
| | | /** |
| | | * éè¿èªè¯é¢æ£åï¼æ§è¡èªå¨è¯ä¼° |
| | | * @param {*} options æ¥è¯¢åæ° |
| | | */ |
| | | autoEvaluate(options){ |
| | | |
| | | onSearch(page, func) { |
| | | const { locations, scenetype, time } = this.formSearch; |
| | | const area = { |
| | | provincecode: locations.pCode, |
| | | provincename: locations.pName, |
| | | citycode: locations.cCode, |
| | | cityname: locations.cName, |
| | | districtcode: locations.dCode, |
| | | districtname: locations.dName, |
| | | starttime: dayjs(time).format('YYYY-MM-DD'), |
| | | scensetypeid: scenetype.value |
| | | }; |
| | | evaluateApi.fetchAutoEvaluation(area).then((res) => { |
| | | if (typeof func === 'function') { |
| | | func({ data: res.data }); |
| | | } |
| | | if (res.data) { |
| | | this.getFilters(res.data); |
| | | } |
| | | }); |
| | | }, |
| | | getFilters(data) { |
| | | const townList = []; |
| | | data.forEach((e) => { |
| | | if (townList.indexOf(e.tname) == -1) { |
| | | townList.push(e.tname); |
| | | } |
| | | }); |
| | | this.townFilters = townList.map((v) => { |
| | | return { text: v, value: v }; |
| | | }); |
| | | }, |
| | | toCode(row, column) { |
| | | if (row.evaluation) { |
| | | return envCreditCode(row.evaluation.resultscorebef); |
| | | } else { |
| | | return ''; |
| | | } |
| | | }, |
| | | timeFormat(row, column) { |
| | | const time = row.subTaskTime; |
| | | if (time) { |
| | | return dayjs(time).format('MM-DD'); |
| | | } else { |
| | | return ''; |
| | | } |
| | | }, |
| | | filterHandler(value, row, column) { |
| | | const property = column['property']; |
| | | return row[property] === value; |
| | | }, |
| | | sortScore(a, b) { |
| | | const s1 = a.evaluation ? parseInt(a.evaluation.resultscorebef) : 0; |
| | | const s2 = b.evaluation ? parseInt(b.evaluation.resultscorebef) : 0; |
| | | return s1 - s2; |
| | | } |
| | | } |
| | | }; |
| | | </script> |
| | | <style scoped> |
| | | .a { |
| | | color: #f7a62c; |
| | | } |
| | | </style> |
¶Ô±ÈÐÂÎļþ |
| | |
| | | <template> |
| | | <div></div> |
| | | </template> |
| | | <script> |
| | | export default { |
| | | methods:{ |
| | | |
| | | } |
| | | } |
| | | </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> |
| | | <el-steps :active="stepIndex" finish-status="success" style="" align-center> |
| | | <el-step title="è¯ä¼°èå´" /> |
| | | <el-step title="æ°æ®æºæ£æ¥" /> |
| | | <el-step title="è±å
æ¡ç®" /> |
| | | <el-step title="èªå¨è¯ä¼°" /> |
| | | </el-steps> |
| | | |
| | | <el-card v-if="stepIndex == 0" shadow="never"> |
| | | <template #header> |
| | | <div><el-text tag="b" size="large">éæ©è¯ä¼°èå´</el-text></div> |
| | | <el-text size="small" type="info">å
æ¬åºå¿ãåºæ¯ç±»å以åæä»½</el-text> |
| | | </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> |
| | | <FYForm :form-info="evaConditon" :rules="evaConditionRules" :showButtons="false"> |
| | | <template #form-item="{ formObj }"> |
| | | <!-- åºå¿ --> |
| | | <FYOptionLocation |
| | | :allOption="false" |
| | | :level="3" |
| | | :checkStrictly="false" |
| | | v-model:value="formObj.locations" |
| | | ></FYOptionLocation> |
| | | <!-- åºæ¯ç±»å --> |
| | | <FYOptionScene |
| | | :allOption="false" |
| | | :type="2" |
| | | v-model:value="formObj.scenetype" |
| | | ></FYOptionScene> |
| | | <!-- æ¶é´ --> |
| | | <FYOptionTime |
| | | :initValue="true" |
| | | type="month" |
| | | v-model:value="formObj.time" |
| | | ></FYOptionTime> |
| | | </template> |
| | | </FYForm> |
| | | <template #footer> |
| | | <el-row justify="space-around"> |
| | | <el-button type="primary" size="default">ä¸ä¸æ¥</el-button> |
| | | </el-row> |
| | | </template> |
| | | </el-card> |
| | | <el-card v-if="stepIndex == 1" shadow="never"> Never2 </el-card> |
| | | <el-card v-if="stepIndex == 2" shadow="never"> Never3 </el-card> |
| | | <el-card v-if="stepIndex == 3" shadow="never"> Never4 </el-card> |
| | | </template> |
| | | |
| | | <script> |
| | | import dayjs from 'dayjs'; |
| | | |
| | | /** |
| | | * èªå¨è¯ä¼°æ¡ä»¶åè§æ§æ£æ¥ |
| | | */ |
| | | 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' } |
| | | } |
| | | ] |
| | | } |
| | | } |
| | | }, |
| | | props: {}, |
| | | emits: ['preCheck'], |
| | | data() { |
| | | return { |
| | | formSearch: { |
| | | _locations: {}, |
| | | scenetype: {}, |
| | | time: undefined |
| | | // æä½æ¥éª¤ä¸æ |
| | | stepIndex: 0, |
| | | // è¯ä¼°ä»»å¡èå´ |
| | | evaConditon: {}, |
| | | evaConditionRules: { |
| | | acountname: [ |
| | | { |
| | | required: true, |
| | | message: 'è´¦æ·åä¸è½ä¸ºç©º', |
| | | trigger: 'blur' |
| | | } |
| | | ] |
| | | } |
| | | } |
| | | }; |
| | | }, |
| | | methods: { |
| | | /** |
| | |
| | | * æ£æ¥æéèå´å
å项è¯ä¼°æ°æ®æºæ¯å¦å®æ´ |
| | | */ |
| | | preCheck() { |
| | | this.$emit('preCheck', this.formSearch) |
| | | }, |
| | | |
| | | /** |
| | | * å¿«é设置æ¡ä»¶ |
| | | */ |
| | | quickSet(set) { |
| | | this.formSearch._locations = set.locations |
| | | this.formSearch.scenetype = set.scenetype |
| | | |
| | | this.preCheck() |
| | | // this.$emit('preCheck', param) |
| | | } |
| | | } |
| | | } |
| | | }; |
| | | </script> |
¶Ô±ÈÐÂÎļþ |
| | |
| | | <template> |
| | | <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 { |
| | | 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: ['quickSet'], |
| | | methods: { |
| | | /** |
| | | * å¿«é设置æ¡ä»¶ |
| | | * @param {locations, scenetype} set |
| | | */ |
| | | quickSet(set) { |
| | | // this.formSearch.locations = set.locations |
| | | // this.formSearch.scenetype = set.scenetype |
| | | |
| | | this.$emit('quickSet', set) |
| | | } |
| | | } |
| | | } |
| | | </script> |
| | |
| | | :level="4" |
| | | v-model:value="formSearch._locations" |
| | | ></FYOptionLocation> |
| | | <FYOptionText label="å
³é®å" placeholder="è¾å
¥åç§°å
³é®å" v-model:value="formSearch.searchText"></FYOptionText> |
| | | <FYOptionText |
| | | label="å
³é®å" |
| | | placeholder="è¾å
¥åç§°å
³é®å" |
| | | v-model:value="formSearch.searchText" |
| | | ></FYOptionText> |
| | | <FYOptionScene |
| | | :allOption="true" |
| | | :type="1" |
| | |
| | | </template> |
| | | |
| | | <template #table-column> |
| | | <el-table-column |
| | | type="index" |
| | | fixed="left" |
| | | prop="userInfo.realname" |
| | | label="åç§°" |
| | | width="400" |
| | | > |
| | | <el-table-column type="index" fixed="left" prop="userInfo.realname" label="åç§°" width="400"> |
| | | <template #default="scope"> |
| | | <el-tooltip |
| | | effect="dark" |
| | |
| | | <el-table-column prop="userInfo.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="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"> |
| | | <el-table-column fixed="right" align="right" label="æä½" width="160"> |
| | | <template #header> |
| | | <el-button |
| | | icon="DocumentAdd" |
| | | size="default" |
| | | type="success" |
| | | @click="drawer = true" |
| | | <el-button icon="DocumentAdd" size="default" type="success" @click="drawer = true" |
| | | >æ°å¢ç¨æ·</el-button |
| | | > |
| | | </template> |
| | |
| | | @click="editRow(scope)" |
| | | >æ¥ç</el-button |
| | | > |
| | | <!-- <el-button |
| | | <el-button |
| | | :loading="scope.row.loading2" |
| | | :type="scope.row.extension1 != '0' ? 'danger' : 'primary'" |
| | | :type="scope.row.userInfo.isenable != '0' ? 'danger' : 'primary'" |
| | | size="small" |
| | | @click="itemActive(scope)" |
| | | >{{ scope.row.extension1 != '0' ? 'ä¸çº¿' : 'ä¸çº¿' }}</el-button |
| | | > --> |
| | | >{{ scope.row.userInfo.isenable != '0' ? 'ä¸çº¿' : 'ä¸çº¿' }}</el-button |
| | | > |
| | | </template> |
| | | </el-table-column> |
| | | </template> |
| | |
| | | |
| | | export default { |
| | | components: { |
| | | CompUserInfoAddDrawer, |
| | | CompUserInfoAddDrawer |
| | | }, |
| | | data() { |
| | | return { |
| | |
| | | _locations: {}, |
| | | searchText: '', |
| | | scensetype: {}, |
| | | online: {}, |
| | | online: {} |
| | | }, |
| | | drawer: false, |
| | | drawer: false |
| | | }; |
| | | }, |
| | | computed: { |
| | | ...mapStores(useLoadingStore), |
| | | ...mapStores(useLoadingStore) |
| | | }, |
| | | methods: { |
| | | onSearch(page, func) { |
| | | const f = this.formSearch; |
| | | const area = {}; |
| | | // è¡æ¿åºå |
| | | area.provinceCode = f._locations.pCode ? f._locations.pCode + '0000' : undefined |
| | | area.provinceCode = f._locations.pCode; |
| | | area.provinceName = f._locations.pName; |
| | | if (area.provinceCode == null) { |
| | | area.provinceCode = null; |
| | | area.provinceName = null; |
| | | } |
| | | area.cityCode = f._locations.cCode ? f._locations.cCode.substring(0, 3) + '100' : undefined |
| | | area.cityCode = f._locations.cCode; |
| | | area.cityName = f._locations.cName; |
| | | area.districtCode = f._locations.dCode; |
| | | area.districtName = f._locations.dName; |
| | |
| | | if (res) { |
| | | func({ |
| | | data: res.data, |
| | | total: res.head.totalCount, |
| | | total: res.head.totalCount |
| | | }); |
| | | } |
| | | }); |
| | | }, |
| | | editRow(scope) { |
| | | scope.row.loading1 = true; |
| | | this.loadingStore.loadingStatus.push(() => (scope.row.loading1 = false)); |
| | | this.$router.push(`userEdit/${scope.row.biGuid}`); |
| | | this.loadingStore.pushLoading(() => (scope.row.loading1 = false)); |
| | | this.$router.push(`userEdit/${scope.row.userInfo.guid}`); |
| | | }, |
| | | itemActive(scope) { |
| | | const rb = {}; |
| | | rb.guid = scope.row.guid; |
| | | rb.extension1 = scope.row.extension1 != '0' ? '0' : '1'; |
| | | const msg = scope.row.extension1 != '0' ? 'ä¸çº¿' : 'ä¸çº¿'; |
| | | const param = { |
| | | guid: scope.row.userInfo.guid, |
| | | isenable: !scope.row.userInfo.isenable |
| | | }; |
| | | const msg = scope.row.userInfo.isenable ? 'ä¸çº¿' : 'ä¸çº¿'; |
| | | useMessageBoxTip({ |
| | | confirmMsg: `确认${msg}è¯¥åºæ¯ï¼`, |
| | | confirmTitle: msg, |
| | | onConfirm: () => { |
| | | onConfirm: async () => { |
| | | scope.row.loading2 = true; |
| | | return userApi |
| | | .updateScene(rb) |
| | | .updateUserInfo(param) |
| | | .then((res) => { |
| | | if (res == 1) { |
| | | scope.row.extension1 = rb.extension1; |
| | | if (res.success) { |
| | | scope.row.userInfo.isenable = param.isenable; |
| | | } |
| | | }) |
| | | .finally(() => { |
| | | scope.row.loading2 = false; |
| | | }); |
| | | }, |
| | | } |
| | | }); |
| | | }, |
| | | tableRowClassName({ row }) { |
| | | return row.userInfo.isenable ? 'online-row' : 'offline-row'; |
| | | }, |
| | | }, |
| | | } |
| | | } |
| | | }; |
| | | </script> |
| | | <style></style> |
| | |
| | | } |
| | | }, |
| | | onDrawerCancel() { |
| | | this.onDrawerClose(() => { |
| | | this.drawer_ = false; |
| | | }); |
| | | // this.onDrawerClose(() => { |
| | | // this.drawer_ = false; |
| | | // }); |
| | | this.drawer_ = false; |
| | | }, |
| | | }, |
| | | }; |