| | |
| | | // è·åè®¾å¤ |
| | | async fetchDevices(sceneId, deviceTypeId) { |
| | | const params = `?sceneId=${sceneId}&deviceTypeId=${deviceTypeId}`; |
| | | return await $fysp.get(`device${params}`).then((res) => res).then((res) => res.data); |
| | | return await $fysp |
| | | .get(`device${params}`) |
| | | .then((res) => res) |
| | | .then((res) => res.data); |
| | | }, |
| | | // è·å设å¤ç¶æä»¥å设å¤è¯¦æ
|
| | | async fetchDeviceStatus({deviceId, sceneId, deviceTypeId}) { |
| | | const params = `?deviceId=${deviceId}&sceneId=${sceneId}&deviceTypeId=${deviceTypeId}`; |
| | | return await $fysp.get(`device/status${params}`).then((res) => res).then((res) => res.data); |
| | | return await $fysp |
| | | .get(`device/status${params}`) |
| | | .then((res) => res) |
| | | .then((res) => res.data); |
| | | } |
| | | }; |
| | |
| | | BasePanelLayout: typeof import('./components/core/BasePanelLayout.vue')['default'] |
| | | CompQuickSet: typeof import('./components/search-option/CompQuickSet.vue')['default'] |
| | | Content: typeof import('./components/core/Content.vue')['default'] |
| | | ElAffix: typeof import('element-plus/es')['ElAffix'] |
| | | ElAside: typeof import('element-plus/es')['ElAside'] |
| | | ElAvatar: typeof import('element-plus/es')['ElAvatar'] |
| | | ElBadge: typeof import('element-plus/es')['ElBadge'] |
| | | ElBreadcrumb: typeof import('element-plus/es')['ElBreadcrumb'] |
| | | ElBreadcrumbItem: typeof import('element-plus/es')['ElBreadcrumbItem'] |
| | | ElButton: typeof import('element-plus/es')['ElButton'] |
| | | ElCalendar: typeof import('element-plus/es')['ElCalendar'] |
| | | ElCard: typeof import('element-plus/es')['ElCard'] |
| | | ElCascader: typeof import('element-plus/es')['ElCascader'] |
| | | ElCheckbox: typeof import('element-plus/es')['ElCheckbox'] |
| | | ElCol: typeof import('element-plus/es')['ElCol'] |
| | | ElCollapse: typeof import('element-plus/es')['ElCollapse'] |
| | | ElCollapseItem: typeof import('element-plus/es')['ElCollapseItem'] |
| | |
| | | ElIcon: typeof import('element-plus/es')['ElIcon'] |
| | | ElImage: typeof import('element-plus/es')['ElImage'] |
| | | ElInput: typeof import('element-plus/es')['ElInput'] |
| | | ElLink: typeof import('element-plus/es')['ElLink'] |
| | | ElMain: typeof import('element-plus/es')['ElMain'] |
| | | ElMenu: typeof import('element-plus/es')['ElMenu'] |
| | | ElMenuItem: typeof import('element-plus/es')['ElMenuItem'] |
| | | ElMenuItemGroup: typeof import('element-plus/es')['ElMenuItemGroup'] |
| | | ElOption: typeof import('element-plus/es')['ElOption'] |
| | | ElPagination: typeof import('element-plus/es')['ElPagination'] |
| | | ElPopover: typeof import('element-plus/es')['ElPopover'] |
| | | ElRadioButton: typeof import('element-plus/es')['ElRadioButton'] |
| | | ElRadioGroup: typeof import('element-plus/es')['ElRadioGroup'] |
| | | ElRow: typeof import('element-plus/es')['ElRow'] |
| | | ElScrollbar: typeof import('element-plus/es')['ElScrollbar'] |
| | | ElSegmented: typeof import('element-plus/es')['ElSegmented'] |
| | | ElSelect: typeof import('element-plus/es')['ElSelect'] |
| | | ElSpace: typeof import('element-plus/es')['ElSpace'] |
| | | ElStep: typeof import('element-plus/es')['ElStep'] |
| | |
| | | ElTabs: typeof import('element-plus/es')['ElTabs'] |
| | | ElTag: typeof import('element-plus/es')['ElTag'] |
| | | ElText: typeof import('element-plus/es')['ElText'] |
| | | ElTooltip: typeof import('element-plus/es')['ElTooltip'] |
| | | ElTree: typeof import('element-plus/es')['ElTree'] |
| | | ElUpload: typeof import('element-plus/es')['ElUpload'] |
| | | Footer: typeof import('./components/core/Footer.vue')['default'] |
| | |
| | | FYBgTaskDialog: typeof import('./components/bg-task/FYBgTaskDialog.vue')['default'] |
| | | FYBgTaskItem: typeof import('./components/bg-task/FYBgTaskItem.vue')['default'] |
| | | FYForm: typeof import('./components/form/FYForm.vue')['default'] |
| | | FYImageSelectDialog: typeof import('./components/FYImageSelectDialog.vue')['default'] |
| | | FYInfoSearch: typeof import('./components/search-option/FYInfoSearch.vue')['default'] |
| | | FYList: typeof import('./components/table/FYList.vue')['default'] |
| | | FYOptionLocation: typeof import('./components/search-option/FYOptionLocation.vue')['default'] |
¶Ô±ÈÐÂÎļþ |
| | |
| | | <template> |
| | | <el-dialog |
| | | v-model="anyPhotoDialog" |
| | | width="66%" |
| | | title="ä»»æå¾ç" |
| | | destroy-on-close |
| | | > |
| | | <div class="main"> |
| | | <el-row justify="end" class="btns" v-if="!readonly"> |
| | | <el-text size="small" type="info" class="m-r-8" |
| | | >æå¤éæ©{{ maxSelect }}å¼ å¾ç</el-text |
| | | > |
| | | <el-button |
| | | size="small" |
| | | type="primary" |
| | | @click="sendSelectedImg(true)" |
| | | :disabled="selectedImgUrlList.length == 0" |
| | | >ç¡®å®</el-button |
| | | > |
| | | <el-button size="small" type="primary" @click="sendSelectedImg(false)" |
| | | >åæ¶</el-button |
| | | > |
| | | </el-row> |
| | | |
| | | <div class="center"> |
| | | <el-tabs v-if="typeList.length > 0" v-model="activeId" type="card"> |
| | | <el-tab-pane |
| | | v-for="item in typeList" |
| | | :key="item.typeId" |
| | | :label=" |
| | | item.typeName + ' (' + typeImgMap.get(activeId).length + ')' |
| | | " |
| | | :name="item.typeId" |
| | | > |
| | | </el-tab-pane> |
| | | </el-tabs> |
| | | <el-empty v-if="isEmpty" description="ææ è®°å½" /> |
| | | <el-scrollbar class="imgs"> |
| | | <el-image |
| | | v-for="(img, i) in typeImgMap.get(activeId)" |
| | | :key="i" |
| | | :class="[img.isSelect ? 'selected' : 'noActive', 'image']" |
| | | fit="cover" |
| | | :src="img.url" |
| | | lazy |
| | | @click="onSelect(img, i)" |
| | | /> |
| | | </el-scrollbar> |
| | | </div> |
| | | </div> |
| | | </el-dialog> |
| | | </template> |
| | | <script setup> |
| | | import { ref, watch } from 'vue'; |
| | | |
| | | const props = defineProps({ |
| | | typeList: { |
| | | type: Array, |
| | | default: () => [] |
| | | }, |
| | | // æ¯å¦ä»¥åªè¯»ç形弿¥çå½åé¡µé¢ |
| | | readonly: { |
| | | type: Boolean, |
| | | default: false |
| | | }, |
| | | defaultFile: { |
| | | type: Array, |
| | | default: () => [] |
| | | }, |
| | | // å¾çå¯éæ°éï¼å½ä¼ å
¥æ°åæ¶ï¼ä»£è¡¨å¾çæ°é |
| | | maxSelect: { |
| | | type: Number, |
| | | default: 3 |
| | | } |
| | | }); |
| | | |
| | | const activeId = ref(''); |
| | | const typeImgMap = ref(new Map()); |
| | | const selectedImgList = ref([]); |
| | | |
| | | watch(typeImgMap, (newMap, oldMap) => { |
| | | if (newMap.get(activeId.value) == undefined) { |
| | | return; |
| | | } |
| | | newMap.get(activeId.value).forEach( |
| | | (i) => { |
| | | if (i.isSelect == true) { |
| | | return; |
| | | } |
| | | props.defaultFile.forEach((imgItem) => { |
| | | if (imgItem.url == i.url) { |
| | | i.isSelect = true; |
| | | } |
| | | }); |
| | | }, |
| | | { deep: true } |
| | | ); |
| | | }); |
| | | </script> |
| | |
| | | empty-text="ææ è®°å½" |
| | | > |
| | | <template #default="{ node, data }"> |
| | | <slot :node="node" :data="data"> |
| | | <div |
| | | :class=" |
| | | data.selected |
| | |
| | | /></el-icon> |
| | | <div>{{ node.label }}</div> |
| | | </div> |
| | | </slot> |
| | | </template> |
| | | </el-tree> |
| | | </template> |
| | |
| | | type: 0, |
| | | title: 'title', |
| | | categoly: '2022-10-10', |
| | | data: {}, |
| | | data: {} |
| | | } |
| | | ] |
| | | }, |
| | | ], |
| | | }, |
| | | loading: Boolean, |
| | | loading: Boolean |
| | | }, |
| | | emits: ['itemClick'], |
| | | data() { |
| | | return { |
| | | defaultProps: { |
| | | children: 'children', |
| | | label: 'title', |
| | | label: 'title' |
| | | }, |
| | | isLoading: this.loading, |
| | | isLoading: this.loading |
| | | }; |
| | | }, |
| | | computed: { |
| | |
| | | for (const [key, value] of itemMap) { |
| | | const i = { |
| | | title: key, |
| | | children: [], |
| | | children: [] |
| | | }; |
| | | value.forEach((v) => { |
| | | i.children.push(v); |
| | |
| | | } |
| | | }); |
| | | return list; |
| | | }, |
| | | } |
| | | }, |
| | | watch: { |
| | | loading(nValue) { |
| | | this.isLoading = nValue |
| | | this.isLoading = nValue; |
| | | }, |
| | | //彿°æ®ç¬¬ä¸æ¬¡æ´æ°æ¶ |
| | | dataList(nValue) { |
| | |
| | | } |
| | | this.isLoading = false; |
| | | } |
| | | }, |
| | | } |
| | | }, |
| | | methods: { |
| | | handleNodeClick(data) { |
| | |
| | | if (data.children == undefined) { |
| | | this.$emit('itemClick', data); |
| | | } |
| | | }, |
| | | }, |
| | | } |
| | | } |
| | | }; |
| | | </script> |
| | | |
| | |
| | | }, |
| | | { |
| | | icon: 'DataAnalysis', |
| | | name: 'æ°æ®äº§å', |
| | | name: 'ä¸é´æ°æ®äº§å', |
| | | children: [ |
| | | { |
| | | path: '/fysp/data-product/profollow', |
| | |
| | | icon: 'Document', |
| | | name: 'æ¥æ¥ç®¡ç', |
| | | }, |
| | | ], |
| | | }, |
| | | { |
| | | icon: 'DataAnalysis', |
| | | name: 'æç»æ°æ®äº§å', |
| | | children: [ |
| | | { |
| | | path: '/fysp/data-product/scenereport', |
| | | icon: 'Document', |
¶Ô±ÈÐÂÎļþ |
| | |
| | | import monitor from './monitorDevice'; |
| | | import treatment from './treatmentDevice'; |
| | | import production from './productionDevice'; |
| | | |
| | | function enumDevice() { |
| | | return [ |
| | | { value: 0, label: 'çæ§è®¾å¤' }, |
| | | { value: 1, label: 'æ²»ç设å¤' }, |
| | | { value: 2, label: 'ç产设å¤' } |
| | | ]; |
| | | } |
| | | |
| | | function toLabel(sceneType, deviceType, valueArr) { |
| | | switch (deviceType + '') { |
| | | case '0': |
| | | return monitor.toLabel(sceneType, valueArr); |
| | | case '1': |
| | | return treatment.toLabel(sceneType, valueArr); |
| | | case '2': |
| | | return production.toLabel(sceneType, valueArr); |
| | | } |
| | | } |
| | | |
| | | export { enumDevice, toLabel }; |
¶Ô±ÈÐÂÎļþ |
| | |
| | | const dustDeviceType = [ |
| | | { |
| | | label: 'æ¬å°çæµ', |
| | | value: '1', |
| | | children: [ |
| | | { |
| | | label: 'æ¬å°çæµ', |
| | | value: '1', |
| | | }, |
| | | ], |
| | | }, |
| | | ]; |
| | | |
| | | const fumeDeviceType = [ |
| | | { |
| | | label: 'æ²¹ççæµ', |
| | | value: '1', |
| | | children: [ |
| | | { |
| | | label: 'æ²¹ççæµ', |
| | | value: '1', |
| | | }, |
| | | ], |
| | | }, |
| | | ]; |
| | | |
| | | const vocDeviceType = [ |
| | | { |
| | | label: 'VOCçæµ', |
| | | value: '1', |
| | | children: [ |
| | | { |
| | | label: 'VOCçæµ', |
| | | value: '1', |
| | | }, |
| | | ], |
| | | }, |
| | | ]; |
| | | |
| | | // çæµè®¾å¤ç±»å |
| | | function monitorDevices(sceneType) { |
| | | switch (parseInt(sceneType)) { |
| | | // å·¥å°,ç 头,æ
æç«,å åº |
| | | case 1: |
| | | case 2: |
| | | case 3: |
| | | case 14: |
| | | return dustDeviceType; |
| | | // é¤é¥® |
| | | case 5: |
| | | return fumeDeviceType; |
| | | // å·¥ä¸ä¼ä¸,汽修 |
| | | case 4: |
| | | case 6: |
| | | return vocDeviceType; |
| | | default: |
| | | return dustDeviceType; |
| | | } |
| | | } |
| | | |
| | | function toLabel(sceneType, valueArr) { |
| | | const labelArr = []; |
| | | let options = monitorDevices(sceneType); |
| | | valueArr.forEach(v => { |
| | | if (options) { |
| | | const op = options.find(o => { |
| | | return (o.value + '') == (v + ''); |
| | | }); |
| | | labelArr.push(op.label); |
| | | options = op.children; |
| | | } |
| | | }); |
| | | |
| | | return labelArr; |
| | | } |
| | | |
| | | export default { monitorDevices, toLabel }; |
¶Ô±ÈÐÂÎļþ |
| | |
| | | const dustDeviceType = [ |
| | | { |
| | | label: 'éé', |
| | | value: '1', |
| | | children: [ |
| | | { label: 'æææº', value: '1' }, |
| | | { label: 'å车', value: '2' }, |
| | | { label: '履带å', value: '3' }, |
| | | { label: 'é²è½¦', value: '4' }, |
| | | { label: 'å卿º', value: '5' }, |
| | | ], |
| | | }, |
| | | ]; |
| | | |
| | | const fumeDeviceType = [ |
| | | { |
| | | label: 'å¨å
·', |
| | | value: '1', |
| | | children: [{ label: 'å¨å
·', value: '1' }], |
| | | }, |
| | | ]; |
| | | |
| | | const vocDeviceType = [ |
| | | { |
| | | label: 'VOC', |
| | | value: '1', |
| | | children: [{ label: 'VOC', value: '1' }], |
| | | }, |
| | | ]; |
| | | |
| | | // ç产设å¤ç±»å |
| | | function productionDevices(sceneType) { |
| | | switch (parseInt(sceneType)) { |
| | | // å·¥å°,ç 头,æ
æç«,å åº |
| | | case 1: |
| | | case 2: |
| | | case 3: |
| | | case 14: |
| | | return dustDeviceType; |
| | | // é¤é¥® |
| | | case 5: |
| | | return fumeDeviceType; |
| | | // å·¥ä¸ä¼ä¸,汽修 |
| | | case 4: |
| | | case 6: |
| | | return vocDeviceType; |
| | | default: |
| | | return dustDeviceType; |
| | | } |
| | | } |
| | | |
| | | function toLabel(sceneType, valueArr) { |
| | | const labelArr = []; |
| | | let options = productionDevices(sceneType); |
| | | valueArr.forEach(v => { |
| | | if (options) { |
| | | const op = options.find(o => { |
| | | return (o.value + '') == (v + ''); |
| | | }); |
| | | labelArr.push(op.label); |
| | | options = op.children; |
| | | } |
| | | }); |
| | | return labelArr; |
| | | } |
| | | |
| | | export default { productionDevices, toLabel }; |
¶Ô±ÈÐÂÎļþ |
| | |
| | | const dustDeviceType = [ |
| | | { |
| | | label: 'æé²', |
| | | value: '1', |
| | | children: [ |
| | | { label: 'ç¯ä¿æ´æ°´è½¦ï¼å¤§åéçµå¨ï¼', value: '1' }, |
| | | { label: 'çµå¨é¾ç®è½¦', value: '2' }, |
| | | { label: 'çµå¨æ´æ°´è½¦ï¼å°åï¼', value: '3' }, |
| | | { label: 'é¾ç®è½¦ï¼åºå®æè½®å¼ï¼', value: '4' }, |
| | | { label: 'èªå¨å²æ´è£
ç½®ï¼å°éå¼ï¼', value: '5' }, |
| | | { label: '髿æ´è½®æº', value: '6' }, |
| | | { label: 'é«åæ°´æª', value: '7' }, |
| | | { label: 'æ®éæ°´ç®¡ææ¶é²æ ', value: '8' }, |
| | | { label: 'å¡åå·æ·', value: '9' }, |
| | | { label: 'å´å¢å·æ·', value: '10' }, |
| | | { label: 'æ¬å°çæµä¸å·æ·èå¨', value: '11' }, |
| | | { label: 'å åºå·æ·', value: '12' }, |
| | | { label: 'ç产åºå·æ·', value: '13' }, |
| | | ], |
| | | }, |
| | | ]; |
| | | |
| | | const fumeDeviceType = [ |
| | | { |
| | | label: 'åå', |
| | | value: '1', |
| | | children: [{ label: 'æ²¹çåå', value: '1' }], |
| | | }, |
| | | ]; |
| | | |
| | | const vocDeviceType = [ |
| | | { |
| | | label: 'åå', |
| | | value: '1', |
| | | children: [{ label: 'åºåºåå', value: '1' }], |
| | | }, |
| | | ]; |
| | | |
| | | // æ²»ç设å¤ç±»å |
| | | function treatmentDevices(sceneType) { |
| | | switch (parseInt(sceneType)) { |
| | | // å·¥å°,ç 头,æ
æç«,å åº |
| | | case 1: |
| | | case 2: |
| | | case 3: |
| | | case 14: |
| | | return dustDeviceType; |
| | | // é¤é¥® |
| | | case 5: |
| | | return fumeDeviceType; |
| | | // å·¥ä¸ä¼ä¸,汽修 |
| | | case 4: |
| | | case 6: |
| | | return vocDeviceType; |
| | | default: |
| | | return dustDeviceType; |
| | | } |
| | | } |
| | | |
| | | function toLabel(sceneType, valueArr) { |
| | | const labelArr = []; |
| | | let options = treatmentDevices(sceneType); |
| | | valueArr.forEach(v => { |
| | | if (options) { |
| | | const op = options.find(o => { |
| | | return (o.value + '') == (v + ''); |
| | | }); |
| | | labelArr.push(op.label); |
| | | options = op.children; |
| | | } |
| | | }); |
| | | return labelArr; |
| | | } |
| | | |
| | | export default { treatmentDevices, toLabel }; |
¶Ô±ÈÐÂÎļþ |
| | |
| | | /** |
| | | * æ åå屿§å |
| | | * å°ä¸ç§è®¾å¤[çæ§è®¾å¤],[æ²»ç设å¤],[ç产设å¤]对象ç屿§åç»ä¸æ ¼å¼å |
| | | * @param {*} data |
| | | */ |
| | | function formatDevice(data) { |
| | | // å°ä¸ä¸ªjså¯¹è±¡ä¸æædiï¼wiï¼piå¼å¤´ç屿§å
¨é¨æ¹æå»æè¿äºåç¼å¹¶ä¸éæ°å为驼峰å¼å½å |
| | | const newObj = {}; |
| | | for (const key in data) { |
| | | let newKey = key; |
| | | if (key.startsWith('di')) { |
| | | newKey = key.substring(2); |
| | | } else if (key.startsWith('wi')) { |
| | | newKey = key.substring(2); |
| | | } else if (key.startsWith('pi')) { |
| | | newKey = key.substring(2); |
| | | } |
| | | newKey = newKey.charAt(0).toLowerCase() + newKey.slice(1); |
| | | newObj[newKey] = data[key]; |
| | | } |
| | | return newObj; |
| | | } |
| | | |
| | | function formatDeviceList(dataList) { |
| | | return dataList.map((v) => formatDevice(v)); |
| | | } |
| | | |
| | | export { formatDevice, formatDeviceList }; |
| | |
| | | <template> |
| | | <div class="main"> |
| | | <div class="filters" v-if="false"> |
| | | <el-select |
| | | v-for="(key_select, index_select) of filters.keys()" |
| | | :placeholder="key_select.text" |
| | | <el-row justify="end" class="btns" v-if="!readonly"> |
| | | <el-text size="small" type="info" class="m-r-8" |
| | | >æå¤éæ©{{ maxSelect }}å¼ å¾ç</el-text |
| | | > |
| | | <el-option |
| | | v-for="(key_option) in filters.get(key_select.key)" |
| | | :key="key_option.key" |
| | | :value="key_option.value" |
| | | :label="key_option.label" |
| | | <el-button |
| | | size="small" |
| | | type="primary" |
| | | @click="sendSelectedImg(true)" |
| | | :disabled="selectedImgUrlList.length == 0" |
| | | >ç¡®å®</el-button |
| | | > |
| | | </el-option> |
| | | </el-select> |
| | | </div> |
| | | <div class="btns" v-if="!readonly"> |
| | | <el-button size="small" type="primary" @click="sendSelectedImg(true)">ç¡®å®</el-button> |
| | | <el-button size="small" type="primary" @click="sendSelectedImg(false)">åæ¶</el-button> |
| | | </div> |
| | | <el-button size="small" type="primary" @click="sendSelectedImg(false)" |
| | | >åæ¶</el-button |
| | | > |
| | | </el-row> |
| | | |
| | | <div class="center"> |
| | | <el-descriptions> |
| | | <!-- <el-descriptions> |
| | | <el-descriptions-item label="æ»æ°"> |
| | | <span>{{ this.imgUrlList.length }}</span> |
| | | </el-descriptions-item> |
| | | </el-descriptions> |
| | | </el-descriptions> --> |
| | | <el-tabs v-model="activeId" type="card"> |
| | | <el-tab-pane |
| | | v-for="item in typeList" |
| | | :label="item.businesstype" |
| | | :key="item.businesstypeid" |
| | | :label=" |
| | | item.businesstype + ' (' + typeImgMap.get(activeId).length + ')' |
| | | " |
| | | :name="item.businesstypeid" |
| | | > |
| | | </el-tab-pane> |
| | | </el-tabs> |
| | | <el-empty v-if="isEmpty" description="ææ è®°å½" /> |
| | | <div class="imgs"> |
| | | <el-scrollbar class="imgs"> |
| | | <el-image |
| | | v-for="(img, i) in typeImgMap.get(activeId)" |
| | | :key="i" |
| | | :class="[Boolean(img.isSelect) ? 'selected' : 'noActive', 'image']" |
| | | fit="cover" |
| | | :src="img.url" |
| | | lazy |
| | | @click="onSelect(img, i)" |
| | | /> |
| | | </div> |
| | | </el-scrollbar> |
| | | </div> |
| | | </div> |
| | | </template> |
| | |
| | | defaultFile: { |
| | | type: Array, |
| | | default: () => [] |
| | | }, |
| | | // å¾çå¯éæ°éï¼å½ä¼ å
¥æ°åæ¶ï¼ä»£è¡¨å¾çæ°é |
| | | maxSelect: { |
| | | type: Number, |
| | | default: 3 |
| | | } |
| | | }, |
| | | data() { |
| | |
| | | // { businesstypeid: 60, businesstype: 'æ©å±ç±»å' } |
| | | ], |
| | | typeImgMap: new Map(), |
| | | imgUrlList: [] |
| | | imgUrlList: [], |
| | | selectedImgUrlList: [] |
| | | }; |
| | | }, |
| | | watch: { |
| | | subtask: { |
| | | handler(nV, oV) { |
| | | if (nV != oV && nV) { |
| | | this.getAllImgList(); |
| | | } |
| | | }, |
| | | immediate: true |
| | | }, |
| | | defaultFile: { |
| | | handler(newFileList, oldFileList) { |
| | | if (this.isClose) { |
| | |
| | | } |
| | | }, |
| | | mounted() { |
| | | if (this.subtask) { |
| | | this.getAllImgList(); |
| | | } |
| | | // if (this.subtask) { |
| | | // this.getAllImgList(); |
| | | // } |
| | | }, |
| | | methods: { |
| | | // åå§ååå¼å§éä¸çæ ç¾ |
| | |
| | | this.activeId = this.typeList[0].businesstypeid; |
| | | } |
| | | }, |
| | | async getAllImgList() { |
| | | getAllImgList() { |
| | | // for(var k of this.typeImgMap.keys()) { |
| | | // this.typeImgMap.set(k, []) |
| | | // } |
| | | await mediafileApi.getRoutineByStGuid(this.subtask.stGuid).then((res) => { |
| | | this.typeImgMap.clear(); |
| | | this.typeList = []; |
| | | mediafileApi.getRoutineByStGuid(this.subtask.stGuid).then((res) => { |
| | | this.isEmpty = false; |
| | | let data = res.data; |
| | | if (data.length == 0) { |
| | |
| | | this.imgUrlList.push(e); |
| | | // TODO imgUrlå
¨å±é
ç½® |
| | | e.url = $fysp.imgUrl + e.extension1 + e.guid + '.jpg'; |
| | | // e.url = "http://47.100.191.150:9005/images/" + e.extension1 + e.guid + '.jpg' |
| | | e.isSelect = false; |
| | | } |
| | | this.initSelectedTab(); |
| | |
| | | }); |
| | | }, |
| | | onSelect(img, i) { |
| | | // if (i == 2 && !this.isAll) { |
| | | // this.getAllImgList(); |
| | | // this.isAll = true; |
| | | // } else { |
| | | // if (this.readonly) { |
| | | // return; |
| | | // } |
| | | // img.isSelect = !Boolean(img.isSelect); |
| | | // } |
| | | |
| | | if (this.readonly) { |
| | | return; |
| | | } |
| | | img.isSelect = !img.isSelect; |
| | | const index = this.selectedImgUrlList.indexOf(img); |
| | | if (index == -1) { |
| | | if (this.maxSelect == 1) { |
| | | img.isSelect = true; |
| | | this.selectedImgUrlList.push(img); |
| | | if (this.selectedImgUrlList.length > 1) { |
| | | this.selectedImgUrlList.splice(0, 1).forEach((e) => { |
| | | e.isSelect = false; |
| | | }); |
| | | } |
| | | } else if (this.maxSelect > 1) { |
| | | if (this.selectedImgUrlList.length < this.maxSelect) { |
| | | img.isSelect = true; |
| | | this.selectedImgUrlList.push(img); |
| | | } |
| | | } |
| | | } else { |
| | | this.selectedImgUrlList.splice(index, 1); |
| | | img.isSelect = false; |
| | | } |
| | | |
| | | // img.isSelect = !img.isSelect; |
| | | }, |
| | | sendSelectedImg(isOk) { |
| | | let result = []; |
| | |
| | | } */ |
| | | |
| | | .imgs { |
| | | height: 650px; |
| | | height: 50vh; |
| | | width: 90%; |
| | | min-height: 100px !important; |
| | | /* border-style:solid; |
| | |
| | | } |
| | | |
| | | .image { |
| | | margin: 5px; |
| | | height: 210px; |
| | | width: 200px; |
| | | border-radius: 4px; |
| | |
| | | } |
| | | |
| | | .selected { |
| | | padding: 5px; |
| | | margin: 3px; |
| | | color: #4abe84; |
| | | box-shadow: 0 2px 7px 0 rgba(85, 110, 97, 0.35); |
| | | border: 1px solid rgba(74, 190, 132, 1); |
| | | border: 2px solid rgba(74, 190, 132, 1); |
| | | } |
| | | |
| | | .selected:before { |
| | |
| | | } |
| | | |
| | | .noActive { |
| | | padding: 5px; |
| | | /* padding: 5px; */ |
| | | } |
| | | |
| | | .blurry { |
| | |
| | | <template> |
| | | åºæ¯æ¥å管ç |
| | | <BaseContentLayout> |
| | | <template #header> |
| | | <SearchBar @on-submit="search"> </SearchBar> |
| | | </template> |
| | | <template #aside> |
| | | <SideList |
| | | :items="subtasks" |
| | | :loading="sideLoading" |
| | | @item-click="chooseSubtask" |
| | | ></SideList> |
| | | </template> |
| | | <template #main> |
| | | <el-scrollbar class="el-scrollbar" v-loading="mainLoading"> |
| | | <CompSceneConstructionInfo |
| | | title="Aãå·¥å°åºæ¬ä¿¡æ¯" |
| | | :form-info="formSubScene" |
| | | /> |
| | | <div><el-text type="">éå¾çï¼</el-text></div> |
| | | <CompImgInfo |
| | | title="æ½å·¥éç" |
| | | :img-src="sceneImg.url" |
| | | @change="anyPhotoDialog = true" |
| | | ></CompImgInfo> |
| | | <el-divider /> |
| | | <el-text tag="h1">Bãä¸»è¦æ±¡æé²æ²»è®¾æ½</el-text> |
| | | <el-space wrap> |
| | | <CompImgInfo |
| | | v-for="(item, i) in deviceList" |
| | | :key="i" |
| | | down-title |
| | | :title="item._deviceTypeName" |
| | | :img-src="item._showStatusPic" |
| | | @change="showDevicePhotoDialog(item)" |
| | | ></CompImgInfo> |
| | | </el-space> |
| | | <el-divider /> |
| | | <el-text tag="h1">Cãç°åºæ±¡æé®é¢ä¸æ´æ¹æ
åµ</el-text> |
| | | </el-scrollbar> |
| | | </template> |
| | | </BaseContentLayout> |
| | | <el-dialog |
| | | v-model="anyPhotoDialog" |
| | | width="66%" |
| | | title="ä»»æå¾ç" |
| | | destroy-on-close |
| | | > |
| | | <ArbitraryPhoto |
| | | :max-select="1" |
| | | :readonly="false" |
| | | :subtask="curSubtask.data" |
| | | @selectByAnyPhonoEvent="handleSelectAnyPhoto" |
| | | :defaultFile="[sceneImg]" |
| | | > |
| | | </ArbitraryPhoto> |
| | | </el-dialog> |
| | | <el-dialog |
| | | title="设å¤å¾ç" |
| | | width="66%" |
| | | v-model="deiveceImgDialog" |
| | | destroy-on-close |
| | | > |
| | | <CompDevicePhono |
| | | @selectPhonoEvent="handleSelectDevicePhoto" |
| | | :imgPathsDataSource="showDeviceImgList" |
| | | > |
| | | </CompDevicePhono> |
| | | </el-dialog> |
| | | </template> |
| | | <script setup> |
| | | import { ref, computed } from 'vue'; |
| | | |
| | | import { $fysp } from '@/api/index'; |
| | | import taskApi from '@/api/fysp/taskApi'; |
| | | import sceneApi from '@/api/fysp/sceneApi'; |
| | | import deviceApi from '@/api/fysp/deviceApi'; |
| | | import { formatDeviceList } from '@/model/fysp/device'; |
| | | import { enumDevice, toLabel } from '@/enum/device/device'; |
| | | |
| | | import CompSceneConstructionInfo from '@/views/fysp/scene/CompSceneConstructionInfo.vue'; |
| | | import ArbitraryPhoto from '@/views/fysp/check/components/ArbitraryPhoto.vue'; |
| | | import CompDevicePhono from '@/views/fysp/check/components/CompDevicePhono.vue'; |
| | | import CompImgInfo from '@/views/fysp/data-product/components/CompImgInfo.vue'; |
| | | |
| | | /************************* 左侧巡æ¥ä»»å¡éå **********************************/ |
| | | const curSubtask = ref({}); |
| | | const subtasks = ref([]); |
| | | const sideLoading = ref(false); |
| | | const mainLoading = ref(false); |
| | | //è·åä»»å¡é®é¢çå®¡æ ¸æ
åµ |
| | | function getSubtaskType(s) { |
| | | let type = 0; |
| | | if (s.proNum == 0) { |
| | | type = 2; |
| | | } else if (s.proCheckedNum == 0) { |
| | | type = 0; |
| | | } else if (s.proCheckedNum < s.proNum) { |
| | | type = 1; |
| | | } else { |
| | | type = 2; |
| | | } |
| | | return type; |
| | | } |
| | | //æ¥è¯¢åä»»å¡ç»è®¡ä¿¡æ¯ |
| | | function search(formSearch) { |
| | | // this.topTask = formSearch.topTask; |
| | | sideLoading.value = true; |
| | | mainLoading.value = true; |
| | | // this.curProList = []; |
| | | curSubtask.value = {}; |
| | | const param = { |
| | | topTaskId: formSearch.topTask.tguid, |
| | | sceneTypeId: formSearch.sceneTypeId |
| | | }; |
| | | taskApi.getSubtaskSummary(param).then((res) => { |
| | | const list = []; |
| | | res.forEach((s) => { |
| | | const t = getSubtaskType(s); |
| | | list.push({ |
| | | type: t, |
| | | title: s.stName, |
| | | categoly: s.stPlanTime.split('T')[0], |
| | | data: s |
| | | }); |
| | | }); |
| | | subtasks.value = list; |
| | | if (list.length == 0) { |
| | | sideLoading.value = false; |
| | | mainLoading.value = false; |
| | | } |
| | | }); |
| | | } |
| | | //ç¹å»å·¦ä¾§èåä»»å¡äºä»¶ |
| | | function chooseSubtask(s) { |
| | | sideLoading.value = false; |
| | | mainLoading.value = true; |
| | | curSubtask.value = s; |
| | | |
| | | fetchSceneInfo(s.data.sceneId).finally(() => { |
| | | mainLoading.value = false; |
| | | }); |
| | | fetchDeviceList(s); |
| | | fetchProblems(s) |
| | | } |
| | | |
| | | /************************* åºæ¯åºæ¬ä¿¡æ¯ **********************************/ |
| | | const formSubScene = ref({}); |
| | | function fetchSceneInfo(sceneId) { |
| | | return sceneApi.getSceneDetail(sceneId).then((res) => { |
| | | //åºæ¯ |
| | | // if (res.data.scense) formScene = res.data.scense; |
| | | formSubScene.value = res.data.subScene ? res.data.subScene : {}; |
| | | // if (res.data.sceneDevice) { |
| | | // formSceneDevice = res.data.sceneDevice; |
| | | // } else { |
| | | // formSceneDevice = { |
| | | // sGuid: formScene.guid, |
| | | // }; |
| | | // } |
| | | }); |
| | | } |
| | | |
| | | // ä»»ææå¾çéæ©å¯¹è¯æ¡ |
| | | const anyPhotoDialog = ref(false); |
| | | const sceneImg = ref({}); |
| | | function handleSelectAnyPhoto(data) { |
| | | anyPhotoDialog.value = false; |
| | | if (data.length > 0) { |
| | | sceneImg.value = { url: data[0].url }; |
| | | } |
| | | } |
| | | /************************* åºæ¯è®¾å¤ä¿¡æ¯ **********************************/ |
| | | |
| | | // 设å¤å¾çéæ©å¯¹è¯æ¡ |
| | | const deiveceImgDialog = ref(false); |
| | | const showDeviceImg = ref({}); |
| | | const showDeviceImgList = ref([]); |
| | | // 设å¤å¾çå表 |
| | | const deviceList = ref([]); |
| | | |
| | | function showDevicePhotoDialog(device) { |
| | | deiveceImgDialog.value = true; |
| | | showDeviceImgList.value = []; |
| | | let imgList = []; |
| | | device._status |
| | | .map((s) => s._picUrls) |
| | | .forEach((pics) => { |
| | | imgList = imgList.concat( |
| | | pics.map((p) => { |
| | | return { |
| | | topTypeId: device.topTypeId, |
| | | _picUrl: p |
| | | }; |
| | | }) |
| | | ); |
| | | }); |
| | | console.log(imgList); |
| | | |
| | | showDeviceImgList.value = imgList; |
| | | } |
| | | |
| | | function handleSelectDevicePhoto(data) { |
| | | deiveceImgDialog.value = false; |
| | | if (data.length > 0) { |
| | | showDeviceImg.value = { url: data[0].url }; |
| | | } |
| | | } |
| | | |
| | | const deviceTopTypes = [ |
| | | { id: 0, label: 'çæ§è®¾å¤' }, |
| | | { id: 1, label: 'æ²»ç设å¤' } |
| | | // { id: 2, label: 'ç产设å¤' } |
| | | ]; |
| | | |
| | | function fetchDeviceList(s) { |
| | | deviceList.value = []; |
| | | for (const deviceTopTypeElement of deviceTopTypes) { |
| | | const topTypeId = deviceTopTypeElement.id; |
| | | deviceApi |
| | | .fetchDevices(s.data.sceneId, topTypeId) |
| | | .then((res) => { |
| | | return formatDeviceList(res.data); |
| | | }) |
| | | .then((result) => { |
| | | result.forEach((r) => { |
| | | const param = { |
| | | deviceId: r.id, |
| | | sceneId: r.sceneGuid, |
| | | deviceTypeId: topTypeId |
| | | }; |
| | | deviceApi |
| | | .fetchDeviceStatus(param) |
| | | .then((res) => { |
| | | res.data.forEach((e) => { |
| | | if (e.dlPicUrl && e.dlPicUrl.trim() != '') { |
| | | e._picUrls = e.dlPicUrl |
| | | .split(';') |
| | | .map((v) => $fysp.imgUrl + v); |
| | | } else { |
| | | e._picUrls = []; |
| | | } |
| | | }); |
| | | return res; |
| | | }) |
| | | .then((res) => { |
| | | if (res.data.length > 0 && res.data[0]._picUrls.length > 0) { |
| | | r._showStatusPic = res.data[0]._picUrls[0]; |
| | | } |
| | | r._status = res.data; |
| | | r.topTypeId = topTypeId; |
| | | r._deviceTypeName = toLabel(r.sceneTypeId, topTypeId, [ |
| | | r.typeId, |
| | | r.subtypeId |
| | | ]).join('-'); |
| | | deviceList.value.push(r); |
| | | }); |
| | | }); |
| | | }); |
| | | } |
| | | } |
| | | /************************* ç°åºå·¡æ¥æ
åµï¼é®é¢ä¸æ´æ¹ï¼ **********************************/ |
| | | //å½åä»»å¡çé®é¢å表 |
| | | const curProList = ref([]); |
| | | |
| | | function fetchProblems(s) { |
| | | taskApi.getProBySubtask(s.data.stGuid).then((res) => { |
| | | curProList.value = res; |
| | | }); |
| | | } |
| | | /************************* æ¬å°é²æ²»å»ºè®® **********************************/ |
| | | </script> |
¶Ô±ÈÐÂÎļþ |
| | |
| | | <template> |
| | | <table> |
| | | <tbody> |
| | | <tr v-if="!downTitle"> |
| | | <td> |
| | | <el-row justify="space-between" align="middle"> |
| | | {{ title }} |
| | | <el-button size="small" @click="$emit('change')">{{ |
| | | btnName |
| | | }}</el-button> |
| | | </el-row> |
| | | </td> |
| | | </tr> |
| | | <tr> |
| | | <td> |
| | | <el-image |
| | | class="image" |
| | | :src="imgSrc" |
| | | :preview-src-list="[imgSrc]" |
| | | :initial-index="0" |
| | | fit="cover" |
| | | lazy |
| | | /> |
| | | </td> |
| | | </tr> |
| | | <tr v-if="downTitle"> |
| | | <td> |
| | | <el-row justify="space-between" align="middle"> |
| | | {{ title }} |
| | | <el-button size="small" @click="$emit('change')">{{ |
| | | btnName |
| | | }}</el-button> |
| | | </el-row> |
| | | </td> |
| | | </tr> |
| | | </tbody> |
| | | </table> |
| | | </template> |
| | | <script setup> |
| | | import { ref } from 'vue'; |
| | | |
| | | const props = defineProps({ |
| | | // æ 颿¯å¦å¨å¾ç䏿¹ |
| | | downTitle: Boolean, |
| | | title: String, |
| | | imgSrc: String, |
| | | btnName: { |
| | | type: String, |
| | | default: 'ä¿®æ¹' |
| | | } |
| | | }); |
| | | |
| | | const emit = defineEmits(['change']); |
| | | </script> |
| | | <style scoped> |
| | | .image { |
| | | width: 200px; |
| | | height: 210px; |
| | | border-radius: 4px; |
| | | } |
| | | |
| | | table { |
| | | color: #333333; |
| | | border-color: #666666; |
| | | border-collapse: collapse; |
| | | } |
| | | |
| | | tr { |
| | | font-size: var(--el-font-size-small); |
| | | } |
| | | |
| | | td { |
| | | border: 1px solid black; |
| | | padding: 2px 6px; |
| | | /* border-width: 1px; |
| | | padding: 8px; |
| | | border-style: solid; |
| | | border-color: #666666; */ |
| | | } |
| | | </style> |
¶Ô±ÈÐÂÎļþ |
| | |
| | | <template> |
| | | <table> |
| | | <tbody> |
| | | <tr> |
| | | <td>{{ title }}</td> |
| | | </tr> |
| | | <tr> |
| | | <td> |
| | | <el-image |
| | | class="image" |
| | | :src="seletcedProblemPic" |
| | | :preview-src-list="[seletcedProblemPic]" |
| | | :initial-index="0" |
| | | fit="cover" |
| | | lazy |
| | | /> |
| | | </td> |
| | | <td> |
| | | <el-image |
| | | class="image" |
| | | :src="seletcedChangePic" |
| | | :preview-src-list="[seletcedChangePic]" |
| | | :initial-index="0" |
| | | fit="cover" |
| | | lazy |
| | | /> |
| | | </td> |
| | | </tr> |
| | | <tr> |
| | | <td> |
| | | <el-row justify="space-between" align="middle"> |
| | | <div>ä½ç½®ï¼{{ problem.location }}</div> |
| | | <div>æè¿°ï¼{{ problem.problemname }}</div> |
| | | <el-button size="small" @click="$emit('change')">{{ |
| | | btnName |
| | | }}</el-button> |
| | | </el-row> |
| | | </td> |
| | | <td> |
| | | <el-row justify="space-between" align="middle"> |
| | | <div>ä½ç½®ï¼{{ problem.location }}</div> |
| | | <div>æè¿°ï¼{{ problem.problemname }}</div> |
| | | <el-button size="small" @click="$emit('change')">{{ |
| | | btnName |
| | | }}</el-button> |
| | | </el-row> |
| | | </td> |
| | | </tr> |
| | | </tbody> |
| | | </table> |
| | | </template> |
| | | <script setup> |
| | | import { ref, watch } from 'vue'; |
| | | import ProCheckProxy from '@/views/check/ProCheckProxy'; |
| | | |
| | | const props = defineProps({ |
| | | problem: { |
| | | type: Object, |
| | | default: () => { |
| | | return {}; |
| | | } |
| | | } |
| | | }); |
| | | |
| | | const emit = defineEmits(['change']); |
| | | |
| | | const pics = ref([]); |
| | | const seletcedProblemPic = ref(); |
| | | const seletcedChangePic = ref(); |
| | | |
| | | function getPics() { |
| | | pics.value = ProCheckProxy.proPics(props.problem); |
| | | if (pics.value[0].path.length > 0) { |
| | | seletcedProblemPic.value = pics.value[0].path[0]; |
| | | } |
| | | if (pics.value[1].path.length > 0) { |
| | | seletcedChangePic.value = pics.value[1].path[0]; |
| | | } |
| | | } |
| | | |
| | | watch( |
| | | () => props.problem, |
| | | (nV, oV) => { |
| | | if (nV != oV) { |
| | | getPics(); |
| | | } |
| | | }, |
| | | { immediate: true } |
| | | ); |
| | | </script> |
| | | <style scoped> |
| | | .image { |
| | | width: 200px; |
| | | height: 210px; |
| | | border-radius: 4px; |
| | | } |
| | | |
| | | table { |
| | | color: #333333; |
| | | border-color: #666666; |
| | | border-collapse: collapse; |
| | | } |
| | | |
| | | tr { |
| | | font-size: var(--el-font-size-small); |
| | | } |
| | | |
| | | td { |
| | | border: 1px solid black; |
| | | padding: 2px 6px; |
| | | /* border-width: 1px; |
| | | padding: 8px; |
| | | border-style: solid; |
| | | border-color: #666666; */ |
| | | } |
| | | </style> |
| | |
| | | <!-- å·¥å°ä¸å±ä¿¡æ¯ç¼è¾ --> |
| | | <template> |
| | | <el-form |
| | | v-if="showStyle == 'form'" |
| | | :inline="false" |
| | | :model="formObj" |
| | | ref="formRef" |
| | |
| | | <el-button :disabled="!edit" @click="onReset">éç½®</el-button> |
| | | </el-form-item> |
| | | </el-form> |
| | | |
| | | <el-descriptions |
| | | v-else-if="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" |
| | | :disabled="!edit" |
| | | type="primary" |
| | | @click="onSubmit" |
| | | :loading="loading" |
| | | >æäº¤</el-button |
| | | > |
| | | <el-button :size="fontSize" :disabled="!edit" @click="onReset" |
| | | >éç½®</el-button |
| | | > |
| | | </template> |
| | | <el-descriptions-item label="å·¥ç¨ç±»å" |
| | | ><el-input |
| | | :size="fontSize" |
| | | clearable |
| | | v-model="formObj.csProjectType" |
| | | placeholder="å·¥ç¨ç±»å" |
| | | /></el-descriptions-item> |
| | | <!-- <el-descriptions-item label="å»ºè®¾ç¶æ" |
| | | ><el-select |
| | | v-model="formObj.csStatus" |
| | | placeholder="å»ºè®¾ç¶æ" |
| | | > |
| | | <el-option |
| | | v-for="s in status" |
| | | :key="s.value" |
| | | :label="s.label" |
| | | :value="s.value" |
| | | /> </el-select |
| | | ></el-descriptions-item> --> |
| | | <el-descriptions-item label="æ½å·¥é¶æ®µ" |
| | | ><el-select |
| | | v-model="formObj.siExtension1" |
| | | placeholder="æ½å·¥é¶æ®µ" |
| | | :size="fontSize" |
| | | > |
| | | <el-option |
| | | v-for="s in stage" |
| | | :key="s.value" |
| | | :label="s.label" |
| | | :value="s.value" |
| | | /> </el-select |
| | | ></el-descriptions-item> |
| | | <el-descriptions-item label="æ½å·¥æ¶é´" |
| | | ><el-date-picker |
| | | :size="fontSize" |
| | | v-model="formObj._timeRange" |
| | | type="daterange" |
| | | range-separator="è³" |
| | | start-placeholder="å¼å·¥æ¶é´" |
| | | end-placeholder="å®å·¥æ¶é´" |
| | | /></el-descriptions-item> |
| | | <el-descriptions-item label="å©ä½å·¥æ" |
| | | ><el-input |
| | | :size="fontSize" |
| | | clearable |
| | | v-model="formObj.csLeftTime" |
| | | placeholder="å©ä½å·¥æï¼ä¾å¦å å¹´ãå æãå å¨ãå 天ç" |
| | | /></el-descriptions-item> |
| | | <el-descriptions-item label="æ½å·¥å°å" span="2" |
| | | ><el-input |
| | | clearable |
| | | v-model="formObj.location" |
| | | placeholder="æ½å·¥å°å" |
| | | :size="fontSize" |
| | | /></el-descriptions-item> |
| | | <el-descriptions-item label="å å°é¢ç§¯" rowspan="2" |
| | | ><el-input |
| | | :size="fontSize" |
| | | clearable |
| | | v-model="formObj.csFloorSpace" |
| | | placeholder="å å°é¢ç§¯" |
| | | > |
| | | <template #append>ã¡</template> |
| | | </el-input></el-descriptions-item |
| | | > |
| | | <el-descriptions-item label="æ½å·¥é¢ç§¯" |
| | | ><el-input |
| | | :size="fontSize" |
| | | clearable |
| | | v-model="formObj.csConstructionArea" |
| | | placeholder="æ½å·¥é¢ç§¯" |
| | | > |
| | | <template #append>ã¡</template> |
| | | </el-input></el-descriptions-item |
| | | > |
| | | <el-descriptions-item label="æ¯ææ½å·¥é¢ç§¯" |
| | | ><el-input |
| | | :size="fontSize" |
| | | clearable |
| | | v-model="formObj.csConstructionAreaPerMonth" |
| | | placeholder="æ¯ææ½å·¥é¢ç§¯" |
| | | > |
| | | <template #append>ã¡</template> |
| | | </el-input></el-descriptions-item |
| | | > |
| | | <el-descriptions-item label="å®å
¨å" |
| | | ><el-input |
| | | :size="fontSize" |
| | | clearable |
| | | v-model="formObj.csSecurityOfficer" |
| | | placeholder="å®å
¨å" |
| | | /></el-descriptions-item> |
| | | <el-descriptions-item label="å®å
¨åçµè¯" |
| | | ><el-input |
| | | :size="fontSize" |
| | | clearable |
| | | type="tel" |
| | | v-model="formObj.csSecurityOfficerTel" |
| | | 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.csConstructionUnit" |
| | | placeholder="æ»å
åä½" |
| | | /></el-descriptions-item> |
| | | <!-- <el-descriptions-item label="æ½å·¥åä½è系人" |
| | | ><el-input |
| | | clearable |
| | | v-model="formObj.csConstructionContacts" |
| | | placeholder="æ½å·¥åä½è系人" |
| | | /></el-descriptions-item> |
| | | <el-descriptions-item label="æ½å·¥åä½èç³»çµè¯" |
| | | ><el-input |
| | | clearable |
| | | type="tel" |
| | | v-model="formObj.csConstructionContactsTel" |
| | | 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.csEmployerUnit" |
| | | placeholder="建设åä½" |
| | | /></el-descriptions-item> |
| | | <!-- <el-descriptions-item label="ä¸ä¸»åä½è系人" |
| | | ><el-input |
| | | clearable |
| | | v-model="formObj.csEmployerContacts" |
| | | placeholder="ä¸ä¸»åä½è系人" |
| | | /></el-descriptions-item> |
| | | <el-descriptions-item label="ä¸ä¸»åä½èç³»çµè¯" |
| | | ><el-input |
| | | clearable |
| | | type="tel" |
| | | v-model="formObj.csEmployerContactsTel" |
| | | placeholder="ä¸ä¸»åä½èç³»çµè¯" |
| | | > |
| | | <template #prepend> |
| | | <el-icon><Iphone /></el-icon> |
| | | </template> </el-input |
| | | ></el-descriptions-item> --> |
| | | </el-descriptions> |
| | | </template> |
| | | |
| | | <script setup> |
| | |
| | | import { useFormConfirm } from '@/composables/formConfirm'; |
| | | |
| | | const props = defineProps({ |
| | | scene: Object, |
| | | //å·¥å°é¢å¤ä¿¡æ¯ |
| | | formInfo: Object, |
| | | //åºæ¯ç±»åï¼å·¥å° |
| | | sceneType: { |
| | | type: Number, |
| | | default: 1, |
| | | default: 1 |
| | | }, |
| | | // å±ç¤ºæ ·å¼ formï¼è¡¨åï¼descriptionsï¼æè¿°å表 |
| | | showStyle: { |
| | | type: String, |
| | | default: 'descriptions' |
| | | // default:'form' |
| | | }, |
| | | title: String |
| | | }); |
| | | const fontSize = ref('small'); |
| | | const emit = defineEmits(['onSubmit', 'onCancel']); |
| | | |
| | | const { formObj, formRef, edit, onSubmit, onReset } = useFormConfirm({ |
| | | submit: { |
| | | do: submit, |
| | | do: submit |
| | | }, |
| | | cancel: { |
| | | do: cancel, |
| | | }, |
| | | do: cancel |
| | | } |
| | | }); |
| | | const loading = ref(false); |
| | | const status = reactive(enumStatusNA()); |
| | |
| | | { |
| | | required: true, |
| | | message: 'å·¥ç¨ç±»åä¸è½ä¸ºç©º', |
| | | trigger: 'blur', |
| | | }, |
| | | trigger: 'blur' |
| | | } |
| | | ], |
| | | csStatus: [ |
| | | { |
| | | required: true, |
| | | message: 'å»ºè®¾ç¶æä¸è½ä¸ºç©º', |
| | | trigger: 'change', |
| | | }, |
| | | trigger: 'change' |
| | | } |
| | | ], |
| | | siExtension1: [ |
| | | { |
| | | required: true, |
| | | message: 'æ½å·¥é¶æ®µä¸è½ä¸ºç©º', |
| | | trigger: 'change', |
| | | }, |
| | | ], |
| | | trigger: 'change' |
| | | } |
| | | ] |
| | | }); |
| | | |
| | | // åå»ºææ´æ°åºæ¯è¯¦æ
|
| | |
| | | formObj.value = nValue; |
| | | formObj.value._timeRange = [ |
| | | new Date(formObj.value.csStartTime), |
| | | new Date(formObj.value.csEndTime), |
| | | new Date(formObj.value.csEndTime) |
| | | ]; |
| | | } |
| | | }, |