| | |
| | | "docxtemplater": "^3.50.0", |
| | | "docxtemplater-image-module": "^3.1.0", |
| | | "docxtemplater-image-module-free": "^1.1.1", |
| | | "echarts": "^5.5.1", |
| | | "element-plus": "^2.8.3", |
| | | "exceljs": "^4.4.0", |
| | | "file-saver": "^2.0.5", |
| | |
| | | "jsbn": "~0.1.0", |
| | | "safer-buffer": "^2.1.0" |
| | | } |
| | | }, |
| | | "node_modules/echarts": { |
| | | "version": "5.5.1", |
| | | "resolved": "https://registry.npmmirror.com/echarts/-/echarts-5.5.1.tgz", |
| | | "integrity": "sha512-Fce8upazaAXUVUVsjgV6mBnGuqgO+JNDlcgF79Dksy4+wgGpQB2lmYoO4TSweFg/mZITdpGHomw/cNBJZj1icA==", |
| | | "license": "Apache-2.0", |
| | | "dependencies": { |
| | | "tslib": "2.3.0", |
| | | "zrender": "5.6.0" |
| | | } |
| | | }, |
| | | "node_modules/echarts/node_modules/tslib": { |
| | | "version": "2.3.0", |
| | | "resolved": "https://registry.npmmirror.com/tslib/-/tslib-2.3.0.tgz", |
| | | "integrity": "sha512-N82ooyxVNm6h1riLCoyS9e3fuJ3AMG2zIZs2Gd1ATcSFjSA23Q0fzjjZeh0jbJvWVDZ0cJT8yaNNaaXHzueNjg==", |
| | | "license": "0BSD" |
| | | }, |
| | | "node_modules/electron-to-chromium": { |
| | | "version": "1.4.284", |
| | |
| | | "engines": { |
| | | "node": ">= 10" |
| | | } |
| | | }, |
| | | "node_modules/zrender": { |
| | | "version": "5.6.0", |
| | | "resolved": "https://registry.npmmirror.com/zrender/-/zrender-5.6.0.tgz", |
| | | "integrity": "sha512-uzgraf4njmmHAbEUxMJ8Oxg+P3fT04O+9p7gY+wJRVxo8Ge+KmYv0WJev945EH4wFuc4OY2NLXz46FZrWS9xJg==", |
| | | "license": "BSD-3-Clause", |
| | | "dependencies": { |
| | | "tslib": "2.3.0" |
| | | } |
| | | }, |
| | | "node_modules/zrender/node_modules/tslib": { |
| | | "version": "2.3.0", |
| | | "resolved": "https://registry.npmmirror.com/tslib/-/tslib-2.3.0.tgz", |
| | | "integrity": "sha512-N82ooyxVNm6h1riLCoyS9e3fuJ3AMG2zIZs2Gd1ATcSFjSA23Q0fzjjZeh0jbJvWVDZ0cJT8yaNNaaXHzueNjg==", |
| | | "license": "0BSD" |
| | | } |
| | | }, |
| | | "dependencies": { |
| | |
| | | "requires": { |
| | | "jsbn": "~0.1.0", |
| | | "safer-buffer": "^2.1.0" |
| | | } |
| | | }, |
| | | "echarts": { |
| | | "version": "5.5.1", |
| | | "resolved": "https://registry.npmmirror.com/echarts/-/echarts-5.5.1.tgz", |
| | | "integrity": "sha512-Fce8upazaAXUVUVsjgV6mBnGuqgO+JNDlcgF79Dksy4+wgGpQB2lmYoO4TSweFg/mZITdpGHomw/cNBJZj1icA==", |
| | | "requires": { |
| | | "tslib": "2.3.0", |
| | | "zrender": "5.6.0" |
| | | }, |
| | | "dependencies": { |
| | | "tslib": { |
| | | "version": "2.3.0", |
| | | "resolved": "https://registry.npmmirror.com/tslib/-/tslib-2.3.0.tgz", |
| | | "integrity": "sha512-N82ooyxVNm6h1riLCoyS9e3fuJ3AMG2zIZs2Gd1ATcSFjSA23Q0fzjjZeh0jbJvWVDZ0cJT8yaNNaaXHzueNjg==" |
| | | } |
| | | } |
| | | }, |
| | | "electron-to-chromium": { |
| | |
| | | } |
| | | } |
| | | } |
| | | }, |
| | | "zrender": { |
| | | "version": "5.6.0", |
| | | "resolved": "https://registry.npmmirror.com/zrender/-/zrender-5.6.0.tgz", |
| | | "integrity": "sha512-uzgraf4njmmHAbEUxMJ8Oxg+P3fT04O+9p7gY+wJRVxo8Ge+KmYv0WJev945EH4wFuc4OY2NLXz46FZrWS9xJg==", |
| | | "requires": { |
| | | "tslib": "2.3.0" |
| | | }, |
| | | "dependencies": { |
| | | "tslib": { |
| | | "version": "2.3.0", |
| | | "resolved": "https://registry.npmmirror.com/tslib/-/tslib-2.3.0.tgz", |
| | | "integrity": "sha512-N82ooyxVNm6h1riLCoyS9e3fuJ3AMG2zIZs2Gd1ATcSFjSA23Q0fzjjZeh0jbJvWVDZ0cJT8yaNNaaXHzueNjg==" |
| | | } |
| | | } |
| | | } |
| | | } |
| | | } |
| | |
| | | "docxtemplater": "^3.50.0", |
| | | "docxtemplater-image-module": "^3.1.0", |
| | | "docxtemplater-image-module-free": "^1.1.1", |
| | | "echarts": "^5.5.1", |
| | | "element-plus": "^2.8.3", |
| | | "exceljs": "^4.4.0", |
| | | "file-saver": "^2.0.5", |
| | |
| | | |
| | | fetchProblemType({ cityCode, districtCode, sceneTypeId }) { |
| | | const params = `?taskTypeId=1&cityCode=${cityCode}&districtCode=${districtCode}&sceneTypeId=${sceneTypeId}`; |
| | | return $fysp.get(`problemtype/search${params}`).then((res) => res); |
| | | return $fysp.get(`problemtype/search${params}`).then((res) => res.data); |
| | | }, |
| | | |
| | | /** |
| | |
| | | let ip2_file = 'https://fyami.com.cn/'; |
| | | |
| | | if (debug) { |
| | | ip1 = 'http://192.168.0.138:9001/'; |
| | | ip1 = 'http://192.168.0.110:9001/'; |
| | | // ip1_file = 'http://192.168.0.138:8080/'; |
| | | // ip2 = 'http://192.168.0.138:8080/'; |
| | | // ip2_file = 'https://fyami.com.cn/'; |
| | |
| | | }, |
| | | { |
| | | icon: 'DataAnalysis', |
| | | name: 'åºç¡æ°æ®äº§å', |
| | | children: [ |
| | | { |
| | | path: '/fysp/data-product/ProdScenseInfo', |
| | | icon: 'Document', |
| | | name: 'åºæ¯æ¸
å', |
| | | }, |
| | | { |
| | | path: '/fysp/data-product/ProdMonitorTaskInfo', |
| | | icon: 'Document', |
| | | name: 'ç管æ¸
å', |
| | | }, |
| | | { |
| | | path: '/fysp/data-product/ProdTreatmentDeviceInfo', |
| | | icon: 'Document', |
| | | name: '鲿²»è®¾å¤æ¸
å', |
| | | }, |
| | | ] |
| | | }, |
| | | { |
| | | icon: 'DataAnalysis', |
| | | name: 'ä¸é´æ°æ®äº§å', |
| | | children: [ |
| | | { |
| | |
| | | value: 'å
¨é¨', |
| | | }, |
| | | { |
| | | label: 'ææ¡©', |
| | | value: 'ææ¡©', |
| | | }, |
| | | { |
| | | label: 'åºç¡', |
| | | value: 'åºç¡', |
| | | }, |
| | |
| | | value: '室夿»ä½', |
| | | }, |
| | | { |
| | | label: 'å³å°å®å·¥', |
| | | value: 'å³å°å®å·¥', |
| | | }, |
| | | { |
| | | label: 'ç«£å·¥éªæ¶', |
| | | value: 'ç«£å·¥éªæ¶', |
| | | }, |
| | | { |
| | | label: 'è£
饰è£
ä¿®', |
| | | value: 'è£
饰è£
ä¿®', |
| | | }, |
| | |
| | | import isSameOrAfter from 'dayjs/plugin/isSameOrAfter'; |
| | | import isSameOrBefore from 'dayjs/plugin/isSameOrBefore'; |
| | | |
| | | // echarts |
| | | import * as echarts from 'echarts' |
| | | |
| | | dayjs.extend(isSameOrAfter); |
| | | dayjs.extend(isSameOrBefore); |
| | | |
| | | const app = createApp(App); |
| | | |
| | | app.config.globalProperties.$fm = timeUtil; |
| | | app.config.globalProperties.$echarts = echarts |
| | | |
| | | for (const [key, component] of Object.entries(ElementPlusIconsVue)) { |
| | | app.component(key, component); |
| | |
| | | path: '/fysp/support', |
| | | component: () => import('@/views/fysp/support/JingAnSupport.vue'), |
| | | }, |
| | | { |
| | | // åºç¡äº§å-åºæ¯æ¸
å |
| | | name: 'ProdScenseInfo', |
| | | path: '/fysp/data-product/ProdScenseInfo', |
| | | component: () => import('@/views/fysp/data-product/base-data-product/ProdScenseInfo.vue') |
| | | }, |
| | | { |
| | | // åºç¡äº§å-ç管æ¸
å |
| | | name: 'ProdMonitorTaskInfo', |
| | | path: '/fysp/data-product/ProdMonitorTaskInfo', |
| | | component: () => import('@/views/fysp/data-product/base-data-product/ProdMonitorTaskInfo.vue') |
| | | }, |
| | | { |
| | | // åºç¡äº§å-鲿²»è®¾å¤æ¸
å |
| | | name: 'ProdTreatmentDeviceInfo', |
| | | path: '/fysp/data-product/ProdTreatmentDeviceInfo', |
| | | component: () => import('@/views/fysp/data-product/base-data-product/ProdTreatmentDeviceInfo.vue') |
| | | }, |
| | | |
| | | /**********************************é£ç¾½ç¯å¢***********************************************/ |
| | | { |
¶Ô±ÈÐÂÎļþ |
| | |
| | | // éå½çè·åobjä¸çprop屿§ è§£å³ææ¶éè¦åval.obj.propçæ
åµ |
| | | function getPropValueLoop(obj, prop) { |
| | | if (typeof prop !== 'string') { |
| | | return obj; |
| | | } |
| | | const props = prop.split('.'); |
| | | let result = obj; |
| | | props.forEach((item) => { |
| | | result = result[item]; |
| | | }); |
| | | return result; |
| | | } |
| | | function getCount(array, element) { |
| | | let count = 0; |
| | | array.forEach((e) => { |
| | | if (e == element) { |
| | | count++; |
| | | } |
| | | }); |
| | | return count; |
| | | } |
| | | export default { |
| | | /** å°chartå¾è¡¨è½¬å为å¾çurl |
| | | * @param chartï¼ chartå¾è¡¨çå®ä¾ |
| | | * */ |
| | | chartToImageUrl(chart) { |
| | | const dataURL = chart.getDataURL({ |
| | | pixelRatio: 5, // æé«å¾çè´¨é |
| | | backgroundColor: '#FFFFFF', // è®¾ç½®èæ¯é¢è² |
| | | excludeComponents: ['toolbox'], // æé¤å·¥å
·ç®±ç»ä»¶ |
| | | type: 'png' // è¾åºå¾çç±»å为PNG |
| | | }); |
| | | return dataURL; |
| | | }, |
| | | // å±ç¤º data æ°ç»ä¸å¯¹è±¡ç prop 屿§ç饼å¾, title æ¯é¥¼å¾çæ é¢ |
| | | getPieChartByDataAndProp(data, prop, label) { |
| | | let chartData = []; |
| | | function hasThisName(name) { |
| | | for (let index = 0; index < chartData.length; index++) { |
| | | const element = chartData[index]; |
| | | if (element.name === name) { |
| | | return true; |
| | | } |
| | | } |
| | | return false; |
| | | } |
| | | |
| | | data.map((item) => { |
| | | const name = getPropValueLoop(item, prop); |
| | | if (hasThisName(name)) { |
| | | chartData.map((item) => { |
| | | if (item.name === name) { |
| | | item.value++; |
| | | } |
| | | }); |
| | | } else { |
| | | chartData.push({ |
| | | name: name, |
| | | value: 1 |
| | | }); |
| | | } |
| | | }); |
| | | |
| | | return { |
| | | title: { |
| | | text: label, |
| | | left: 'center' |
| | | }, |
| | | tooltip: { |
| | | trigger: 'item' |
| | | }, |
| | | legend: { |
| | | orient: 'vertical', |
| | | left: 'left' |
| | | }, |
| | | series: [ |
| | | { |
| | | type: 'pie', |
| | | radius: '50%', |
| | | data: chartData, |
| | | emphasis: { |
| | | itemStyle: { |
| | | shadowBlur: 10, |
| | | shadowOffsetX: 0, |
| | | shadowColor: 'rgba(0, 0, 0, 0.5)' |
| | | } |
| | | } |
| | | } |
| | | ] |
| | | }; |
| | | }, |
| | | // å±ç¤º data æ°ç»ä¸å¯¹è±¡ç prop 屿§çç´æ¹å¾, title æ¯ç´æ¹å¾çæ é¢ |
| | | getBarChartByDataAndProp(data, prop, title) { |
| | | let series = data.map((item) => getPropValueLoop(item, prop)); |
| | | const option = { |
| | | title: { |
| | | text: title //设置æ é¢ |
| | | }, |
| | | xAxis: { |
| | | type: 'category', |
| | | data: Array.from(new Set(series)), |
| | | axisLabel: { |
| | | rotate: 45, // æè½¬æ ç¾ï¼é¿å
éå |
| | | // æè
|
| | | interval: 0 // æ¾ç¤ºæææ ç¾ï¼å¯è½å¯¼è´éå ï¼æ ¹æ®éæ±è°æ´ |
| | | } |
| | | }, |
| | | yAxis: { |
| | | type: 'value' |
| | | }, |
| | | series: [ |
| | | { |
| | | data: Array.from(new Set(series)).map((item) => |
| | | getCount(series, item) |
| | | ), |
| | | type: 'bar', |
| | | smooth: true |
| | | } |
| | | ] |
| | | }; |
| | | return option; |
| | | } |
| | | }; |
| | |
| | | mounted() {}, |
| | | methods: { |
| | | pictureValidate() { |
| | | if (this.changeType == 1 && this.fileList.length < 1) { |
| | | if (this.fileList.length < 1) { |
| | | ElMessage({ |
| | | message: 'è³å°ä¸ä¼ ä¸å¼ å¾ç', |
| | | type: 'error' |
| | |
| | | districtCode: this.topTask.districtcode |
| | | }; |
| | | problemApi.fetchProblemType(data).then((res) => { |
| | | this.problemTypeList = res.data; |
| | | this.problemTypeList = res; |
| | | |
| | | if (this.type == 1) { |
| | | let currProName = String(this.problem.problemname); |
| | |
| | | }); |
| | | if (this.type == 1) { |
| | | let deleteImgCopy = this.deleteImg; |
| | | fileUtil.getImageFiles(picUrls, function (files) { |
| | | fileUtil.getImageFiles(picUrls, (files) => { |
| | | data.append('deleteImg', deleteImgCopy); |
| | | deepCopyPro.advise = deepCopyPro.advice; |
| | | delete deepCopyPro['advice']; |
| | |
| | | }); |
| | | } else { |
| | | const deepCopySubTask = useCloned(this.subtask).cloned.value; |
| | | const that = this; |
| | | fileUtil.getImageFiles(picUrls, function (files) { |
| | | fileUtil.getImageFiles(picUrls, (files) => { |
| | | deepCopyPro.insGuid = deepCopySubTask.insGuid; |
| | | delete deepCopyPro['description']; |
| | | deepCopyPro.proName = deepCopyPro.problemname; |
| | | delete deepCopyPro['problemname']; |
| | | deepCopyPro.ptGuid = that.findProTypeByGuid( |
| | | that.currProTypeGuid |
| | | deepCopyPro.ptGuid = this.findProTypeByGuid( |
| | | this.currProTypeGuid |
| | | ).guid; |
| | | deepCopyPro.locationId = deepCopyPro.locationid; |
| | | delete deepCopyPro['locationid']; |
| | |
| | | > |
| | | </el-descriptions> |
| | | |
| | | <el-scrollbar> |
| | | <el-scrollbar style="width: 70%;"> |
| | | <el-descriptions |
| | | title=" " |
| | | :column="2" |
| | |
| | | </el-col> |
| | | <el-col :span="12"> |
| | | <el-row justify="end" class="btn-group"> |
| | | <el-button type="danger" size="small" @click="deletePro" disabled |
| | | <el-button type="danger" size="small" @click="deletePro" :disabled="true" |
| | | >å é¤</el-button |
| | | > |
| | | <!-- <el-button |
| | |
| | | width: 240px; |
| | | height: 250px; |
| | | border-radius: 4px; |
| | | margin-bottom: 6px; |
| | | } |
| | | |
| | | .d-index { |
| | |
| | | .d-extra { |
| | | } |
| | | |
| | | .descriptions-label-1 { |
| | | color: whitesmoke; |
| | | background: var(--el-color-danger-light-3); |
| | | :deep(.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); |
| | | /* color: whitesmoke; */ |
| | | /* background-color: var(--el-color-success-light-3); */ |
| | | } |
| | | </style> |
| | | |
¶Ô±ÈÐÂÎļþ |
| | |
| | | <template> |
| | | 1 |
| | | </template> |
| | | <script></script> |
¶Ô±ÈÐÂÎļþ |
| | |
| | | <template> |
| | | 1 |
| | | </template> |
| | | <script></script> |
¶Ô±ÈÐÂÎļþ |
| | |
| | | <template> |
| | | 1 |
| | | </template> |
| | | <script></script> |
| | |
| | | v-model:value="formSearch.scenetype" |
| | | ></FYOptionScene> |
| | | <!-- æ¶é´ --> |
| | | <FYOptionTime :initValue="false" type="month" v-model:value="formSearch.time"></FYOptionTime> |
| | | <FYOptionTime |
| | | :initValue="false" |
| | | type="month" |
| | | v-model:value="formSearch.time" |
| | | ></FYOptionTime> |
| | | </template> |
| | | <template #buttons> |
| | | <!-- <el-button icon="Download" size="default" type="success" @click="download" |
| | |
| | | </template> |
| | | |
| | | <template #table-column="{ size }"> |
| | | <el-table-column fixed="left" sortable="custom" prop="sceneIndex" label="ç¼å·" width="80"> |
| | | <el-table-column |
| | | fixed="left" |
| | | sortable="custom" |
| | | prop="sceneIndex" |
| | | label="ç¼å·" |
| | | width="80" |
| | | > |
| | | </el-table-column> |
| | | <el-table-column prop="sceneName" :show-overflow-tooltip="true" label="åç§°" width="300"> |
| | | <el-table-column |
| | | prop="sceneName" |
| | | :show-overflow-tooltip="true" |
| | | label="åç§°" |
| | | width="300" |
| | | > |
| | | </el-table-column> |
| | | <el-table-column |
| | | prop="subTaskTime" |
| | |
| | | sortable="custom" |
| | | :formatter="timeFormat" |
| | | /> |
| | | <el-table-column prop="evaluation.resultscorebef" label="å¾å" width="90" sortable="custom" /> |
| | | <el-table-column prop="evaluation.resultscorebef" label="ç¯ä¿¡ç " width="100"> |
| | | <el-table-column |
| | | prop="evaluation.resultscorebef" |
| | | label="å¾å" |
| | | width="90" |
| | | sortable="custom" |
| | | /> |
| | | <el-table-column |
| | | prop="evaluation.resultscorebef" |
| | | label="ç¯ä¿¡ç " |
| | | width="100" |
| | | > |
| | | <template #default="{ row }"> |
| | | <span :style="`color: ${toCode(row).color};`">{{ toCode(row).name }}</span> |
| | | <span :style="`color: ${toCode(row).color};`">{{ |
| | | toCode(row).name |
| | | }}</span> |
| | | </template> |
| | | </el-table-column> |
| | | |
| | |
| | | :loading="updateLoading" |
| | | >ä¸ä¼ </el-button |
| | | > |
| | | <el-button v-show="scoreShow" size="small" type="error" @click="scoreShow = false" |
| | | <el-button |
| | | v-show="scoreShow" |
| | | size="small" |
| | | type="error" |
| | | @click="scoreShow = false" |
| | | >åæ¶</el-button |
| | | > |
| | | </template> |
| | | <template #default="{ row }"> |
| | | <el-button type="primary" size="small" @click="editRow(row)">æ¥ç</el-button> |
| | | <el-button type="primary" size="small" @click="editRow(row)" |
| | | >æ¥ç</el-button |
| | | > |
| | | </template> |
| | | </el-table-column> |
| | | </template> |
| | |
| | | |
| | | export default { |
| | | setup() { |
| | | const { cellClick, cellClassName, handlePaste, setTableData, addRefreshEvent, tableData } = |
| | | useTablePaste({ |
| | | score1: 8, |
| | | score2: 9 |
| | | }); |
| | | return { cellClick, cellClassName, handlePaste, setTableData, addRefreshEvent, tableData }; |
| | | const { |
| | | cellClick, |
| | | cellClassName, |
| | | handlePaste, |
| | | setTableData, |
| | | addRefreshEvent, |
| | | tableData |
| | | } = useTablePaste({ |
| | | score1: 8, |
| | | score2: 9 |
| | | }); |
| | | return { |
| | | cellClick, |
| | | cellClassName, |
| | | handlePaste, |
| | | setTableData, |
| | | addRefreshEvent, |
| | | tableData |
| | | }; |
| | | }, |
| | | components: { CompReport }, |
| | | data() { |
| | |
| | | if (res.data.length > 0) { |
| | | this.evaluationRule = res.data[0]; |
| | | // è·åå
·ä½åè§å |
| | | return evaluateApi.getSubRules(this.evaluationRule.guid).then((res) => { |
| | | this.evaluationSubRule = res.data; |
| | | // æ¥æ¾å¯å¯¼å
¥å¾åçè§åid |
| | | for (const key in this.ruleName) { |
| | | const value = this.ruleName[key]; |
| | | const subrule = this.evaluationSubRule.find((v) => { |
| | | return v.itemname == value.name; |
| | | }); |
| | | value.id = subrule.guid; |
| | | } |
| | | }); |
| | | return evaluateApi |
| | | .getSubRules(this.evaluationRule.guid) |
| | | .then((res) => { |
| | | this.evaluationSubRule = res.data; |
| | | // æ¥æ¾å¯å¯¼å
¥å¾åçè§åid |
| | | for (const key in this.ruleName) { |
| | | const value = this.ruleName[key]; |
| | | const subrule = this.evaluationSubRule.find((v) => { |
| | | return v.itemname == value.name; |
| | | }); |
| | | if (subrule) { |
| | | value.id = subrule.guid; |
| | | } |
| | | } |
| | | }); |
| | | } |
| | | }); |
| | | }, |
¶Ô±ÈÐÂÎļþ |
| | |
| | | <!-- æ
æç«ä¸å±ä¿¡æ¯ç¼è¾ --> |
| | | <template> |
| | | <BaseSceneInfo ref="baseSceneInfo" :scene="scene" :formInfo="formInfo" :scene-type="sceneType"> |
| | | <template #form-items> |
| | | <el-form |
| | | v-show="showStyle == 'form'" |
| | | :inline="false" |
| | | :model="formObj" |
| | | ref="formRef" |
| | | :rules="rules" |
| | | label-position="right" |
| | | label-width="150px" |
| | | > |
| | | <!-- <el-form-item label="è¿è¥ç¶æ" prop="mpStatus"> |
| | | <el-select v-model="formObj.mpStatus" placeholder="è¿è¥ç¶æ"> |
| | | <el-option |
| | | v-for="s in status" |
| | | :key="s.value" |
| | | :label="s.label" |
| | | :value="s.value" |
| | | /> |
| | | </el-select> |
| | | </el-form-item> --> |
| | | <el-form-item label="å å°é¢ç§¯" prop="mpFloorSpace"> |
| | | <el-input |
| | | clearable |
| | | v-model="formObj.mpFloorSpace" |
| | | placeholder="å å°é¢ç§¯" |
| | | > |
| | | <template #append>ã¡</template> |
| | | </el-input> |
| | | </el-form-item> |
| | | <el-form-item label="è§åé¢ç§¯" prop="mpPlanningArea"> |
| | | <el-input |
| | | clearable |
| | | v-model="formObj.mpPlanningArea" |
| | | placeholder="è§åé¢ç§¯" |
| | | > |
| | | <template #append>ã¡</template> |
| | | </el-input> |
| | | </el-form-item> |
| | | <el-form-item label="ä¸ä¸»åä½" prop="mpEmployerUnit"> |
| | | <el-input |
| | | clearable |
| | | v-model="formObj.mpEmployerUnit" |
| | | placeholder="ä¸ä¸»åä½" |
| | | /> |
| | | </el-form-item> |
| | | <el-form-item label="ä¸ä¸»åä½è系人" prop="mpEmployerContacts"> |
| | | <el-input |
| | | clearable |
| | | v-model="formObj.mpEmployerContacts" |
| | | placeholder="ä¸ä¸»åä½è系人" |
| | | /> |
| | | </el-form-item> |
| | | <el-form-item |
| | | label="ä¸ä¸»åä½èç³»çµè¯" |
| | | prop="mpEmployerContactsTel" |
| | | class="input-with-select" |
| | | > |
| | | <el-input |
| | | clearable |
| | | type="tel" |
| | | v-model="formObj.mpEmployerContactsTel" |
| | | placeholder="ä¸ä¸»åä½èç³»çµè¯" |
| | | > |
| | | <template #prepend> |
| | | <el-icon><Iphone /></el-icon> |
| | | </template> |
| | | </el-input> |
| | | </el-form-item> |
| | | <el-form-item label="æ¯å¦ä¸ºç»¿è²ç¯ä¿ç«å" prop="mpGreenPlant"> |
| | | <el-select |
| | | v-model="formObj.mpGreenPlant" |
| | | placeholder="æ¯å¦ä¸ºç»¿è²ç¯ä¿ç«å" |
| | | > |
| | | <el-option |
| | | v-for="s in [ |
| | | { value: false, label: 'å¦' }, |
| | | { value: true, label: 'æ¯' } |
| | | ]" |
| | | :key="s.value" |
| | | :label="s.label" |
| | | :value="s.value" |
| | | /> |
| | | </el-select> |
| | | </el-form-item> |
| | | <el-form-item label="æ¯å¦ä¸ºææåºç«" prop="mpCivillyPlant"> |
| | | <el-select |
| | | v-model="formObj.mpCivillyPlant" |
| | | placeholder="æ¯å¦ä¸ºææåºç«" |
| | | > |
| | | <el-option |
| | | v-for="s in [ |
| | | { value: false, label: 'å¦' }, |
| | | { value: true, label: 'æ¯' } |
| | | ]" |
| | | :key="s.value" |
| | | :label="s.label" |
| | | :value="s.value" |
| | | /> |
| | | </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> |
| | | </template> |
| | | <template #description-items> |
| | | <el-descriptions |
| | | v-show="showStyle == 'descriptions'" |
| | | :column="2" |
| | | :size="fontSize" |
| | | direction="horizontal" |
| | | border |
| | | > |
| | | <template #title> |
| | | <el-text tag="h1">{{ title }}</el-text> |
| | | </template> |
| | | <template #extra> |
| | | <el-button |
| | | :size="fontSize" |
| | | type="primary" |
| | | @click="onSubmit" |
| | | :loading="loading" |
| | | >æäº¤</el-button |
| | | > |
| | | <el-button |
| | | :size="fontSize" |
| | | :disabled="!edit && !ignoreEdit" |
| | | @click="onReset" |
| | | >éç½®</el-button |
| | | > |
| | | </template> |
| | | <el-descriptions-item label="å å°é¢ç§¯" |
| | | ><el-input |
| | | :size="fontSize" |
| | | clearable |
| | | v-model="formObj.mpFloorSpace" |
| | | placeholder="å å°é¢ç§¯" |
| | | > |
| | | <template #append>ã¡</template> |
| | | </el-input></el-descriptions-item |
| | | > |
| | | <el-descriptions-item label="è§åé¢ç§¯" |
| | | ><el-input |
| | | :size="fontSize" |
| | | clearable |
| | | v-model="formObj.mpPlanningArea" |
| | | placeholder="è§åé¢ç§¯" |
| | | > |
| | | <template #append>ã¡</template> |
| | | </el-input></el-descriptions-item |
| | | > |
| | | <el-descriptions-item label="ä¸ä¸»åä½"> |
| | | <el-input |
| | | clearable |
| | | v-model="formObj.mpEmployerUnit" |
| | | placeholder="ä¸ä¸»åä½" |
| | | /> |
| | | </el-descriptions-item> |
| | | <el-descriptions-item label="ä¸ä¸»åä½è系人"> |
| | | <el-input |
| | | clearable |
| | | v-model="formObj.mpEmployerContacts" |
| | | placeholder="ä¸ä¸»åä½è系人" |
| | | /> |
| | | </el-descriptions-item> |
| | | <el-descriptions-item |
| | | label="ä¸ä¸»åä½èç³»çµè¯" |
| | | prop="mpEmployerContactsTel" |
| | | class="input-with-select" |
| | | :span="2" |
| | | > |
| | | <el-input |
| | | clearable |
| | | type="tel" |
| | | v-model="formObj.mpEmployerContactsTel" |
| | | placeholder="ä¸ä¸»åä½èç³»çµè¯" |
| | | > |
| | | <template #prepend> |
| | | <el-icon><Iphone /></el-icon> |
| | | </template> |
| | | </el-input> |
| | | </el-descriptions-item> |
| | | |
| | | <el-descriptions-item label="æ¯å¦ä¸ºç»¿è²ç¯ä¿ç«å"> |
| | | <el-select |
| | | v-model="formObj.mpGreenPlant" |
| | | placeholder="æ¯å¦ä¸ºç»¿è²ç¯ä¿ç«å" |
| | | > |
| | | <el-option |
| | | v-for="s in [ |
| | | { value: false, label: 'å¦' }, |
| | | { value: true, label: 'æ¯' } |
| | | ]" |
| | | :key="s.value" |
| | | :label="s.label" |
| | | :value="s.value" |
| | | /> |
| | | </el-select> |
| | | </el-descriptions-item> |
| | | <el-descriptions-item label="æ¯å¦ä¸ºææåºç«"> |
| | | <el-select |
| | | v-model="formObj.mpCivillyPlant" |
| | | placeholder="æ¯å¦ä¸ºææåºç«" |
| | | > |
| | | <el-option |
| | | v-for="s in [ |
| | | { value: false, label: 'å¦' }, |
| | | { value: true, label: 'æ¯' } |
| | | ]" |
| | | :key="s.value" |
| | | :label="s.label" |
| | | :value="s.value" |
| | | /> |
| | | </el-select> |
| | | </el-descriptions-item> |
| | | <el-descriptions-item label="æ½å·¥å°å" span="2" |
| | | ><el-input |
| | | clearable |
| | | v-model="sceneObj.location" |
| | | placeholder="æ½å·¥å°å" |
| | | :size="fontSize" |
| | | /></el-descriptions-item> |
| | | <el-descriptions-item label="项ç®è´è´£äºº" |
| | | ><el-input |
| | | :size="fontSize" |
| | | clearable |
| | | v-model="sceneObj.contacts" |
| | | placeholder="项ç®è´è´£äºº" |
| | | /></el-descriptions-item> |
| | | <el-descriptions-item label="项ç®è´è´£äººçµè¯" |
| | | ><el-input |
| | | :size="fontSize" |
| | | clearable |
| | | type="tel" |
| | | v-model="sceneObj.contactst" |
| | | placeholder="项ç®è´è´£äººçµè¯" |
| | | > |
| | | <template #prepend> |
| | | <el-icon><Iphone /></el-icon> |
| | | </template> </el-input |
| | | ></el-descriptions-item> |
| | | </el-descriptions> |
| | | </template> |
| | | </BaseSceneInfo> |
| | | </template> |
| | | <script setup> |
| | | import { reactive, ref, watch, computed } from 'vue'; |
| | | import { useFormConfirm } from '@/composables/formConfirm'; |
| | | import BaseSceneInfo from './BaseSceneInfo.vue'; |
| | | const props = defineProps({ |
| | | scene: Object, |
| | | //å·¥å°é¢å¤ä¿¡æ¯ |
| | | formInfo: Object, |
| | | //åºæ¯ç±»åï¼å·¥å° |
| | | sceneType: { |
| | | type: Number, |
| | | default: 1 |
| | | }, |
| | | // å±ç¤ºæ ·å¼ formï¼è¡¨åï¼descriptionsï¼æè¿°å表 |
| | | showStyle: { |
| | | type: String, |
| | | default: 'descriptions' |
| | | // default:'form' |
| | | }, |
| | | title: String |
| | | }); |
| | | const fontSize = ref('small'); |
| | | const emit = defineEmits([ |
| | | 'onSubmit', |
| | | 'onCancel', |
| | | 'update:scene', |
| | | 'update:formInfo' |
| | | ]); |
| | | const sceneObj = ref({}); |
| | | const { formObj, formRef, edit, onSubmit, onReset } = useFormConfirm({ |
| | | submit: { |
| | | do: submit |
| | | }, |
| | | cancel: { |
| | | do: cancel |
| | | } |
| | | }); |
| | | const ignoreEdit = computed(() => props.showStyle == 'descriptions'); |
| | | |
| | | const loading = ref(false); |
| | | const status = reactive([]); |
| | | const rules = reactive({}); |
| | | |
| | | const baseSceneInfo = ref(null); |
| | | function submit() { |
| | | return baseSceneInfo.value.submit() |
| | | } |
| | | |
| | | function cancel() { |
| | | emit('onCancel'); |
| | | } |
| | | |
| | | watch( |
| | | () => props.formInfo, |
| | | (nValue) => { |
| | | if (nValue) { |
| | | formObj.value = nValue; |
| | | } |
| | | }, |
| | | { deep: false, immediate: true } |
| | | ); |
| | | |
| | | watch( |
| | | () => props.scene, |
| | | (nValue) => { |
| | | if (nValue) { |
| | | sceneObj.value = nValue; |
| | | } |
| | | }, |
| | | { deep: false, immediate: true } |
| | | ); |
| | | </script> |
| | | |
| | | <style> |
| | | /* .input-with-select .el-input-group__prepend { |
| | | background-color: var(--el-fill-color-blank); |
| | | } */ |
| | | .sub-title { |
| | | font-size: var(--el-font-size-large); |
| | | margin-bottom: 20px; |
| | | margin-left: 20px; |
| | | } |
| | | </style> |
¶Ô±ÈÐÂÎļþ |
| | |
| | | <!-- ç 头ä¸å±ä¿¡æ¯ç¼è¾ --> |
| | | <template> |
| | | <BaseSceneInfo ref="baseSceneInfo" :scene="scene" :formInfo="formInfo" :scene-type="sceneType"> |
| | | <template #form-items> |
| | | <el-form |
| | | v-show="showStyle == 'form'" |
| | | :inline="false" |
| | | :model="formObj" |
| | | ref="formRef" |
| | | :rules="rules" |
| | | label-position="right" |
| | | label-width="150px" |
| | | > |
| | | <el-form-item label="ç±»å" prop="wProjectType"> |
| | | <el-input |
| | | clearable |
| | | v-model="formObj.wProjectType" |
| | | placeholder="ç±»å" |
| | | /> |
| | | </el-form-item> |
| | | <!-- <el-form-item label="è¿è¥ç¶æ" prop="wStatus"> |
| | | <el-select v-model="formObj.wStatus" placeholder="è¿è¥ç¶æ"> |
| | | <el-option |
| | | v-for="s in status" |
| | | :key="s.value" |
| | | :label="s.label" |
| | | :value="s.value" |
| | | /> |
| | | </el-select> |
| | | </el-form-item> --> |
| | | <el-form-item label="ä¸ä¸»åä½" prop="wEmployerUnit"> |
| | | <el-input |
| | | clearable |
| | | v-model="formObj.wEmployerUnit" |
| | | placeholder="ä¸ä¸»åä½" |
| | | /> |
| | | </el-form-item> |
| | | <el-form-item label="ä¸ä¸»åä½è系人" prop="wEmployerContacts"> |
| | | <el-input |
| | | clearable |
| | | v-model="formObj.wEmployerContacts" |
| | | placeholder="ä¸ä¸»åä½è系人" |
| | | /> |
| | | </el-form-item> |
| | | <el-form-item |
| | | label="ä¸ä¸»åä½èç³»çµè¯" |
| | | prop="wEmployerContactsTel" |
| | | class="input-with-select" |
| | | > |
| | | <el-input |
| | | clearable |
| | | type="tel" |
| | | v-model="formObj.wEmployerContactsTel" |
| | | placeholder="ä¸ä¸»åä½èç³»çµè¯" |
| | | > |
| | | <template #prepend> |
| | | <el-icon><Iphone /></el-icon> |
| | | </template> |
| | | </el-input> |
| | | </el-form-item> |
| | | <el-form-item label="ç§èµåä½" prop="wRentUnit"> |
| | | <el-input |
| | | clearable |
| | | v-model="formObj.wRentUnit" |
| | | placeholder="ç§èµåä½" |
| | | /> |
| | | </el-form-item> |
| | | <el-form-item label="ç§èµåä½è系人" prop="wRentContacts"> |
| | | <el-input |
| | | clearable |
| | | v-model="formObj.wRentContacts" |
| | | placeholder="ç§èµåä½è系人" |
| | | /> |
| | | </el-form-item> |
| | | <el-form-item label="ç§èµåä½è系人çµè¯" prop="wRentContactsTel"> |
| | | <el-input |
| | | clearable |
| | | type="tel" |
| | | v-model="formObj.wRentContactsTel" |
| | | placeholder="ç§èµåä½è系人çµè¯" |
| | | > |
| | | <template #prepend> |
| | | <el-icon><Iphone /></el-icon> |
| | | </template> |
| | | </el-input> |
| | | </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> |
| | | <template #description-items> |
| | | <el-descriptions |
| | | v-show="showStyle == 'descriptions'" |
| | | :column="2" |
| | | :size="fontSize" |
| | | direction="horizontal" |
| | | border |
| | | > |
| | | <template #title> |
| | | <el-text tag="h1">{{ title }}</el-text> |
| | | </template> |
| | | <template #extra> |
| | | <el-button |
| | | :disabled="!edit && !ignoreEdit" |
| | | :size="fontSize" |
| | | type="primary" |
| | | @click="onSubmit" |
| | | :loading="loading" |
| | | >æäº¤</el-button |
| | | > |
| | | <el-button |
| | | :size="fontSize" |
| | | :disabled="!edit && !ignoreEdit" |
| | | @click="onReset" |
| | | >éç½®</el-button |
| | | > |
| | | </template> |
| | | <el-descriptions-item label="ç±»å" :span="2" |
| | | ><el-input |
| | | :size="fontSize" |
| | | clearable |
| | | v-model="formObj.wProjectType" |
| | | placeholder="ç±»å" |
| | | /></el-descriptions-item> |
| | | <el-descriptions-item label="å å°é¢ç§¯" |
| | | ><el-input |
| | | :size="fontSize" |
| | | clearable |
| | | v-model="formObj.wFloorSpace" |
| | | placeholder="å å°é¢ç§¯" |
| | | > |
| | | <template #append>ã¡</template> |
| | | </el-input></el-descriptions-item |
| | | > |
| | | <el-descriptions-item label="è§åé¢ç§¯" |
| | | ><el-input |
| | | :size="fontSize" |
| | | clearable |
| | | v-model="formObj.wPlanningArea" |
| | | placeholder="è§åé¢ç§¯" |
| | | > |
| | | <template #append>ã¡</template> |
| | | </el-input></el-descriptions-item |
| | | > |
| | | <el-descriptions-item label="ä¸ä¸»åä½"> |
| | | <el-input |
| | | clearable |
| | | v-model="formObj.wEmployerUnit" |
| | | placeholder="ä¸ä¸»åä½" |
| | | /> |
| | | </el-descriptions-item> |
| | | <el-descriptions-item label="ä¸ä¸»åä½è系人"> |
| | | <el-input |
| | | clearable |
| | | v-model="formObj.wEmployerContacts" |
| | | placeholder="ä¸ä¸»åä½è系人" |
| | | /> |
| | | </el-descriptions-item> |
| | | <el-descriptions-item |
| | | label="ä¸ä¸»åä½èç³»çµè¯" |
| | | prop="mpEmployerContactsTel" |
| | | class="input-with-select" |
| | | :span="2" |
| | | > |
| | | <el-input |
| | | clearable |
| | | type="tel" |
| | | v-model="formObj.wEmployerContactsTel" |
| | | placeholder="ä¸ä¸»åä½èç³»çµè¯" |
| | | > |
| | | <template #prepend> |
| | | <el-icon><Iphone /></el-icon> |
| | | </template> |
| | | </el-input> |
| | | </el-descriptions-item> |
| | | <el-descriptions-item label="æ½å·¥å°å" span="2" |
| | | ><el-input |
| | | clearable |
| | | v-model="sceneObj.location" |
| | | placeholder="æ½å·¥å°å" |
| | | :size="fontSize" |
| | | /></el-descriptions-item> |
| | | <el-descriptions-item label="项ç®è´è´£äºº" |
| | | ><el-input |
| | | :size="fontSize" |
| | | clearable |
| | | v-model="sceneObj.contacts" |
| | | placeholder="项ç®è´è´£äºº" |
| | | /></el-descriptions-item> |
| | | <el-descriptions-item label="项ç®è´è´£äººçµè¯" |
| | | ><el-input |
| | | :size="fontSize" |
| | | clearable |
| | | type="tel" |
| | | v-model="sceneObj.contactst" |
| | | placeholder="项ç®è´è´£äººçµè¯" |
| | | > |
| | | <template #prepend> |
| | | <el-icon><Iphone /></el-icon> |
| | | </template> </el-input |
| | | ></el-descriptions-item> |
| | | <el-descriptions-item label="ç§èµåä½" |
| | | ><el-input |
| | | :size="fontSize" |
| | | clearable |
| | | v-model="formObj.wRentUnit" |
| | | placeholder="ç§èµåä½" |
| | | /></el-descriptions-item> |
| | | </el-descriptions> |
| | | </template> |
| | | </BaseSceneInfo> |
| | | </template> |
| | | <script setup> |
| | | import { reactive, ref, watch, computed } from 'vue'; |
| | | import { useFormConfirm } from '@/composables/formConfirm'; |
| | | import BaseSceneInfo from './BaseSceneInfo.vue'; |
| | | |
| | | const props = defineProps({ |
| | | scene: Object, |
| | | //å·¥å°é¢å¤ä¿¡æ¯ |
| | | formInfo: Object, |
| | | //åºæ¯ç±»åï¼å·¥å° |
| | | sceneType: { |
| | | type: Number, |
| | | default: 1 |
| | | }, |
| | | // å±ç¤ºæ ·å¼ formï¼è¡¨åï¼descriptionsï¼æè¿°å表 |
| | | showStyle: { |
| | | type: String, |
| | | default: 'descriptions' |
| | | // default:'form' |
| | | }, |
| | | title: String |
| | | }); |
| | | const fontSize = ref('small'); |
| | | const emit = defineEmits([ |
| | | 'onSubmit', |
| | | 'onCancel', |
| | | 'update:scene', |
| | | 'update:formInfo' |
| | | ]); |
| | | |
| | | const sceneObj = ref({}); |
| | | const { formObj, formRef, edit, onSubmit, onReset } = useFormConfirm({ |
| | | submit: { |
| | | do: submit |
| | | }, |
| | | cancel: { |
| | | do: cancel |
| | | } |
| | | }); |
| | | const ignoreEdit = computed(() => props.showStyle == 'descriptions'); |
| | | |
| | | const loading = ref(false); |
| | | const status = reactive([]); |
| | | const rules = reactive({}); |
| | | |
| | | const baseSceneInfo = ref(null); |
| | | function submit() { |
| | | return baseSceneInfo.value.submit() |
| | | } |
| | | |
| | | function cancel() { |
| | | emit('onCancel'); |
| | | } |
| | | |
| | | watch( |
| | | () => props.formInfo, |
| | | (nValue) => { |
| | | if (nValue) { |
| | | formObj.value = nValue; |
| | | } |
| | | }, |
| | | { deep: false, immediate: true } |
| | | ); |
| | | |
| | | watch( |
| | | () => props.scene, |
| | | (nValue) => { |
| | | if (nValue) { |
| | | sceneObj.value = nValue; |
| | | } |
| | | }, |
| | | { deep: false, immediate: true } |
| | | ); |
| | | </script> |
| | | |
| | | <style> |
| | | /* .input-with-select .el-input-group__prepend { |
| | | background-color: var(--el-fill-color-blank); |
| | | } */ |
| | | .sub-title { |
| | | font-size: var(--el-font-size-large); |
| | | margin-bottom: 20px; |
| | | margin-left: 20px; |
| | | } |
| | | </style> |
¶Ô±ÈÐÂÎļþ |
| | |
| | | <template> |
| | | <slot name="form-items"></slot> |
| | | <slot name="description-items"></slot> |
| | | </template> |
| | | <script setup> |
| | | import { reactive, ref, watch, computed } from 'vue'; |
| | | import { useDateFormat } from '@vueuse/core'; |
| | | import sceneApi from '@/api/fysp/sceneApi'; |
| | | expose({ |
| | | submit |
| | | }); |
| | | const props = defineProps({ |
| | | scene: Object, |
| | | //å·¥å°é¢å¤ä¿¡æ¯ |
| | | formInfo: Object, |
| | | //åºæ¯ç±»åï¼å·¥å° |
| | | sceneType: { |
| | | type: Number, |
| | | default: 1 |
| | | }, |
| | | }); |
| | | const emit = defineEmits([ |
| | | 'onSubmit', |
| | | 'onCancel', |
| | | 'update:scene', |
| | | 'update:formInfo' |
| | | ]); |
| | | const loading = ref(false); |
| | | const formObj = ref({}); |
| | | const sceneObj = ref({}); |
| | | // åå»ºææ´æ°åºæ¯è¯¦æ
|
| | | function createOrupdateSubScene() { |
| | | loading.value = true; |
| | | |
| | | if (formObj.value._timeRange && formObj.value._timeRange.length == 2) { |
| | | const t = formObj.value._timeRange; |
| | | formObj.value.csStartTime = useDateFormat(t[0], 'YYYY-MM-DD'); |
| | | formObj.value.csEndTime = useDateFormat(t[1], 'YYYY-MM-DD'); |
| | | } |
| | | return sceneApi |
| | | .updateSubScene(props.sceneType, formObj.value) |
| | | .then((res) => { |
| | | emit('onSubmit', formObj); |
| | | emit('update:formInfo', formObj); |
| | | return res.data; |
| | | }) |
| | | .finally(() => { |
| | | loading.value = false; |
| | | }); |
| | | } |
| | | |
| | | // æ´æ°åºæ¯ |
| | | function updateScene() { |
| | | return sceneApi.updateScene(sceneObj.value).then(() => { |
| | | emit('update:scene', sceneObj); |
| | | }); |
| | | } |
| | | |
| | | function submit() { |
| | | updateScene(); |
| | | return createOrupdateSubScene(); |
| | | } |
| | | |
| | | function cancel() { |
| | | emit('onCancel'); |
| | | } |
| | | |
| | | watch( |
| | | () => props.formInfo, |
| | | (nValue) => { |
| | | if (nValue) { |
| | | formObj.value = nValue; |
| | | formObj.value._timeRange = [ |
| | | new Date(formObj.value.csStartTime), |
| | | new Date(formObj.value.csEndTime) |
| | | ]; |
| | | } |
| | | }, |
| | | { deep: false, immediate: true } |
| | | ); |
| | | |
| | | watch( |
| | | () => props.scene, |
| | | (nValue) => { |
| | | if (nValue) { |
| | | sceneObj.value = nValue; |
| | | } |
| | | }, |
| | | { deep: false, immediate: true } |
| | | ); |
| | | </script> |
| | |
| | | create |
| | | v-model="curSubTaskList" |
| | | :loading="subTaskLoading" |
| | | :create-loading="daytaskLoading" |
| | | height="56vh" |
| | | @add="subTaskDrawer = true" |
| | | @add="handleAddSubtask" |
| | | @submit="handleSubtaskSubmit" |
| | | ></CompSubTaskList> |
| | | </el-col> |
| | |
| | | </template> |
| | | |
| | | <script> |
| | | import { unref } from 'vue'; |
| | | import { useCloned } from '@vueuse/core'; |
| | | import dayjs from 'dayjs'; |
| | | import taskApi from '@/api/fysp/taskApi'; |
| | | import CompMonitorObj from './components/CompMonitorObj.vue'; |
| | | import CompMonitorPlan from './components/CompMonitorPlan.vue'; |
| | |
| | | subTaskDrawer: false, |
| | | // å½åéæ©çæ¥ä»»å¡ |
| | | curDayTask: {}, |
| | | curDay: undefined, |
| | | daytaskLoading: false, |
| | | // å½åéæ©çæ¥ä»»å¡ä¸çåä»»å¡ |
| | | curSubTaskList: undefined, |
| | | subTaskLoading: false, |
| | | // æ»ä»»å¡æ°å¢å¼¹åºæ¡ |
| | | topTaskAddVisible: false |
| | | }; |
| | | }, |
| | | provide() { |
| | | return { |
| | | topTask: this.curTask |
| | | }; |
| | | }, |
| | | computed: { |
| | |
| | | } |
| | | }); |
| | | }, |
| | | onDateChange(dayTask) { |
| | | onDateChange(dayTask, day) { |
| | | this.curDay = day; |
| | | if (dayTask) { |
| | | this.subTaskLoading = true; |
| | | // this.subTaskDrawer = true; |
| | |
| | | .finally(() => (this.subTaskLoading = false)); |
| | | } else { |
| | | this.curSubTaskList = []; |
| | | this.curDayTask = {}; |
| | | } |
| | | }, |
| | | navToTaskCreate(value) { |
| | |
| | | this.$refs.planRef |
| | | .fetchDayTasks() |
| | | .finally(() => (this.subTaskLoading = false)); |
| | | }, |
| | | handleAddSubtask() { |
| | | // 夿彿¥æ¯å¦ææ¥ä»»å¡ï¼è¥æ²¡æï¼å
å建å¨è·³è½¬åä»»å¡å建çé¢ |
| | | if (this.curDayTask.guid) { |
| | | this.subTaskDrawer = true; |
| | | } else { |
| | | const _dayTask = useCloned(this.curTask.data).cloned.value; |
| | | const taskDate = dayjs(this.curDay); |
| | | _dayTask.tsguid = _dayTask.tguid; |
| | | _dayTask.tguid = null; |
| | | _dayTask.levelnum = null; |
| | | _dayTask.name = `${taskDate.format('YYYYå¹´MMæDDæ¥')}${ |
| | | _dayTask.cityname |
| | | }${_dayTask.districtname}${_dayTask.typename}ä»»å¡`; |
| | | _dayTask.starttime = taskDate.startOf('day').toDate(); |
| | | _dayTask.endtime = taskDate.endOf('day').millisecond(0).toDate(); |
| | | _dayTask.settime = dayjs().toDate(); |
| | | _dayTask.t1stverifytime = dayjs().toDate(); |
| | | _dayTask.runingstatus = 'æªæ§è¡'; |
| | | this.daytaskLoading = true; |
| | | taskApi |
| | | .putTask(_dayTask) |
| | | .then((res) => { |
| | | this.curDayTask = { |
| | | guid: res.data.tguid, |
| | | tsGuid: res.data.tsguid, |
| | | changedTaskNum: 0, |
| | | check: true, |
| | | completeTaskNum: 0, |
| | | date: res.data.starttime, |
| | | totalTaskNum: 0 |
| | | }; |
| | | this.subTaskDrawer = true; |
| | | this.handleSubtaskSubmit(); |
| | | }) |
| | | .finally(() => (this.daytaskLoading = false)); |
| | | } |
| | | } |
| | | }, |
| | | mounted() { |
| | |
| | | executorOptions.forEach((e) => { |
| | | const index = data.indexOf(e.value); |
| | | if (index != -1) { |
| | | ids.push(e.data.guid); |
| | | uNames.push(e.data.acountname); |
| | | rNames.push(e.data.realname); |
| | | ids.push(e.data.id); |
| | | uNames.push(e.data.userName); |
| | | rNames.push(e.data.realName); |
| | | } |
| | | }); |
| | | return { |
| | | id: ids.join('#'), |
| | | ids: ids.join('#'), |
| | | uName: uNames.join('#'), |
| | | rName: rNames.join('#') |
| | | }; |
| | |
| | | </el-row> |
| | | </template> |
| | | <script setup> |
| | | import { ref, watch, onMounted } from 'vue'; |
| | | import { ref, watch, onMounted, inject } from 'vue'; |
| | | import { useCloned } from '@vueuse/core'; |
| | | import { useRoute, useRouter } from 'vue-router'; |
| | | import { ElMessage, ElNotification, ElMessageBox } from 'element-plus'; |
| | |
| | | if (isDayEnable(e)) { |
| | | const day = dayjs(e).format('YYYY-MM-DD'); |
| | | const t = computeDayTask(day); |
| | | emit('dateChange', t); |
| | | emit('dateChange', t, day); |
| | | } |
| | | } |
| | | |
| | |
| | | <div v-else> |
| | | <el-empty description="æ ä»»å¡è®°å½" /> |
| | | <el-row v-if="create" justify="center"> |
| | | <el-button type="success" size="small" @click="add" |
| | | <el-button |
| | | type="success" |
| | | size="small" |
| | | :loading="createLoading" |
| | | @click="add" |
| | | >æ·»å ä»»å¡</el-button |
| | | > |
| | | </el-row> |
| | |
| | | }, |
| | | // æ¯å¦æ¾ç¤ºæ·»å ä»»å¡æé® |
| | | create: Boolean, |
| | | loading: Boolean |
| | | loading: Boolean, |
| | | createLoading:Boolean, |
| | | }); |
| | | |
| | | const dialogVisible = ref(false); |
| | |
| | | return subtaskApi.deleteSubtask(item.stguid).then(res=>{ |
| | | if (res == 1) { |
| | | const index = data.value.indexOf(item); |
| | | data.value.splice(index, 1); |
| | | data.value.splice(index, 1); |
| | | |
| | | emit('update:modelValue', data.value); |
| | | emit('remove', item); |
| | |
| | | /** |
| | | * å·¡æ¥åä»»å¡å建 |
| | | */ |
| | | import { ref, reactive, watch, computed, onMounted } from 'vue'; |
| | | import { ref, reactive, watch, computed, onMounted, inject } from 'vue'; |
| | | import { ElMessageBox, ElNotification, ElMessage } from 'element-plus'; |
| | | import taskApi from '@/api/fysp/taskApi'; |
| | | import TaskProxy from '../TaskProxy'; |
| | | |
| | | onMounted(() => { |
| | | // if (props.height) { |
| | | // scrollHeight.value = |
| | | // } |
| | | }); |
| | | // const topTask = inject('topTask'); |
| | | |
| | | const props = defineProps({ |
| | | // åä»»å¡éå |
| | |
| | | } else { |
| | | success(); |
| | | // å°ä»»å¡æ§è¡äººæ ¼å¼åå¹¶ä¼ é |
| | | const param = TaskProxy.getExecutors(v.value.executor, executors.value) |
| | | emit('submit', param) |
| | | const param = TaskProxy.getExecutors(v.value.executor, executors.value); |
| | | emit('submit', param); |
| | | } |
| | | } |
| | | |
| | | /************************* 任塿§è¡äººä¸æéæ¡ *******************************/ |
| | | // onMounted(() => { |
| | | // getExecutors(topTask.value); |
| | | // }); |
| | | |
| | | const executors = ref([]); |
| | | // æ¯å¦å
¨é |
| | | const checkAll = ref(false); |
| | |
| | | formInfo.value.executor = []; |
| | | } |
| | | } |
| | | |
| | | function getExecutors(t) { |
| | | const ids = t.executorguids.split('#'); |
| | | const userNames = t.executorusernames.split('#'); |
| | | const realNames = t.executorrealnames.split('#'); |
| | | const list = []; |
| | | ids.forEach((e, i) => { |
| | | if (i < userNames.length && i < realNames.length) { |
| | | list.push({ |
| | | label: realNames[i], |
| | | value: e, |
| | | data: { |
| | | id: e, |
| | | userName: userNames[i], |
| | | realName: realNames[i] |
| | | } |
| | | }); |
| | | } |
| | | }); |
| | | |
| | | executors.value = list; |
| | | } |
| | | // watch(topTask, (nV, oV) => { |
| | | // if (nV != oV) { |
| | | // getExecutors(nV); |
| | | // } |
| | | // }); |
| | | |
| | | watch( |
| | | () => props.dayTask, |
| | | (nV, oV) => { |
| | | if (nV != oV) { |
| | | taskApi.fetchTaskById(nV.guid).then((res) => { |
| | | const ids = res.executorguids.split('#'); |
| | | const userNames = res.executorusernames.split('#'); |
| | | const realNames = res.executorrealnames.split('#'); |
| | | const list = []; |
| | | ids.forEach((e, i) => { |
| | | if (i < userNames.length && i < realNames.length) { |
| | | list.push({ |
| | | label: realNames[i], |
| | | value: e, |
| | | data: { |
| | | id: e, |
| | | userName: userNames[i], |
| | | realName: realNames[i] |
| | | } |
| | | }); |
| | | } |
| | | }); |
| | | |
| | | executors.value = list; |
| | | getExecutors(res); |
| | | }); |
| | | } |
| | | }, |
| | | { immediate: true } |
| | | ); |
| | | // |
| | | |
| | | watch( |
| | | () => formInfo.value.executor, |
| | | (val) => { |
| | |
| | | } |
| | | |
| | | function genTaskName() { |
| | | let name = dayjs(formRef.value.formObj._timeArr[0]).format('YYYYå¹´MMæ'); |
| | | let name = dayjs(formRef.value.formObj._timeArr[0]).format('YYYYå¹´Mæ'); |
| | | name += locationText(formRef.value.formObj._locations); |
| | | name += formRef.value.formObj._type.text; |
| | | name += 'ä»»å¡'; |