ÎļþÃû´Ó src/views/eam/DailyMaintenanceOrderList3m.vue ÐÞ¸Ä |
| | |
| | | v-if="record.status == '1'" |
| | | type="vertical" |
| | | /> |
| | | <a |
| | | <!-- <a |
| | | v-if="record.status === '2'" |
| | | @click="handleOrderChange(record)" |
| | | >计ååæ´</a> |
| | | <a-divider |
| | | v-if="record.status == '2'" |
| | | type="vertical" |
| | | /> |
| | | /> --> |
| | | <a-popconfirm |
| | | title="ç¡®å®æ¤åå·¥åå?" |
| | | @confirm="() => handleOrderReset(record)" |
| | |
| | | type="vertical" |
| | | /> --> |
| | | <a |
| | | v-if="record.status === '5' || record.status === '8' " |
| | | v-if="record.status === '5' && record.isNotStoveCategoryFlag == false && record.precisionParameters == '1' && (record.precisionInspectionStatus == '0' ||record.precisionInspectionStatus == '1' ||record.precisionInspectionStatus == '2' ||record.precisionInspectionStatus == '3' ||record.precisionInspectionStatus == '4')" |
| | | @click="handlePrecisionCheckOrder(record)" |
| | | >精度æ£éª</a> |
| | | <a-divider |
| | | v-if="record.status === '5'|| record.status === '8'" |
| | | v-if="record.status === '5'&& record.isNotStoveCategoryFlag == false && record.precisionParameters == '1' && (record.precisionInspectionStatus == '0' ||record.precisionInspectionStatus == '1' ||record.precisionInspectionStatus == '2' ||record.precisionInspectionStatus == '3' ||record.precisionInspectionStatus == '4')" |
| | | type="vertical" |
| | | /> |
| | | <a |
| | | v-if="record.status === '5' && record.isNotStoveCategoryFlag == true && (record.stoveExemptStatus == '0' ||record.stoveExemptStatus == '1' ||record.stoveExemptStatus == '2')" |
| | | @click="handleStoveDetection(record)" |
| | | >çç±»æ£æµ</a> |
| | | <a-divider |
| | | v-if="record.status === '5'&& record.isNotStoveCategoryFlag == true && (record.stoveExemptStatus == '0' ||record.stoveExemptStatus == '1' ||record.stoveExemptStatus == '2')" |
| | | type="vertical" |
| | | /> |
| | | <a |
| | | v-if="record.status === '5' && record.isNotStoveCategoryFlag == false && record.precisionParameters == '0'" |
| | | @click="handleTechnologyStatus(record)" |
| | | >ææ¯ç¶æé´å®</a> |
| | | <a-divider |
| | | v-if="record.status === '5'&& record.isNotStoveCategoryFlag == false && record.precisionParameters == '0' " |
| | | type="vertical" |
| | | /> |
| | | <a-dropdown> |
| | |
| | | slot-scope="text, record" |
| | | > |
| | | <a |
| | | v-if="record.status === '3' || record.status === '4' ||record.status === '5' ||record.status === '7' ||record.status === '8'" |
| | | v-if="record.status === '3' || record.status === '4' ||record.status === '5' ||record.status === '7' " |
| | | class="lot" |
| | | @click="handleOrderExe(record)" |
| | | >{{record.num}}</a> |
| | |
| | | ref="EquipmentPrecisionCheckOrderModal" |
| | | @ok="modalFormOk" |
| | | ></equipment-precision-check-order-modal> |
| | | <stove-category-modal |
| | | ref="StoveCategoryModal" |
| | | @ok="modalFormOk" |
| | | ></stove-category-modal> |
| | | <maintenance-order-assign-modal |
| | | ref="MaintenanceOrderAssignModal" |
| | | @ok="modalFormOk" |
| | |
| | | ref="DailyMaintenanceOrderExeDrawer" |
| | | @ok="modalFormOk" |
| | | ></daily-maintenance-order-exe-drawer> |
| | | <equipment-technology-status-modal |
| | | ref="EquipmentTechnologyStatusModal" |
| | | @ok="modalFormOk" |
| | | ></equipment-technology-status-modal> |
| | | </a-card> |
| | | </template> |
| | | |
| | |
| | | import MaintenanceOrderModal from './modules/dailyMaintenanceOrder/MaintenanceOrderModal' |
| | | import FinishDevolutionModal from './modules/dailyMaintenanceOrder/FinishDevolutionModal' |
| | | import MaintenanceOrderChangeModal from './modules/dailyMaintenanceOrder/MaintenanceOrderChangeModal' |
| | | import EquipmentPrecisionCheckOrderModal from './modules/dailyMaintenanceOrder/EquipmentPrecisionCheckOrderModal' |
| | | import EquipmentPrecisionCheckOrderModal from './modules/daily3MaintenanceOrder/EquipmentPrecisionCheckOrderModal' |
| | | import StoveCategoryModal from './modules/daily3MaintenanceOrder/StoveCategoryModal' |
| | | import MaintenanceOrderAssignModal from './modules/dailyMaintenanceOrder/MaintenanceOrderAssignModal' |
| | | import DailyMaintenanceOrderExeDrawer from './modules/dailyMaintenanceOrder/DailyMaintenanceOrderExeDrawer' |
| | | import DailyMaintenanceOrderExeDrawer from './modules/daily3MaintenanceOrder/DailyMaintenanceOrderExeDrawer' |
| | | import EquipmentTechnologyStatusModal from './modules/daily3MaintenanceOrder/EquipmentTechnologyStatusModal' |
| | | import { getAction, postAction, requestPut } from '@/api/manage' |
| | | |
| | | export default { |
| | |
| | | MaintenanceOrderAssignModal, |
| | | EquipmentPrecisionCheckOrderModal, |
| | | DailyMaintenanceOrderExeDrawer, |
| | | MaintenanceOrderChangeModal |
| | | MaintenanceOrderChangeModal, |
| | | StoveCategoryModal, |
| | | EquipmentTechnologyStatusModal |
| | | }, |
| | | data() { |
| | | return { |
| | | description: 'æ¥å¸¸ä¿å
Ȍᴌ', |
| | | description: 'ä¸çº§ä¿å
Ȍᴌ', |
| | | queryParam: { maintenanceType: '3' }, |
| | | // 表头 |
| | | columns: [ |
| | | { |
| | |
| | | } |
| | | }, |
| | | { |
| | | title: 'ç¶æ', |
| | | align: "center", |
| | | dataIndex: 'statusName' |
| | | }, |
| | | { |
| | | title: 'ä¿å
»å·¥åå·', |
| | | align: "center", |
| | | dataIndex: 'num', |
| | | scopedSlots: { customRender: 'num' } |
| | | }, |
| | | { |
| | | title: 'ç¶æ', |
| | | align: "center", |
| | | dataIndex: 'statusName' |
| | | }, |
| | | { |
| | | title: 'ä¿å
»å¨æ', |
| | |
| | | } |
| | | ], |
| | | url: { |
| | | list: "/eam/dailyMaintenanceOrder/getDailyMaintenanceOrderList", |
| | | list: "/eam/dailyMaintenanceOrder/getDailyMaintenanceOrder3List", |
| | | delete: "/eam/dailyMaintenanceOrder/delete", |
| | | deleteBatch: "/eam/dailyMaintenanceOrder/deleteBatch", |
| | | exportXlsUrl: "/eam/dailyMaintenanceOrder/exportXls", |
| | |
| | | this.$refs.EquipmentPrecisionCheckOrderModal.disableSubmit = false; |
| | | }, |
| | | |
| | | handleOrderChange: function (record) { |
| | | handleTechnologyStatus: function (record) { |
| | | this.$refs.EquipmentTechnologyStatusModal.edit(record); |
| | | this.$refs.EquipmentTechnologyStatusModal.title = "ææ¯ç¶æç¼è¾"; |
| | | this.$refs.EquipmentTechnologyStatusModal.disableSubmit = false; |
| | | }, |
| | | |
| | | handleStoveDetection: function (record) { |
| | | this.$refs.StoveCategoryModal.edit(record); |
| | | this.$refs.StoveCategoryModal.title = "温度ååæ§æ£æµæ¡ä»¶ç¡®è®¤è¡¨"; |
| | | this.$refs.StoveCategoryModal.disableSubmit = false; |
| | | }, |
| | | |
| | | handleOrderChange: function (record) { |
| | | this.$refs.MaintenanceOrderChangeModal.edit(record); |
| | | this.$refs.MaintenanceOrderChangeModal.title = "ç产设å¤ä¿å
»è®¡ååæ´ç³è¯·å"; |
| | | this.$refs.MaintenanceOrderChangeModal.title = "温度ååæ§æ£æµæ¡ä»¶ç¡®è®¤è¡¨"; |
| | | this.$refs.MaintenanceOrderChangeModal.disableSubmit = false; |
| | | }, |
| | | |
| | |
| | | <template> |
| | | <a-card |
| | | :bordered="false" |
| | | title="æ¥å¸¸ç¹æ£å·¥å" |
| | | title="æ¥ä¿å¨ä¿å·¥å" |
| | | > |
| | | <!-- æ¥è¯¢åºå --> |
| | | <div class="table-page-search-wrapper"> |
| | |
| | | <template> |
| | | <a-card |
| | | title="æ¥å¸¸ç¹æ£" |
| | | title="æ¥ä¿å¨ä¿æ å" |
| | | :bordered='false' |
| | | > |
| | | <div class='table-page-search-wrapper'> |
| | |
| | | <template> |
| | | <a-card |
| | | :bordered="false" |
| | | title="æ¥å¸¸ä¿å
Ȍᴌ" |
| | | title="äºçº§ä¿å
Ȍᴌ" |
| | | > |
| | | <!-- æ¥è¯¢åºå --> |
| | | <div class="table-page-search-wrapper"> |
| | |
| | | }, |
| | | data() { |
| | | return { |
| | | description: 'æ¥å¸¸ä¿å
Ȍᴌ', |
| | | description: 'äºçº§ä¿å
Ȍᴌ', |
| | | queryParam: { maintenanceType: '2' }, |
| | | // 表头 |
| | | columns: [ |
| | | { |
| | |
| | | } |
| | | }, |
| | | { |
| | | title: 'ç¶æ', |
| | | align: "center", |
| | | dataIndex: 'statusName' |
| | | }, |
| | | { |
| | | title: 'ä¿å
»å·¥åå·', |
| | | align: "center", |
| | | dataIndex: 'num', |
| | | scopedSlots: { customRender: 'num' } |
| | | }, |
| | | { |
| | | title: 'ç¶æ', |
| | | align: "center", |
| | | dataIndex: 'statusName' |
| | | }, |
| | | // { |
| | | // title: 'ä¿å
»ç±»å', |
| | | // align: "center", |
| | | // dataIndex: 'maintenanceTypeName', |
| | | // }, |
| | | { |
| | | title: 'ä¿å
»å¨æ', |
| | | align: "center", |
| | |
| | | }, |
| | | |
| | | handlePrintInfo(record) { |
| | | let href = `${window._CONFIG['domianURL']}/jmreport/view/857408393168490496?id=`+record.id; //ç½ç«é¾æ¥ |
| | | let href = `${window._CONFIG['domianURL']}/jmreport/view/857408393168490496?id=` + record.id; //ç½ç«é¾æ¥ |
| | | window.open(href, "_blank"); |
| | | }, |
| | | |
| | |
| | | font-weight: bold; |
| | | } |
| | | .yellow { |
| | | color: yellow; |
| | | color: rgba(255, 255, 0, 0.443); |
| | | font-weight: bold; |
| | | } |
| | | .fontweight { |
| | |
| | | <template> |
| | | <a-card |
| | | title="æ¥å¸¸ä¿å
»æ å" |
| | | title="卿æ§ä¿å
»æ å" |
| | | :bordered='false' |
| | | > |
| | | <div class='table-page-search-wrapper'> |
¶Ô±ÈÐÂÎļþ |
| | |
| | | <template> |
| | | <a-drawer |
| | | :title="title" |
| | | :width="drawerWidth" |
| | | :visible="visible" |
| | | @close="handleCancel" |
| | | :confirmLoading="confirmLoading" |
| | | :maskClosable="maskClosable" |
| | | > |
| | | <a-card :style="getBackground()"> |
| | | <template> |
| | | <a-card> |
| | | <div :style="{width: '100%',border: '1px solid #e9e9e9',padding: '10px 16px',background: '#fff',}"> |
| | | <a-row :style="{textAlign:'left'}"> |
| | | <a-button |
| | | :style="{marginRight: '8px'}" |
| | | @click="handleSW" |
| | | :disabled=SWbuttonDistable |
| | | type="primary" |
| | | v-has="'dailyMaintenanceOrder:SW'" |
| | | >å¼å·¥</a-button> |
| | | <a-button |
| | | :style="{marginRight: '8px'}" |
| | | @click="handleReport" |
| | | :disabled="buttonDistable" |
| | | type="primary" |
| | | v-has="'dailyMaintenanceOrder:report'" |
| | | >æ¥å·¥</a-button> |
| | | <a-button |
| | | :style="{marginRight: '8px'}" |
| | | @click="handleReset" |
| | | :disabled="revocationDistable" |
| | | type="primary" |
| | | v-has="'dailyMaintenanceOrder:reset'" |
| | | >æ¤é</a-button> |
| | | </a-row> |
| | | </div> |
| | | <div :style="{width: '100%',border: '1px solid #e9e9e9',padding: '10px 16px',background: '#fff',}"> |
| | | <a-row :gutter="24"> |
| | | <a-col :span="6"> |
| | | <a-form-item |
| | | :labelCol="labelCol" |
| | | :wrapperCol="wrapperCol" |
| | | label="ç¶æ" |
| | | class="hightColor" |
| | | > |
| | | <span |
| | | v-if="this.model != null" |
| | | class="hightColor" |
| | | >{{ this.model.statusName }}</span> |
| | | <span |
| | | v-else |
| | | class="frozenRowClass" |
| | | >-</span> |
| | | </a-form-item> |
| | | </a-col> |
| | | <a-col :span="6"> |
| | | <a-form-item |
| | | :labelCol="{span:8}" |
| | | :wrapperCol="{span:16}" |
| | | label="ä¿å
»å·¥åå·" |
| | | class="hightColor" |
| | | > |
| | | <span |
| | | v-if="this.model != null" |
| | | class="hightColor" |
| | | >{{ this.model.num }}</span> |
| | | <span |
| | | v-else |
| | | class="frozenRowClass" |
| | | >-</span> |
| | | </a-form-item> |
| | | </a-col> |
| | | <a-col :span="6"> |
| | | <a-form-item |
| | | :labelCol="labelCol" |
| | | :wrapperCol="wrapperCol" |
| | | label="使ç¨é¨é¨" |
| | | class="hightColor" |
| | | > |
| | | <span |
| | | v-if="this.model != null" |
| | | class="hightColor" |
| | | >{{ this.model.departName }}</span> |
| | | <span |
| | | v-else |
| | | class="frozenRowClass" |
| | | >-</span> |
| | | </a-form-item> |
| | | </a-col> |
| | | <a-col :span="6"> |
| | | <a-form-item |
| | | :labelCol="labelCol" |
| | | :wrapperCol="wrapperCol" |
| | | label="责任çç»" |
| | | class="hightColor" |
| | | > |
| | | <span |
| | | v-if="this.model != null" |
| | | class="hight" |
| | | >{{ this.model.teamName }}</span> |
| | | <span |
| | | v-else |
| | | class="frozenRowClass" |
| | | >-</span> |
| | | </a-form-item> |
| | | </a-col> |
| | | </a-row> |
| | | <a-row :gutter="24"> |
| | | <a-col :span="24"> |
| | | <a-form-item |
| | | label="é®é¢åå¤çæªæ½æè¿°" |
| | | :labelCol="{span:3}" |
| | | :wrapperCol="{span:18}" |
| | | class="hightColor" |
| | | > |
| | | <a-textarea |
| | | allowClear |
| | | :disabled="this.model.status!='4'" |
| | | :placeholder="'请è¾å
¥é®é¢åå¤çæªæ½æè¿°'" |
| | | v-model="model.description" |
| | | /> |
| | | </a-form-item> |
| | | </a-col> |
| | | </a-row> |
| | | </div> |
| | | |
| | | <a-tabs |
| | | type="card" |
| | | defaultActiveKey="1" |
| | | > |
| | | <a-tab-pane |
| | | tab='ä¿å
»æç»' |
| | | key="1" |
| | | class="hightColor" |
| | | > |
| | | |
| | | <div> |
| | | <a-table |
| | | ref="table" |
| | | size="middle" |
| | | bordered |
| | | rowKey="id" |
| | | :columns="columns" |
| | | :dataSource="dataSource" |
| | | :loading="loading" |
| | | @change="handleTableChange" |
| | | :pagination="ipagination" |
| | | > |
| | | <!-- :scroll="{ x: 'calc(1200px + 50%)', y: 900 }" --> |
| | | <!-- :scroll="{x:true}" --> |
| | | <template |
| | | v-for="col in columns" |
| | | :slot="col.dataIndex" |
| | | slot-scope='text, record, index' |
| | | > |
| | | <div :key="col.dataIndex"> |
| | | <span |
| | | v-if=" col.dataIndex == 'photo' && !text" |
| | | style="font-size: 12px;font-style: italic;" |
| | | >æ å¾ç</span> |
| | | <img |
| | | v-if="col.dataIndex == 'photo' && text" |
| | | :src="getImgView(text)" |
| | | :preview="record.maintenanceStandardDetailId" |
| | | height="25px" |
| | | alt="" |
| | | style="max-width:80px;font-size: 12px;font-style: italic;" |
| | | /> |
| | | <!-- 示æå¾ å¼å§ --> |
| | | <!-- <Tooltip |
| | | placement="top" |
| | | title="é¢è§å¾ç" |
| | | > |
| | | <img |
| | | v-if=" col.dataIndex == 'photo' && record.sketchPhoto.path && (record.sketchPhoto.format.toLowerCase()=='jpg'||record.sketchPhoto.format.toLowerCase()=='bmp'||record.sketchPhoto.format.toLowerCase()=='png'||record.sketchPhoto.format.toLowerCase()=='jpeg'||record.sketchPhoto.format.toLowerCase()=='gif')" |
| | | width="30" |
| | | height="14" |
| | | border="1" |
| | | draggable="false" |
| | | preview="1" |
| | | :preview-text="''" |
| | | :src="record.sketchPhoto.src" |
| | | /> |
| | | </Tooltip> |
| | | |
| | | <a |
| | | v-if=" col.dataIndex == 'photo' && record.sketchPhoto.path && record.sketchPhoto.format.toLowerCase()=='pdf'" |
| | | href="javascript:;" |
| | | @click="viewP(record.sketchPhoto)" |
| | | > |
| | | é¢è§ |
| | | </a> --> |
| | | |
| | | <a-input |
| | | :value="text" |
| | | v-if="col.dataIndex == 'maintenanceOrderDetailUda1'" |
| | | @change="(e)=>handleChange(e, record.key, col, index)" |
| | | /> |
| | | </div> |
| | | </template> |
| | | </a-table> |
| | | <div :style="{width: '100%',border: '1px solid #e9e9e9',padding: '10px 16px',background: '#fff',}"> |
| | | <a-row :style="{textAlign:'right'}"> |
| | | <a-button |
| | | :style="{marginRight: '8px'}" |
| | | @click="handleCancel" |
| | | > |
| | | åæ¶ |
| | | </a-button> |
| | | <a-button |
| | | @click="handleOk()" |
| | | type="primary" |
| | | :disabled="this.model.status!='4'" |
| | | :loading="confirmLoading" |
| | | >ä¿å</a-button> |
| | | </a-row> |
| | | <!-- v-has="'dailyMaintenanceOrder:actualWorkHoursSave'" --> |
| | | <!-- :disabled="false" --> |
| | | </div> |
| | | </div> |
| | | </a-tab-pane> |
| | | |
| | | <a-tab-pane |
| | | tab='计åç¨æ' |
| | | key="2" |
| | | > |
| | | <div |
| | | class="table-operator" |
| | | style="margin:-16px" |
| | | > |
| | | <maintenance-standard-planning-material :maintenanceStandardId='maintenanceStandardId' /> |
| | | </div> |
| | | </a-tab-pane> |
| | | <a-tab-pane |
| | | tab='å±é©é²æ§' |
| | | key="3" |
| | | > |
| | | <div |
| | | class="table-operator" |
| | | style="margin:-16px" |
| | | > |
| | | <maintenance-standard-safety-requirement :maintenanceStandardId='maintenanceStandardId' /> |
| | | </div> |
| | | </a-tab-pane> |
| | | <a-tab-pane |
| | | tab='ä½ä¸æå¯¼ä¹¦' |
| | | key="4" |
| | | > |
| | | <div |
| | | class="table-operator" |
| | | style="margin:-16px" |
| | | > |
| | | <maintenance-standard-work-instruction :maintenanceStandardId='maintenanceStandardId' /> |
| | | </div> |
| | | </a-tab-pane> |
| | | <a-tab-pane |
| | | tab='å®é
ç¨æ' |
| | | key="5" |
| | | > |
| | | <div |
| | | class="table-operator" |
| | | style="margin:-16px" |
| | | > |
| | | <actual-material-edit-table |
| | | :dailyMaintenanceOrderId="this.model.id" |
| | | :dailyMaintenanceOrderStatus="this.model.status" |
| | | :equipmentId="this.model.equipmentId" |
| | | ></actual-material-edit-table> |
| | | </div> |
| | | </a-tab-pane> |
| | | <a-tab-pane |
| | | tab='å®é
å·¥æ¶' |
| | | key="6" |
| | | > |
| | | <div |
| | | class="table-operator" |
| | | style="margin:-16px" |
| | | > |
| | | <actual-work-hours-edit-table |
| | | :dailyMaintenanceOrderId="this.model.id" |
| | | :dailyMaintenanceOrderStatus="this.model.status" |
| | | :equipmentId="this.model.equipmentId" |
| | | :teamId="this.model.teamId" |
| | | ></actual-work-hours-edit-table> |
| | | </div> |
| | | </a-tab-pane> |
| | | </a-tabs> |
| | | </a-card> |
| | | </template> |
| | | </a-card> |
| | | |
| | | <div :style="{width: '100%',border: '1px solid #e9e9e9',padding: '10px 16px',background: '#fff',}"> |
| | | <a-row :style="{textAlign:'right'}"> |
| | | <a-button |
| | | :style="{marginRight: '8px'}" |
| | | @click="handleCancel" |
| | | > |
| | | åæ¶ |
| | | </a-button> |
| | | <a-button |
| | | :style="{marginRight: '8px'}" |
| | | @click="handleTS" |
| | | :disabled="buttonDistable" |
| | | type="primary" |
| | | v-if="false" |
| | | >æå</a-button> |
| | | <a-button |
| | | @click="handleOk" |
| | | :disabled="buttonDistable" |
| | | type="primary" |
| | | v-if="false" |
| | | >ä¿å</a-button> |
| | | </a-row> |
| | | </div> |
| | | </a-drawer> |
| | | </template> |
| | | |
| | | <script> |
| | | import { JeecgListMixin } from '@/mixins/JeecgListMixin' |
| | | import { requestPut, getAction, downFile, postAction } from '@/api/manage' |
| | | import Tooltip from 'ant-design-vue/es/tooltip' |
| | | |
| | | import { preview } from 'vue-photo-preview' |
| | | import { ACCESS_TOKEN } from '@/store/mutation-types' |
| | | import Vue from 'vue' |
| | | import PdfView from '@views/common/PdfView' |
| | | import { getFileAccessHttpUrl } from '@/api/manage'; |
| | | |
| | | import MaintenanceStandardPlanningMaterial from '../dailyMaintenanceOrder/MaintenanceStandardPlanningMaterial' |
| | | import MaintenanceStandardSafetyRequirement from '../dailyMaintenanceOrder/MaintenanceStandardSafetyRequirement' |
| | | import MaintenanceStandardWorkInstruction from '../dailyMaintenanceOrder/MaintenanceStandardWorkInstruction' |
| | | import ActualMaterialEditTable from '../dailyMaintenanceOrder/ActualMaterialEditTable.vue' |
| | | import ActualWorkHoursEditTable from '../dailyMaintenanceOrder/ActualWorkHoursEditTable.vue' |
| | | |
| | | export default { |
| | | name: 'DailyMaintenanceOrderExeDrawer', |
| | | mixins: [JeecgListMixin], |
| | | components: { |
| | | PdfView, |
| | | preview, |
| | | Tooltip, |
| | | MaintenanceStandardPlanningMaterial, |
| | | MaintenanceStandardSafetyRequirement, |
| | | MaintenanceStandardWorkInstruction, |
| | | ActualMaterialEditTable, |
| | | ActualWorkHoursEditTable |
| | | }, |
| | | data() { |
| | | return { |
| | | title: "æ¥å¸¸ä¿å
»å·¥åæ§è¡", |
| | | visible: false, |
| | | maskClosable: true, |
| | | confirmLoading: false, |
| | | drawerWidth: "100%", |
| | | buttonDistable: false, |
| | | SWbuttonDistable: false, |
| | | revocationDistable: false, |
| | | currentNodeSelect: '', |
| | | maintenanceStandardId: '-1', |
| | | loading: false, |
| | | dataSource: [], |
| | | model: {}, |
| | | form: this.$form.createForm(this), |
| | | labelCol: { |
| | | xs: { span: 24 }, |
| | | sm: { span: 6 }, |
| | | }, |
| | | wrapperCol: { |
| | | xs: { span: 24 }, |
| | | sm: { span: 18 }, |
| | | }, |
| | | validatorRules: { |
| | | // description: { |
| | | // rules: [ |
| | | // { required: true, message: '请è¾å
¥æè¿°!' }, |
| | | // ] |
| | | // } |
| | | }, |
| | | columns: [ |
| | | { |
| | | title: '#', |
| | | dataIndex: '', |
| | | key: 'rowIndex', |
| | | align: 'center', |
| | | width: 60, |
| | | customRender: function (t, r, index) { |
| | | return parseInt(index) + 1 |
| | | } |
| | | |
| | | }, |
| | | { |
| | | title: 'é¨ä½', |
| | | align: 'center', |
| | | dataIndex: 'location', |
| | | }, |
| | | // class: "notshow" |
| | | { |
| | | title: '示æå¾', |
| | | align: 'center', |
| | | dataIndex: 'photo', |
| | | scopedSlots: { customRender: 'photo' }, |
| | | }, |
| | | // class: "notshow" |
| | | { |
| | | title: 'ä¿å
»é¡¹ç®', |
| | | align: 'center', |
| | | dataIndex: 'maintenanceProjectNum', |
| | | }, |
| | | { |
| | | title: 'ä¿å
»æ å', |
| | | align: 'center', |
| | | dataIndex: 'standard', |
| | | }, |
| | | // { |
| | | // title: 'æ¹æ³', |
| | | // align: 'center', |
| | | // dataIndex: 'maintenanceMethodName', |
| | | // }, |
| | | // { |
| | | // title: 'å·¥å
·', |
| | | // align: 'center', |
| | | // dataIndex: 'maintenanceTool', |
| | | // }, |
| | | { |
| | | title: 'å®å
¨è¦æ±', |
| | | align: 'center', |
| | | dataIndex: 'maintenanceRequire', |
| | | }, |
| | | { |
| | | title: 'å·¥æ¶å®é¢ï¼å°æ¶ï¼', |
| | | align: 'center', |
| | | dataIndex: 'workingHourQuota', |
| | | }, |
| | | { |
| | | title: 'ä¿å
»å¨æ', |
| | | align: 'center', |
| | | dataIndex: 'maintenanceCycleName', |
| | | }, |
| | | { |
| | | title: 'ç»´ä¿ä¸ä¸', |
| | | align: 'center', |
| | | dataIndex: 'maintenanceSpecialtyName', |
| | | }, |
| | | { |
| | | title: 'ä¿å
»äºº', |
| | | align: 'center', |
| | | dataIndex: 'maintenanceOrderDetailUda1', |
| | | width: 200, |
| | | scopedSlots: { customRender: 'maintenanceOrderDetailUda1' }, |
| | | }, |
| | | ], |
| | | url: { |
| | | list: "/eam/dailyMaintenanceOrderDetail/getDailyMaintenanceOrderDetailList", |
| | | urlDownload: window._CONFIG['staticDomainURL'], |
| | | download: '/sys/upload/downloadFile', |
| | | editStatus: "/eam/dailyMaintenanceOrder/editStatus", |
| | | revocation: "/eam/dailyMaintenanceOrder/revocation3M", |
| | | report: "/eam/dailyMaintenanceOrder/report3M", |
| | | edit: "/eam/dailyMaintenanceOrderDetail/edit" |
| | | }, |
| | | } |
| | | }, |
| | | mounted() { |
| | | this.$bus.$on('closeDrawer', (data) => { |
| | | this.visible = false; |
| | | }) |
| | | }, |
| | | |
| | | methods: { |
| | | |
| | | handleShow(record) { |
| | | this.model = Object.assign({}, record); |
| | | this.maintenanceStandardId = record.maintenanceStandardId |
| | | this.dataSource = [] |
| | | this.visible = true; |
| | | this.queryParam.dailyMaintenanceOrderId = record.id |
| | | this.loadData1(1) |
| | | }, |
| | | |
| | | loadData1(arg) { |
| | | if (!this.url.list) { |
| | | this.$message.error("请设置url.list屿§!") |
| | | return |
| | | } |
| | | //å è½½æ°æ® è¥ä¼ å
¥åæ°1åå 载第ä¸é¡µçå
容 |
| | | if (arg === 1) { |
| | | this.ipagination.current = 1; |
| | | } |
| | | var params = this.getQueryParams();//æ¥è¯¢æ¡ä»¶ |
| | | this.loading = true; |
| | | getAction(this.url.list, params).then((res) => { |
| | | if (res.success) { |
| | | // for (let i = 0; i < res.result.records.length; i++) { |
| | | // let r = res.result.records[i].sketchPhoto; |
| | | // r.src = this.getSrc(res.result.records[i].sketchPhoto); |
| | | // } |
| | | //update-begin---author:zhangyafei Date:20201118 forï¼éé
ä¸åé¡µçæ°æ®å表------------ |
| | | this.dataSource = res.result.records || res.result; |
| | | if (res.result.total) { |
| | | this.ipagination.total = res.result.total; |
| | | } else { |
| | | this.ipagination.total = 0; |
| | | } |
| | | //update-end---author:zhangyafei Date:20201118 forï¼éé
ä¸åé¡µçæ°æ®å表------------ |
| | | } else { |
| | | this.$message.warning(res.message) |
| | | } |
| | | }).finally(() => { |
| | | this.loading = false |
| | | }) |
| | | }, |
| | | |
| | | modalFormOk() { |
| | | //æ¸
空å表éä¸ |
| | | this.onClearSelected() |
| | | }, |
| | | loadData() { |
| | | }, |
| | | getBackground() { |
| | | return "background-color:rgba(127, 127, 127,0.08)"; |
| | | }, |
| | | handleCancel() { |
| | | this.$emit('ok'); |
| | | this.alterFlag = new Date(); |
| | | this.close() |
| | | }, |
| | | close() { |
| | | this.visible = false; |
| | | }, |
| | | //æå |
| | | handleTS() { |
| | | |
| | | }, |
| | | //å¼å·¥ |
| | | handleSW() { |
| | | const that = this; |
| | | that.confirmLoading = true; |
| | | this.$confirm({ |
| | | title: 'ä¿å
»å·¥åå¼å·¥', |
| | | content: 'æç¤ºï¼å¼å·¥åæ æ³æ¤åï¼è¯·è°¨æ
æä½ï¼', |
| | | okText: '确认', |
| | | cancelText: 'åæ¶', |
| | | onOk() { |
| | | requestPut(that.url.editStatus, { id: that.model.id, status: '4' }).then((res) => { |
| | | if (res.success) { |
| | | that.model.status = '4' |
| | | that.$message.success("å·¥åå¼å·¥æåï¼") |
| | | that.buttonDistable = false |
| | | that.revocationDistable = true |
| | | that.SWbuttonDistable = true |
| | | } else { |
| | | that.$message.warning("å·¥åå¼å·¥å¤±è´¥ï¼") |
| | | } |
| | | }).finally(() => { |
| | | that.confirmLoading = false; |
| | | // that.close(); |
| | | }) |
| | | }, |
| | | }) |
| | | }, |
| | | //æ¥å·¥ |
| | | handleReport() { |
| | | const that = this; |
| | | that.confirmLoading = true; |
| | | this.$confirm({ |
| | | title: 'ä¿å
»å·¥åæ¥å·¥', |
| | | content: 'æç¤ºï¼æ¥å·¥åä¿å
»å®å·¥ï¼è¯·è°¨æ
æä½ï¼', |
| | | okText: '确认', |
| | | cancelText: 'åæ¶', |
| | | onOk() { |
| | | requestPut(that.url.report, { id: that.model.id, status: '5', description: that.model.description }).then((res) => { |
| | | if (res.success) { |
| | | that.model.status = '5' |
| | | that.$message.success(res.message) |
| | | that.buttonDistable = false |
| | | that.revocationDistable = true |
| | | that.SWbuttonDistable = true |
| | | that.$emit('ok'); |
| | | that.alterFlag = new Date(); |
| | | that.close(); |
| | | } else { |
| | | that.$message.warning(res.message) |
| | | } |
| | | }).finally(() => { |
| | | that.confirmLoading = false; |
| | | // |
| | | }) |
| | | }, |
| | | }) |
| | | }, |
| | | //æ¤é |
| | | handleReset() { |
| | | const that = this; |
| | | that.confirmLoading = true; |
| | | this.$confirm({ |
| | | title: 'å®å·¥æ¤é', |
| | | content: 'æç¤ºï¼å®å·¥æ¤éåå¯ç»§ç»æ¥å·¥æä½ï¼', |
| | | okText: '确认', |
| | | cancelText: 'åæ¶', |
| | | onOk() { |
| | | requestPut(that.url.revocation, { id: that.model.id, status: '4' }).then((res) => { |
| | | if (res.success) { |
| | | that.model.status = '4' |
| | | that.$message.success(res.message) |
| | | that.buttonDistable = false |
| | | that.revocationDistable = true |
| | | that.SWbuttonDistable = true |
| | | } else { |
| | | that.$message.warning(res.message) |
| | | } |
| | | }).finally(() => { |
| | | that.confirmLoading = false; |
| | | // that.close(); |
| | | }) |
| | | }, |
| | | }) |
| | | }, |
| | | //ä¿å |
| | | handleOk() { |
| | | const that = this |
| | | this.loading = true; |
| | | this.form.validateFields((err, values) => { |
| | | if (!err) { |
| | | that.confirmLoading = true |
| | | let formData = {} |
| | | formData.dailyMaintenanceOrderDetails = that.dataSource; |
| | | let obj = obj = postAction(this.url.edit, formData) |
| | | obj.then((res) => { |
| | | if (res.success) { |
| | | that.$message.success(res.message) |
| | | that.$emit('ok') |
| | | } else { |
| | | that.$message.warning(res.message) |
| | | } |
| | | }).finally(() => { |
| | | that.confirmLoading = false |
| | | that.loadData1(); |
| | | this.loading = false; |
| | | }) |
| | | } |
| | | }) |
| | | }, |
| | | |
| | | handleChange(value, key, column, index) { |
| | | let that = this; |
| | | const temp = [...that.dataSource]; |
| | | const target = temp[index]; |
| | | if (target) { |
| | | target[column.dataIndex] = value; |
| | | if ('maintenanceOrderDetailUda1' == column.dataIndex) { |
| | | target['maintenanceOrderDetailUda1'] = value.target.value; |
| | | } |
| | | that.dataSource = temp; |
| | | } |
| | | }, |
| | | |
| | | view(record) { |
| | | this.$refs.pdfview.showPdf(record.src); |
| | | }, |
| | | |
| | | handleDownload(record) { |
| | | downFile(this.url.download, { id: record.upload.id }).then((res) => { |
| | | if (!res) { |
| | | this.$message.warning('æä»¶ä¸è½½å¤±è´¥') |
| | | return |
| | | } else { |
| | | let fileName = record.upload.name; |
| | | if (typeof window.navigator.msSaveBlob !== 'undefined') { |
| | | window.navigator.msSaveBlob(new Blob([res]), fileName); |
| | | } else { |
| | | let url = window.URL.createObjectURL(new Blob([res])); |
| | | let link = document.createElement('a'); |
| | | link.style.display = 'none'; |
| | | link.href = url; |
| | | link.setAttribute('download', fileName); |
| | | document.body.appendChild(link); |
| | | link.click() |
| | | document.body.removeChild(link) //ä¸è½½å®æç§»é¤å
ç´ |
| | | window.URL.revokeObjectURL(url) //éæ¾æblob对象 |
| | | } |
| | | } |
| | | }) |
| | | }, |
| | | |
| | | getSrc(record) { |
| | | if (!record.path) { |
| | | return ''; |
| | | } |
| | | //æ¬å°ï¼local\Minioï¼minio\é¿éäºï¼alioss |
| | | if (record.uploadType == 'local') { |
| | | |
| | | let ssoLoginFlag = Vue.ls.get("ssoLoginFlag"); |
| | | let deployMode = Vue.ls.get("deployMode"); |
| | | |
| | | if (ssoLoginFlag && deployMode == "container") { |
| | | var baseProject = Vue.ls.get("baseProject"); |
| | | console.log("baseProject==>" + baseProject) |
| | | |
| | | var hostname = window.location.protocol + "//" + window.location.host; |
| | | var url = hostname + '/' + baseProject + '/sys/common/static'; |
| | | return getFileAccessHttpUrl(record.path + record.encodeName, url, window._CONFIG['hyperTextTransfer']) |
| | | } else { |
| | | //æ ¹æ®åå¸ç¶æä¿®æ¹https æ http |
| | | return getFileAccessHttpUrl(record.path + record.encodeName, this.url.urlDownload, window._CONFIG['hyperTextTransfer']) |
| | | } |
| | | |
| | | } else if (record.uploadType == 'alioss') { |
| | | |
| | | const OSS = require('ali-oss') |
| | | const client = new OSS({ |
| | | // region以æå·ä¸ºä¾ï¼oss-cn-hangzhouï¼ï¼å
¶ä»regionæå®é
æ
åµå¡«åã |
| | | region: window._CONFIG['region'], |
| | | // é¿éäºä¸»è´¦å·AccessKeyæ¥æææAPIçè®¿é®æéï¼é£é©å¾é«ã强ç建议æ¨å建并使ç¨RAMè´¦å·è¿è¡APIè®¿é®ææ¥å¸¸è¿ç»´ï¼è¯·ç»å½RAMæ§å¶å°å建RAMè´¦å·ã |
| | | accessKeyId: window._CONFIG['accessKeyId'], |
| | | accessKeySecret: window._CONFIG['accessKeySecret'], |
| | | bucket: window._CONFIG['bucket'], |
| | | }) |
| | | // object-key表示ä»OSSä¸è½½æä»¶æ¶éè¦æå®å
嫿件åç¼å¨å
ç宿´è·¯å¾ï¼ä¾å¦abc/efg/123.jpgã |
| | | return client.signatureUrl(record.path) |
| | | } |
| | | }, |
| | | }, |
| | | |
| | | } |
| | | </script> |
| | | |
| | | <style scoped> |
| | | @import '~@assets/less/common.less'; |
| | | .hightColor { |
| | | height: 10%; |
| | | font-weight: bold; |
| | | font-size: 20px; |
| | | color: #1b1e1e; |
| | | } |
| | | .frozenRowClass { |
| | | color: #c9c9c9; |
| | | } |
| | | .fontweight { |
| | | font-weight: bold; |
| | | } |
| | | .hight { |
| | | color: #f5222d; |
| | | } |
| | | /deep/ .red { |
| | | color: red; |
| | | } |
| | | </style> |
ÎļþÃû´Ó src/views/eam/modules/dailyMaintenanceOrder/EquipmentPrecisionCheckOrderModal.vue ÐÞ¸Ä |
| | |
| | | if (res.success) { |
| | | this.dataSource = res.result[0].precisionInspectionDetails |
| | | this.model = Object.assign({}, res.result[0]); |
| | | debugger |
| | | } |
| | | }) |
| | | }, |
¶Ô±ÈÐÂÎļþ |
| | |
| | | <template> |
| | | <a-modal |
| | | :title="title" |
| | | :width="650" |
| | | :visible="visible" |
| | | :maskClosable="false" |
| | | :confirmLoading="confirmLoading" |
| | | :okButtonProps="{ props: {disabled: disableSubmit} }" |
| | | @ok="handleOk" |
| | | @cancel="handleCancel" |
| | | cancelText="å
³é" |
| | | > |
| | | <a-spin :spinning="confirmLoading"> |
| | | <a-form :form="form"> |
| | | <a-row :gutter="24"> |
| | | <a-col :span="24"> |
| | | <a-form-item |
| | | label="ç»ä¸ç¼å·" |
| | | :labelCol="labelCol" |
| | | :wrapperCol="wrapperCol" |
| | | > |
| | | <a-input |
| | | allow-clear |
| | | :disabled="true" |
| | | :placeholder="disableSubmit?'':'请è¾å
¥ç»ä¸ç¼å·'" |
| | | v-decorator="['equipmentNum', validatorRules.equipmentNum ]" |
| | | /> |
| | | </a-form-item> |
| | | </a-col> |
| | | <a-col :span="24"> |
| | | <a-form-item |
| | | label="设å¤åç§°" |
| | | :labelCol="labelCol" |
| | | :wrapperCol="wrapperCol" |
| | | > |
| | | <a-input |
| | | allow-clear |
| | | :disabled="true" |
| | | :placeholder="disableSubmit?'':'请è¾å
¥è®¾å¤åç§°'" |
| | | v-decorator="['equipmentName', validatorRules.equipmentName ]" |
| | | /> |
| | | </a-form-item> |
| | | </a-col> |
| | | <a-col :span="24"> |
| | | <a-form-item |
| | | label="åå·" |
| | | :labelCol="labelCol" |
| | | :wrapperCol="wrapperCol" |
| | | > |
| | | <a-input |
| | | allow-clear |
| | | :disabled="true" |
| | | :placeholder="disableSubmit?'':'请è¾å
¥åå·'" |
| | | v-decorator="['equipmentModel', validatorRules.equipmentModel ]" |
| | | /> |
| | | </a-form-item> |
| | | </a-col> |
| | | <a-col :span="24"> |
| | | <a-form-item |
| | | label="è§æ ¼" |
| | | :labelCol="labelCol" |
| | | :wrapperCol="wrapperCol" |
| | | > |
| | | <a-input |
| | | allow-clear |
| | | :disabled="true" |
| | | :placeholder="disableSubmit?'':'请è¾å
¥è§æ ¼'" |
| | | v-decorator="['specification', validatorRules.specification ]" |
| | | /> |
| | | </a-form-item> |
| | | </a-col> |
| | | <a-col :span="24"> |
| | | <a-form-model-item |
| | | label="ææ¯ç¶æ" |
| | | :labelCol="labelCol" |
| | | :wrapperCol="wrapperCol" |
| | | prop="technologyStatus" |
| | | > |
| | | <j-dict-select-tag |
| | | allow-clear |
| | | placeholder="è¯·éæ©ææ¯ç¶æ" |
| | | :triggerChange="true" |
| | | dictCode="technology_status" |
| | | v-decorator="['technologyStatus', validatorRules.technologyStatus ]" |
| | | /> |
| | | </a-form-model-item> |
| | | </a-col> |
| | | </a-row> |
| | | </a-form> |
| | | </a-spin> |
| | | |
| | | <template slot="footer"> |
| | | <a-button |
| | | :style="{marginRight: '8px'}" |
| | | @click="handleCancel" |
| | | > |
| | | å
³é |
| | | </a-button> |
| | | <a-button |
| | | :disabled="disableSubmit || confirmLoading" |
| | | :loading="confirmLoading" |
| | | @click="handleOk" |
| | | type="primary" |
| | | >ä¿å</a-button> |
| | | <!-- icon="save" --> |
| | | </template> |
| | | |
| | | </a-modal> |
| | | </template> |
| | | |
| | | <script> |
| | | import pick from 'lodash.pick' |
| | | import { postAction, requestPut } from '@/api/manage' |
| | | import { duplicateCheck } from '@/api/api' |
| | | |
| | | export default { |
| | | name: 'EquipmentTechnologyStatusModal', |
| | | data() { |
| | | return { |
| | | title: "æä½", |
| | | visible: false, |
| | | codeDisable: true, |
| | | disableSubmit: false, |
| | | model: {}, |
| | | labelCol: { |
| | | xs: { span: 24 }, |
| | | sm: { span: 5 }, |
| | | }, |
| | | wrapperCol: { |
| | | xs: { span: 24 }, |
| | | sm: { span: 19 }, |
| | | }, |
| | | confirmLoading: false, |
| | | form: this.$form.createForm(this), |
| | | validatorRules: { |
| | | technologyStatus: { |
| | | rules: [ |
| | | { required: true, message: '请è¾å
¥éæ©ææ¯ç¶æ!' }, |
| | | ] |
| | | }, |
| | | |
| | | }, |
| | | url: { |
| | | edit: "/eam/dailyMaintenanceOrder/editTechnologyStatus" |
| | | }, |
| | | //æ°å¢ãç¼è¾ãå é¤ãæ¹éå 餿使¹åæ°æ®åå·æ°å
³èçç»ä»¶ççå¬å±æ§ |
| | | alterFlag: "" |
| | | } |
| | | }, |
| | | created() { |
| | | }, |
| | | methods: { |
| | | |
| | | edit(record) { |
| | | this.form.resetFields(); |
| | | this.model = Object.assign({}, record); |
| | | this.visible = true; |
| | | this.disableSubmit = false; |
| | | this.$nextTick(() => { |
| | | this.form.setFieldsValue(pick(this.model, 'equipmentNum', 'equipmentName', 'equipmentModel', 'specification', 'technologyStatus')) |
| | | }); |
| | | if (record.id) { |
| | | this.codeDisable = true; |
| | | } else { |
| | | this.codeDisable = false; |
| | | } |
| | | }, |
| | | |
| | | close() { |
| | | this.$emit('close'); |
| | | this.visible = false; |
| | | }, |
| | | |
| | | handleOk() { |
| | | const that = this; |
| | | // 触å表åéªè¯ |
| | | this.form.validateFields((err, values) => { |
| | | if (!err) { |
| | | that.confirmLoading = true; |
| | | let formData = Object.assign(this.model, values); |
| | | let obj; |
| | | if (!this.model.id) { |
| | | obj = postAction(this.url.add, formData); |
| | | } else { |
| | | obj = requestPut(this.url.edit, { id: this.model.equipmentId, technologyStatus: this.model.technologyStatus, maintenanceOrderId: this.model.id }); |
| | | } |
| | | obj.then((res) => { |
| | | if (res.success) { |
| | | that.$message.success(res.message); |
| | | that.$emit('ok'); |
| | | that.alterFlag = new Date(); |
| | | } else { |
| | | that.$message.warning(res.message); |
| | | } |
| | | }).finally(() => { |
| | | that.confirmLoading = false; |
| | | that.close(); |
| | | }) |
| | | } |
| | | }) |
| | | }, |
| | | |
| | | handleCancel() { |
| | | this.close() |
| | | }, |
| | | }, |
| | | } |
| | | </script> |
| | | |
| | | <style scoped> |
| | | .ant-btn { |
| | | padding: 0 10px; |
| | | margin-left: 3px; |
| | | } |
| | | |
| | | .ant-form-item-control { |
| | | line-height: 0px; |
| | | } |
| | | |
| | | /** 主表åè¡é´è· */ |
| | | .ant-form .ant-form-item { |
| | | margin-bottom: 10px; |
| | | } |
| | | |
| | | /** Tab页é¢è¡é´è· */ |
| | | .ant-tabs-content .ant-form-item { |
| | | margin-bottom: 0px; |
| | | } |
| | | </style> |
¶Ô±ÈÐÂÎļþ |
| | |
| | | <template> |
| | | <a-modal |
| | | :width="1000" |
| | | :visible="visible" |
| | | :maskClosable="false" |
| | | @ok="handleOk" |
| | | cancelText="å
³é" |
| | | @cancel="handleCancel" |
| | | :confirmLoading="confirmLoading" |
| | | > |
| | | |
| | | <!-- :title="title" --> |
| | | <!-- <a-spin :spinning="confirmLoading"> --> |
| | | <!-- <a-form :form="form"> --> |
| | | <a-divider |
| | | orientation="center" |
| | | style="font-size: large;font-style: normal;font-size: 30px;color: #66aeed;" |
| | | > 温度ååæ§æ£æµæ¡ä»¶ç¡®è®¤è¡¨ </a-divider> |
| | | |
| | | <!-- <div :style="{height: '115px',float: 'left',width: '100%',border: '1px solid #e9e9e9',padding: '50px 20px',background: '#fff',}"> --> |
| | | <span |
| | | class="ant-descriptions-title" |
| | | style="font-size: large;font-style: normal;font-size: 20px;" |
| | | > å¨ä¸ä¿å®æ½è¿ç¨ä¸ï¼è¿è¡äºç»´ä¿®ææ´æ¢ä¸ç¬¦å以䏿¡æ¬¾ä¹ä¸è
å¿
é¡»è¿è¡ç温ååæ§æ£æµå¹¶å¯¹ä¸åæ¡æ¬¾è¿è¡æâ确认ã</span> |
| | | <!-- </div> --> |
| | | <div> |
| | | <div :style="{height: '45px',float: 'left',width: '10%',border: '1px solid #e9e9e9',padding: '10px 10px',background: '#fff',}"> |
| | | <span |
| | | class="ant-descriptions-title" |
| | | style="font-size: large;font-style: normal;font-size: 15px;" |
| | | >åºå·</span> |
| | | </div> |
| | | <div :style="{height: '45px',float: 'left',width: '80%',border: '1px solid #e9e9e9',padding: '10px 10px',background: '#fff',}"> |
| | | <span |
| | | class="ant-descriptions-title" |
| | | style="font-size: large;font-style: normal;font-size: 15px;" |
| | | >ç»´ä¿®ææ´æ¢é¡¹ç®</span> |
| | | </div> |
| | | <div :style="{height: '45px',float: 'right',width: '10%',border: '1px solid #e9e9e9',padding: '10px 10px',background: '#fff',}"> |
| | | <span |
| | | class="ant-descriptions-title" |
| | | style="font-size: large;font-style: normal;font-size: 15px;" |
| | | >æ¯/å¦</span> |
| | | </div> |
| | | </div> |
| | | |
| | | <div> |
| | | <div :style="{height: '45px',float: 'left',width: '10%',border: '1px solid #e9e9e9',padding: '20px 20px',background: '#fff',}"> |
| | | <span |
| | | class="ant-descriptions-title" |
| | | style="font-size: large;font-style: normal;font-size: 15px;" |
| | | >1</span> |
| | | </div> |
| | | <div :style="{height: '45px',float: 'left',width: '80%',border: '1px solid #e9e9e9',padding: '10px 10px',background: '#fff',}"> |
| | | <span |
| | | class="ant-descriptions-title" |
| | | style="font-size: large;font-style: normal;font-size: 15px;" |
| | | >å¢å æé«å·¥ä½æ¸©åº¦æé使ä½å·¥ä½æ¸©åº¦</span> |
| | | </div> |
| | | <div :style="{height: '45px',float: 'right',width: '10%',border: '1px solid #e9e9e9',padding: '10px 10px',background: '#fff',}"> |
| | | <a-switch |
| | | checked-children="æ¯" |
| | | un-checked-children="å¦" |
| | | :checked="model.result_1 == '1'" |
| | | @change="handleSwitch(model.result_1)" |
| | | /> |
| | | </div> |
| | | </div> |
| | | <div> |
| | | <div :style="{height: '45px',float: 'left',width: '10%',border: '1px solid #e9e9e9',padding: '20px 20px',background: '#fff',}"> |
| | | <span |
| | | class="ant-descriptions-title" |
| | | style="font-size: large;font-style: normal;font-size: 15px;" |
| | | >2</span> |
| | | </div> |
| | | <div :style="{height: '45px',float: 'left',width: '80%',border: '1px solid #e9e9e9',padding: '10px 10px',background: '#fff',}"> |
| | | <span |
| | | class="ant-descriptions-title" |
| | | style="font-size: large;font-style: normal;font-size: 15px;" |
| | | >ç忏©åº¦ååæ§åæ´ä¸ºæ´å°ç温度åå·®è¦æ±</span> |
| | | </div> |
| | | <div :style="{height: '45px',float: 'right',width: '10%',border: '1px solid #e9e9e9',padding: '10px 10px',background: '#fff',}"> |
| | | <a-switch |
| | | checked-children="æ¯" |
| | | un-checked-children="å¦" |
| | | :checked="model.result_2 == '1'" |
| | | @change="handle2Switch(model.result_2)" |
| | | /> |
| | | </div> |
| | | </div> |
| | | <div> |
| | | <div :style="{height: '45px',float: 'left',width: '10%',border: '1px solid #e9e9e9',padding: '20px 20px',background: '#fff',}"> |
| | | <span |
| | | class="ant-descriptions-title" |
| | | style="font-size: large;font-style: normal;font-size: 15px;" |
| | | >3</span> |
| | | </div> |
| | | <div :style="{height: '45px',float: 'left',width: '80%',border: '1px solid #e9e9e9',padding: '10px 10px',background: '#fff',}"> |
| | | <span |
| | | class="ant-descriptions-title" |
| | | style="font-size: large;font-style: normal;font-size: 15px;" |
| | | >使ç¨ä¸åçå çç»ä»¶æå çç»ä»¶çç±»åæä½ç½®åå</span> |
| | | </div> |
| | | <div :style="{height: '45px',float: 'right',width: '10%',border: '1px solid #e9e9e9',padding: '10px 10px',background: '#fff',}"> |
| | | <a-switch |
| | | checked-children="æ¯" |
| | | un-checked-children="å¦" |
| | | :checked="model.result_3 == '1'" |
| | | @change="handle3Switch(model.result_3)" |
| | | /> |
| | | </div> |
| | | </div> |
| | | <div> |
| | | <div :style="{height: '45px',float: 'left',width: '10%',border: '1px solid #e9e9e9',padding: '20px 20px',background: '#fff',}"> |
| | | <span |
| | | class="ant-descriptions-title" |
| | | style="font-size: large;font-style: normal;font-size: 15px;" |
| | | >4</span> |
| | | </div> |
| | | <div :style="{height: '45px',float: 'left',width: '80%',border: '1px solid #e9e9e9',padding: '10px 10px',background: '#fff',}"> |
| | | <span |
| | | class="ant-descriptions-title" |
| | | style="font-size: large;font-style: normal;font-size: 15px;" |
| | | >çé£å¾ªç¯è®¾å¤çæ°æµæ¹å¼/éçååçãå¦:æ¡æ¿ä½ç½®ã飿é度ã飿æ°éççåå</span> |
| | | </div> |
| | | <div :style="{height: '45px',float: 'right',width: '10%',border: '1px solid #e9e9e9',padding: '10px 10px',background: '#fff',}"> |
| | | <a-switch |
| | | checked-children="æ¯" |
| | | un-checked-children="å¦" |
| | | :checked="model.result_4 == '1'" |
| | | @change="handle4Switch(model.result_4)" |
| | | /> |
| | | </div> |
| | | </div> |
| | | <div> |
| | | <div :style="{height: '45px',float: 'left',width: '10%',border: '1px solid #e9e9e9',padding: '20px 20px',background: '#fff',}"> |
| | | <span |
| | | class="ant-descriptions-title" |
| | | style="font-size: large;font-style: normal;font-size: 15px;" |
| | | >5</span> |
| | | </div> |
| | | <div :style="{height: '45px',float: 'left',width: '80%',border: '1px solid #e9e9e9',padding: '10px 10px',background: '#fff',}"> |
| | | <span |
| | | class="ant-descriptions-title" |
| | | style="font-size: large;font-style: normal;font-size: 15px;" |
| | | >èçå±ååº¦çæ¹åæä½¿ç¨ä¸åçæ§è½çæ°åèçææ</span> |
| | | </div> |
| | | <div :style="{height: '45px',float: 'right',width: '10%',border: '1px solid #e9e9e9',padding: '10px 10px',background: '#fff',}"> |
| | | <a-switch |
| | | checked-children="æ¯" |
| | | un-checked-children="å¦" |
| | | :checked="model.result_5 == '1'" |
| | | @change="handle5Switch(model.result_5)" |
| | | /> |
| | | </div> |
| | | </div> |
| | | <div> |
| | | <div :style="{height: '45px',float: 'left',width: '10%',border: '1px solid #e9e9e9',padding: '20px 20px',background: '#fff',}"> |
| | | <span |
| | | class="ant-descriptions-title" |
| | | style="font-size: large;font-style: normal;font-size: 15px;" |
| | | >6</span> |
| | | </div> |
| | | <div :style="{height: '45px',float: 'left',width: '80%',border: '1px solid #e9e9e9',padding: '10px 10px',background: '#fff',}"> |
| | | <span |
| | | class="ant-descriptions-title" |
| | | style="font-size: large;font-style: normal;font-size: 15px;" |
| | | >ç空çå çå®¤éæ°è®¾è®¡ææææ¹å</span> |
| | | </div> |
| | | <div :style="{height: '45px',float: 'right',width: '10%',border: '1px solid #e9e9e9',padding: '10px 10px',background: '#fff',}"> |
| | | <a-switch |
| | | checked-children="æ¯" |
| | | un-checked-children="å¦" |
| | | :checked="model.result_6 == '1'" |
| | | @change="handle6Switch(model.result_6)" |
| | | /> |
| | | |
| | | </div> |
| | | </div> |
| | | <div :style="{height: '45px',float: 'left',width: '10%',border: '1px solid #e9e9e9',padding: '20px 20px',background: '#fff',}"> |
| | | <span |
| | | class="ant-descriptions-title" |
| | | style="font-size: large;font-style: normal;font-size: 15px;" |
| | | >7</span> |
| | | </div> |
| | | <div :style="{height: '45px',float: 'left',width: '80%',border: '1px solid #e9e9e9',padding: '10px 10px',background: '#fff',}"> |
| | | <span |
| | | class="ant-descriptions-title" |
| | | style="font-size: large;font-style: normal;font-size: 15px;" |
| | | >æ§å¶ä¼ æå¨ä½ç½®æç±»ååçæ¹å</span> |
| | | </div> |
| | | <div :style="{height: '45px',float: 'right',width: '10%',border: '1px solid #e9e9e9',padding: '10px 10px',background: '#fff',}"> |
| | | |
| | | <a-switch |
| | | checked-children="æ¯" |
| | | un-checked-children="å¦" |
| | | :checked="model.result_7 == '1'" |
| | | @change="handle7Switch(model.result_7)" |
| | | /> |
| | | </div> |
| | | <div> |
| | | <div :style="{height: '45px',float: 'left',width: '10%',border: '1px solid #e9e9e9',padding: '20px 20px',background: '#fff',}"> |
| | | <span |
| | | class="ant-descriptions-title" |
| | | style="font-size: large;font-style: normal;font-size: 15px;" |
| | | >8</span> |
| | | </div> |
| | | <div :style="{height: '45px',float: 'left',width: '80%',border: '1px solid #e9e9e9',padding: '10px 10px',background: '#fff',}"> |
| | | <span |
| | | class="ant-descriptions-title" |
| | | style="font-size: large;font-style: normal;font-size: 15px;" |
| | | >温度æ§å¶ç³»ç»ãæ§å¶æ¹å¼æåæ°åçæ¹å</span> |
| | | </div> |
| | | <div :style="{height: '45px',float: 'right',width: '10%',border: '1px solid #e9e9e9',padding: '10px 10px',background: '#fff',}"> |
| | | <a-switch |
| | | checked-children="æ¯" |
| | | un-checked-children="å¦" |
| | | :checked="model.result_8 == '1'" |
| | | @change="handle8Switch(model.result_8)" |
| | | /> |
| | | </div> |
| | | </div> |
| | | <div> |
| | | <div :style="{height: '45px',float: 'left',width: '10%',border: '1px solid #e9e9e9',padding: '20px 20px',background: '#fff',}"> |
| | | <span |
| | | class="ant-descriptions-title" |
| | | style="font-size: large;font-style: normal;font-size: 15px;" |
| | | >9</span> |
| | | </div> |
| | | <div :style="{height: '45px',float: 'left',width: '80%',border: '1px solid #e9e9e9',padding: '10px 10px',background: '#fff',}"> |
| | | <span |
| | | class="ant-descriptions-title" |
| | | style="font-size: large;font-style: normal;font-size: 15px;" |
| | | >çæ°ççç§åæ°è®¾å®å¼ç¸å¯¹äºåå§è®¾å®å¼åçæ¹å</span> |
| | | </div> |
| | | <div :style="{height: '45px',float: 'right',width: '10%',border: '1px solid #e9e9e9',padding: '10px 10px',background: '#fff',}"> |
| | | <a-switch |
| | | checked-children="æ¯" |
| | | un-checked-children="å¦" |
| | | :checked="model.result_9 == '1'" |
| | | @change="handle9Switch(model.result_9)" |
| | | /> |
| | | |
| | | </div> |
| | | </div> |
| | | <div> |
| | | <div :style="{height: '45px',float: 'left',width: '10%',border: '1px solid #e9e9e9',padding: '20px 20px',background: '#fff',}"> |
| | | <span |
| | | class="ant-descriptions-title" |
| | | style="font-size: large;font-style: normal;font-size: 15px;" |
| | | >10</span> |
| | | </div> |
| | | <div :style="{height: '45px',float: 'left',width: '80%',border: '1px solid #e9e9e9',padding: '10px 10px',background: '#fff',}"> |
| | | <span |
| | | class="ant-descriptions-title" |
| | | style="font-size: large;font-style: normal;font-size: 15px;" |
| | | >å·¥ä½åºä½ç½®æå¤§å°æ¹å</span> |
| | | </div> |
| | | <div :style="{height: '45px',float: 'right',width: '10%',border: '1px solid #e9e9e9',padding: '10px 10px',background: '#fff',}"> |
| | | |
| | | <a-switch |
| | | checked-children="æ¯" |
| | | un-checked-children="å¦" |
| | | :checked="model.result_10 == '1'" |
| | | @change="handle10Switch(model.result_10)" |
| | | /> |
| | | |
| | | </div> |
| | | </div> |
| | | <div> |
| | | <div :style="{height: '45px',float: 'left',width: '10%',border: '1px solid #e9e9e9',padding: '20px 20px',background: '#fff',}"> |
| | | <span |
| | | class="ant-descriptions-title" |
| | | style="font-size: large;font-style: normal;font-size: 15px;" |
| | | >11</span> |
| | | </div> |
| | | <div :style="{height: '45px',float: 'left',width: '80%',border: '1px solid #e9e9e9',padding: '10px 10px',background: '#fff',}"> |
| | | <span |
| | | class="ant-descriptions-title" |
| | | style="font-size: large;font-style: normal;font-size: 15px;" |
| | | >éç¨åæè§æ ¼ååå·çææãå¨åæä½ç½®ä¸æ´æ¢å çç³»ç»</span> |
| | | </div> |
| | | <div :style="{height: '45px',float: 'right',width: '10%',border: '1px solid #e9e9e9',padding: '10px 10px',background: '#fff',}"> |
| | | <a-switch |
| | | checked-children="æ¯" |
| | | un-checked-children="å¦" |
| | | :checked="model.result_11 == '1'" |
| | | @change="handle11Switch(model.result_11)" |
| | | /> |
| | | </div> |
| | | </div> |
| | | <div> |
| | | <div :style="{height: '45px',float: 'left',width: '10%',border: '1px solid #e9e9e9',padding: '20px 20px',background: '#fff',}"> |
| | | <span |
| | | class="ant-descriptions-title" |
| | | style="font-size: large;font-style: normal;font-size: 15px;" |
| | | >12</span> |
| | | </div> |
| | | <div :style="{height: '45px',float: 'left',width: '80%',border: '1px solid #e9e9e9',padding: '10px 10px',background: '#fff',}"> |
| | | <span |
| | | class="ant-descriptions-title" |
| | | style="font-size: large;font-style: normal;font-size: 15px;" |
| | | >使ç¨ç¸åæç¸ä¼¼ä¼ çç¹æ§çæææ´æ¢åæèçææ</span> |
| | | </div> |
| | | <div :style="{height: '45px',float: 'right',width: '10%',border: '1px solid #e9e9e9',padding: '10px 10px',background: '#fff',}"> |
| | | <a-switch |
| | | checked-children="æ¯" |
| | | un-checked-children="å¦" |
| | | :checked="model.result_12 == '1'" |
| | | @change="handle12Switch(model.result_12)" |
| | | /> |
| | | </div> |
| | | </div> |
| | | <div> |
| | | <div :style="{height: '45px',float: 'left',width: '10%',border: '1px solid #e9e9e9',padding: '20px 20px',background: '#fff',}"> |
| | | <span |
| | | class="ant-descriptions-title" |
| | | style="font-size: large;font-style: normal;font-size: 15px;" |
| | | >13</span> |
| | | </div> |
| | | <div :style="{height: '45px',float: 'left',width: '80%',border: '1px solid #e9e9e9',padding: '10px 10px',background: '#fff',}"> |
| | | <span |
| | | class="ant-descriptions-title" |
| | | style="font-size: large;font-style: normal;font-size: 15px;" |
| | | >ç»´ä¿®çé£å¾ªç¯è®¾å¤ï¼å
¶æ°æµæ¹å¼/éçä¸åæ¥ä¸è´çãå¦:æ¡æ¿ä½ç½®ã飿é度ã飿æ°éç</span> |
| | | </div> |
| | | <div :style="{height: '45px',float: 'right',width: '10%',border: '1px solid #e9e9e9',padding: '10px 10px',background: '#fff',}"> |
| | | <a-switch |
| | | checked-children="æ¯" |
| | | un-checked-children="å¦" |
| | | :checked="model.result_13 == '1'" |
| | | @change="handle13Switch(model.result_13)" |
| | | /> |
| | | </div> |
| | | </div> |
| | | <div> |
| | | <div :style="{height: '45px',float: 'left',width: '10%',border: '1px solid #e9e9e9',padding: '20px 20px',background: '#fff',}"> |
| | | <span |
| | | class="ant-descriptions-title" |
| | | style="font-size: large;font-style: normal;font-size: 15px;" |
| | | >14</span> |
| | | </div> |
| | | <div :style="{height: '45px',float: 'left',width: '80%',border: '1px solid #e9e9e9',padding: '10px 10px',background: '#fff',}"> |
| | | <span |
| | | class="ant-descriptions-title" |
| | | style="font-size: large;font-style: normal;font-size: 15px;" |
| | | >æè§å®çä½ç½®æ´æ¢åç±»åæ§å¶ä¼ æå¨</span> |
| | | </div> |
| | | <div :style="{height: '45px',float: 'right',width: '10%',border: '1px solid #e9e9e9',padding: '10px 10px',background: '#fff',}"> |
| | | <a-switch |
| | | checked-children="æ¯" |
| | | un-checked-children="å¦" |
| | | :checked="model.result_14 == '1'" |
| | | @change="handle14Switch(model.result_14)" |
| | | /> |
| | | </div> |
| | | </div> |
| | | <div> |
| | | <div :style="{height: '45px',float: 'left',width: '10%',border: '1px solid #e9e9e9',padding: '20px 20px',background: '#fff',}"> |
| | | <span |
| | | class="ant-descriptions-title" |
| | | style="font-size: large;font-style: normal;font-size: 15px;" |
| | | >15</span> |
| | | </div> |
| | | <div :style="{height: '45px',float: 'left',width: '80%',border: '1px solid #e9e9e9',padding: '10px 10px',background: '#fff',}"> |
| | | <span |
| | | class="ant-descriptions-title" |
| | | style="font-size: large;font-style: normal;font-size: 15px;" |
| | | >æåæ¥çåå·ãåæ°æ´æ¢æ¸©åº¦æ§å¶ä»ªè¡¨</span> |
| | | </div> |
| | | <div :style="{height: '45px',float: 'right',width: '10%',border: '1px solid #e9e9e9',padding: '10px 10px',background: '#fff',}"> |
| | | <a-switch |
| | | checked-children="æ¯" |
| | | un-checked-children="å¦" |
| | | :checked="model.result_15 == '1'" |
| | | @change="handle15Switch(model.result_15)" |
| | | /> |
| | | </div> |
| | | </div> |
| | | <div> |
| | | <div :style="{height: '45px',float: 'left',width: '10%',border: '1px solid #e9e9e9',padding: '20px 20px',background: '#fff',}"> |
| | | <span |
| | | class="ant-descriptions-title" |
| | | style="font-size: large;font-style: normal;font-size: 15px;" |
| | | >16</span> |
| | | </div> |
| | | <div :style="{height: '45px',float: 'left',width: '80%',border: '1px solid #e9e9e9',padding: '10px 10px',background: '#fff',}"> |
| | | <span |
| | | class="ant-descriptions-title" |
| | | style="font-size: large;font-style: normal;font-size: 15px;" |
| | | >设å¤çå®è£
ä½ç½®è¢«æ¹å</span> |
| | | </div> |
| | | <div :style="{height: '45px',float: 'right',width: '10%',border: '1px solid #e9e9e9',padding: '10px 10px',background: '#fff',}"> |
| | | <a-switch |
| | | checked-children="æ¯" |
| | | un-checked-children="å¦" |
| | | :checked="model.result_16 == '1'" |
| | | @change="handle16Switch(model.result_16)" |
| | | /> |
| | | |
| | | </div> |
| | | </div> |
| | | <div> |
| | | <div :style="{height: '45px',float: 'left',width: '10%',border: '1px solid #e9e9e9',padding: '20px 20px',background: '#fff',}"> |
| | | <span |
| | | class="ant-descriptions-title" |
| | | style="font-size: large;font-style: normal;font-size: 15px;" |
| | | >17</span> |
| | | </div> |
| | | <div :style="{height: '45px',float: 'left',width: '80%',border: '1px solid #e9e9e9',padding: '10px 10px',background: '#fff',}"> |
| | | <span |
| | | class="ant-descriptions-title" |
| | | style="font-size: large;font-style: normal;font-size: 15px;" |
| | | >æ´æ¢å çç³»ç»è¿æ¥ä»¶æé
ä»¶</span> |
| | | </div> |
| | | <div :style="{height: '45px',float: 'right',width: '10%',border: '1px solid #e9e9e9',padding: '10px 10px',background: '#fff',}"> |
| | | <a-switch |
| | | checked-children="æ¯" |
| | | un-checked-children="å¦" |
| | | :checked="model.result_17 == '1'" |
| | | @change="handle17Switch(model.result_17)" |
| | | /> |
| | | </div> |
| | | </div> |
| | | <div> |
| | | <div :style="{height: '45px',float: 'left',width: '10%',border: '1px solid #e9e9e9',padding: '20px 20px',background: '#fff',}"> |
| | | <span |
| | | class="ant-descriptions-title" |
| | | style="font-size: large;font-style: normal;font-size: 15px;" |
| | | >18</span> |
| | | </div> |
| | | <div :style="{height: '45px',float: 'left',width: '80%',border: '1px solid #e9e9e9',padding: '10px 10px',background: '#fff',}"> |
| | | <span |
| | | class="ant-descriptions-title" |
| | | style="font-size: large;font-style: normal;font-size: 15px;" |
| | | >使ç¨è¿ç¨ä¸ï¼çåä¸å
¶å®ä¼ æå¨(çæµãè¶
温æè®°å½)ç读æ°è¶
åºååæ§è¦æ±èå´ï¼ä¸ä¸ååæ§æå
³</span> |
| | | </div> |
| | | <div :style="{height: '45px',float: 'right',width: '10%',border: '1px solid #e9e9e9',padding: '10px 10px',background: '#fff',}"> |
| | | <a-switch |
| | | checked-children="æ¯" |
| | | un-checked-children="å¦" |
| | | :checked="model.result_18 == '1'" |
| | | @change="handle18Switch(model.result_18)" |
| | | /> |
| | | </div> |
| | | </div> |
| | | <div> |
| | | <div :style="{height: '45px',float: 'left',width: '10%',border: '1px solid #e9e9e9',padding: '20px 20px',background: '#fff',}"> |
| | | <span |
| | | class="ant-descriptions-title" |
| | | style="font-size: large;font-style: normal;font-size: 15px;" |
| | | >19</span> |
| | | </div> |
| | | <div :style="{height: '45px',float: 'left',width: '80%',border: '1px solid #e9e9e9',padding: '10px 10px',background: '#fff',}"> |
| | | <span |
| | | class="ant-descriptions-title" |
| | | style="font-size: large;font-style: normal;font-size: 15px;" |
| | | >çé¨é¨åç»´ä¿®</span> |
| | | </div> |
| | | <div :style="{height: '45px',float: 'right',width: '10%',border: '1px solid #e9e9e9',padding: '10px 10px',background: '#fff',}"> |
| | | <a-switch |
| | | checked-children="æ¯" |
| | | un-checked-children="å¦" |
| | | :checked="model.result_19 == '1'" |
| | | @change="handle19Switch(model.result_19)" |
| | | /> |
| | | </div> |
| | | </div> |
| | | <div> |
| | | <div :style="{height: '45px',float: 'left',width: '10%',border: '1px solid #e9e9e9',padding: '20px 20px',background: '#fff',}"> |
| | | <span |
| | | class="ant-descriptions-title" |
| | | style="font-size: large;font-style: normal;font-size: 15px;" |
| | | >20</span> |
| | | </div> |
| | | <div :style="{height: '45px',float: 'left',width: '80%',border: '1px solid #e9e9e9',padding: '10px 10px',background: '#fff',}"> |
| | | <span |
| | | class="ant-descriptions-title" |
| | | style="font-size: large;font-style: normal;font-size: 15px;" |
| | | >å ççåç¨ä¸ä¸ªæä»¥ä¸ï¼å次使ç¨å</span> |
| | | </div> |
| | | <div :style="{height: '45px',float: 'right',width: '10%',border: '1px solid #e9e9e9',padding: '10px 10px',background: '#fff',}"> |
| | | <a-switch |
| | | checked-children="æ¯" |
| | | un-checked-children="å¦" |
| | | :checked="model.result_20 == '1'" |
| | | @change="handle20Switch(model.result_20)" |
| | | /> |
| | | </div> |
| | | </div> |
| | | <div> |
| | | <div :style="{height: '130px',float: 'left',width: '10%',border: '1px solid #e9e9e9',padding: '20px 20px',background: '#fff',}"> |
| | | <span |
| | | class="ant-descriptions-title" |
| | | style="font-size: large;font-style: normal;font-size: 15px;" |
| | | >确认</span> |
| | | </div> |
| | | <div :style="{height: '130px',float: 'left',width: '90%',border: '1px solid #e9e9e9',padding: '10px 10px',background: '#fff',}"> |
| | | <a-row :gutter="24"> |
| | | <span |
| | | class="ant-descriptions-title" |
| | | style="font-size: large;font-style: normal;font-size: 15px;" |
| | | > 1ãç»å¯¹è®¾å¤è¿è¡ä¸ä¿å对ä¸è¿°é¡¹ç®è¿è¡ç¡®è®¤ï¼æ éè¿è¡æ¸©åº¦ååæ§æ£æµ </span> |
| | | <a-switch |
| | | checked-children="æ¯" |
| | | un-checked-children="å¦" |
| | | :checked="model.result_21 == '1'" |
| | | @change="handle21Switch(model.result_21)" |
| | | /> |
| | | <span |
| | | class="ant-descriptions-title" |
| | | style="font-size: large;font-style: normal;font-size: 15px;" |
| | | > ã</span> |
| | | </a-row> |
| | | <a-row :gutter="24"> |
| | | <span |
| | | class="ant-descriptions-title" |
| | | style="font-size: large;font-style: normal;font-size: 15px;" |
| | | > 2ãç»å¯¹ç¬¬ </span> |
| | | <a-input-number |
| | | v-model="model.sort" |
| | | :min=0 |
| | | :max=20 |
| | | /> |
| | | <span |
| | | class="ant-descriptions-title" |
| | | style="font-size: large;font-style: normal;font-size: 15px;" |
| | | > 项è¿è¡ç»´ä¿®ææ´æ¢(æ¹å)çï¼éè¿è¡æ¸©åº¦ååæ§æ£æµ </span> |
| | | <a-switch |
| | | checked-children="æ¯" |
| | | un-checked-children="å¦" |
| | | :checked="model.result_22 == '1'" |
| | | @change="handle22Switch(model.result_22)" |
| | | /> |
| | | <span |
| | | class="ant-descriptions-title" |
| | | style="font-size: large;font-style: normal;font-size: 15px;" |
| | | > ã</span> |
| | | </a-row> |
| | | <a-row :gutter="24"> |
| | | <a-col :span="12"> |
| | | <span |
| | | class="ant-descriptions-title" |
| | | style="font-size: large;font-style: normal;font-size: 15px;" |
| | | > ç»´ä¿®å®¤ä¸»ä»»ï¼ </span> |
| | | <span v-if="this.model != null">{{ this.model.repairDirectorUserName }}</span> |
| | | <span v-else>-</span> |
| | | </a-col> |
| | | <a-col :span="12"> |
| | | <span |
| | | class="ant-descriptions-title" |
| | | style="font-size: large;font-style: normal;font-size: 15px;" |
| | | > ä¿å
»äººåï¼ </span> |
| | | <span v-if="this.model != null">{{ this.model.maintenanceUserName }}</span> |
| | | <span v-else>-</span> |
| | | </a-col> |
| | | </a-row> |
| | | <a-row :gutter="24"> |
| | | <a-col :span="12"> |
| | | <span |
| | | class="ant-descriptions-title" |
| | | style="font-size: large;font-style: normal;font-size: 15px;" |
| | | > ä»ªè¡¨å·¥ï¼ </span> |
| | | <span v-if="this.model != null">{{ this.model.meterUserName }}</span> |
| | | <span v-else>-</span> |
| | | </a-col> |
| | | <a-col :span="12"> |
| | | <span |
| | | class="ant-descriptions-title" |
| | | style="font-size: large;font-style: normal;font-size: 15px;" |
| | | > æ¥æï¼ </span> |
| | | <span v-if="this.model != null">{{ this.model.updateTime }}</span> |
| | | <span v-else>-</span> |
| | | </a-col> |
| | | </a-row> |
| | | |
| | | </div> |
| | | </div> |
| | | <!-- </a-form> --> |
| | | <!-- </a-spin> --> |
| | | |
| | | <template slot="footer"> |
| | | <a-button |
| | | :style="{marginRight: '8px'}" |
| | | @click="handleCancel()" |
| | | > |
| | | å
³é |
| | | </a-button> |
| | | |
| | | <a-button |
| | | @click="handleOk()" |
| | | type="primary" |
| | | :loading="confirmLoading" |
| | | :disabled="disableSubmit || confirmLoading" |
| | | >ç¡®å®</a-button> |
| | | </template> |
| | | </a-modal> |
| | | |
| | | </template> |
| | | |
| | | <script> |
| | | import { getAction, postAction, requestPut } from '@/api/manage' |
| | | import pick from 'lodash.pick' |
| | | import JMultiSelectTag from '@/components/dict/JMultiSelectTag' |
| | | import Tooltip from 'ant-design-vue/es/tooltip' |
| | | import { JeecgListMixin } from '@/mixins/JeecgListMixin' |
| | | import { ACCESS_TOKEN } from '@/store/mutation-types' |
| | | import { getFileAccessHttpUrl } from '@/api/manage'; |
| | | |
| | | export default { |
| | | name: "StoveCategoryModal", |
| | | mixins: [JeecgListMixin], |
| | | components: { |
| | | JMultiSelectTag, |
| | | Tooltip, |
| | | }, |
| | | data() { |
| | | return { |
| | | title: "æä½", |
| | | visible: false, |
| | | disableSubmit: false, |
| | | codeDisable: true, |
| | | dataSource: [], |
| | | model: {}, |
| | | departs: [], |
| | | labelCol: { |
| | | xs: { span: 24 }, |
| | | sm: { span: 6 }, |
| | | }, |
| | | wrapperCol: { |
| | | xs: { span: 24 }, |
| | | sm: { span: 18 }, |
| | | }, |
| | | confirmLoading: false, |
| | | form: this.$form.createForm(this), |
| | | validatorRules: { |
| | | num: { |
| | | rules: [ |
| | | { required: true, message: '请è¾å
¥ä¿å
»å·¥åç¼ç !' }, |
| | | ] |
| | | }, |
| | | }, |
| | | url: { |
| | | add: "/eam/maintenanceStoveExempt/maintenanceStoveExempt", |
| | | getStoveCategory: "/eam/maintenanceStoveExempt/getStoveCategory", |
| | | list: "/eam/dailyMaintenanceOrder/getMaintenanceCycleByStandardId", |
| | | }, |
| | | |
| | | } |
| | | }, |
| | | |
| | | methods: { |
| | | |
| | | edit(record) { |
| | | let that = this; |
| | | |
| | | this.form.resetFields(); |
| | | this.model = Object.assign({}, record); |
| | | this.getStoveCategory() |
| | | this.visible = true; |
| | | that.$nextTick(() => { |
| | | // that.form.setFieldsValue(pick(that.model, 'num', 'teamId', 'remark')); |
| | | }); |
| | | |
| | | }, |
| | | |
| | | |
| | | close() { |
| | | this.$emit('close'); |
| | | this.visible = false; |
| | | }, |
| | | |
| | | handleCancel() { |
| | | this.close(); |
| | | }, |
| | | |
| | | handleOk() { |
| | | |
| | | const that = this; |
| | | // 触å表åéªè¯ |
| | | that.form.validateFields((err, values) => { |
| | | if (!err) { |
| | | this.$confirm({ |
| | | title: '温度ååæ§æ£æµæ¡ä»¶ç¡®è®¤', |
| | | content: 'æç¤ºï¼è¯·è°¨æ
æä½ï¼', |
| | | okText: '确认', |
| | | cancelText: 'åæ¶', |
| | | onOk() { |
| | | let formData = Object.assign(that.model, values); |
| | | that.confirmLoading = true; |
| | | postAction(that.url.add, formData).then((res) => { |
| | | if (res.success) { |
| | | that.$message.success(res.message); |
| | | that.$emit('ok', new Date()); |
| | | } else { |
| | | that.$message.warning(res.message); |
| | | } |
| | | }).finally(() => { |
| | | that.confirmLoading = false; |
| | | that.close(); |
| | | }) |
| | | }, |
| | | }) |
| | | } |
| | | }) |
| | | }, |
| | | |
| | | handleDelete(text, record, index) { |
| | | this.dataSource.splice(index, 1); |
| | | }, |
| | | |
| | | getStoveCategory() { |
| | | getAction(this.url.getStoveCategory, { maintenanceOrderId: this.model.id }).then((res) => { |
| | | if (res.success) { |
| | | this.model = Object.assign({}, res.result[0]); |
| | | } |
| | | }) |
| | | }, |
| | | |
| | | handleSwitch(result_1) { |
| | | if ('0' == result_1) { |
| | | this.model.result_1 = '1' |
| | | } else { |
| | | this.model.result_1 = '0' |
| | | } |
| | | this.model = Object.assign({}, this.model); |
| | | }, |
| | | |
| | | handle2Switch(result_2) { |
| | | if ('0' == result_2) { |
| | | this.model.result_2 = '1' |
| | | } else { |
| | | this.model.result_2 = '0' |
| | | } |
| | | this.model = Object.assign({}, this.model); |
| | | }, |
| | | |
| | | // handle2Switch(result2) { |
| | | // if ('0' == result2) { |
| | | // this.model.result2 = '1' |
| | | // } else { |
| | | // this.model.result2 = '0' |
| | | // } |
| | | // this.model = Object.assign({}, this.model); |
| | | // }, |
| | | |
| | | handle3Switch(result_3) { |
| | | if ('0' == result_3) { |
| | | this.model.result_3 = '1' |
| | | } else { |
| | | this.model.result_3 = '0' |
| | | } |
| | | this.model = Object.assign({}, this.model); |
| | | }, |
| | | |
| | | handle4Switch(result_4) { |
| | | if ('0' == result_4) { |
| | | this.model.result_4 = '1' |
| | | } else { |
| | | this.model.result_4 = '0' |
| | | } |
| | | this.model = Object.assign({}, this.model); |
| | | }, |
| | | |
| | | handle5Switch(result_5) { |
| | | if ('0' == result_5) { |
| | | this.model.result_5 = '1' |
| | | } else { |
| | | this.model.result_5 = '0' |
| | | } |
| | | this.model = Object.assign({}, this.model); |
| | | }, |
| | | |
| | | handle6Switch(result_6) { |
| | | if ('0' == result_6) { |
| | | this.model.result_6 = '1' |
| | | } else { |
| | | this.model.result_6 = '0' |
| | | } |
| | | this.model = Object.assign({}, this.model); |
| | | }, |
| | | |
| | | handle7Switch(result_7) { |
| | | if ('0' == result_7) { |
| | | this.model.result_7 = '1' |
| | | } else { |
| | | this.model.result_7 = '0' |
| | | } |
| | | this.model = Object.assign({}, this.model); |
| | | }, |
| | | |
| | | handle8Switch(result_8) { |
| | | if ('0' == result_8) { |
| | | this.model.result_8 = '1' |
| | | } else { |
| | | this.model.result_8 = '0' |
| | | } |
| | | this.model = Object.assign({}, this.model); |
| | | }, |
| | | |
| | | handle9Switch(result_9) { |
| | | if ('0' == result_9) { |
| | | this.model.result_9 = '1' |
| | | } else { |
| | | this.model.result_9 = '0' |
| | | } |
| | | this.model = Object.assign({}, this.model); |
| | | }, |
| | | |
| | | handle10Switch(result_10) { |
| | | if ('0' == result_10) { |
| | | this.model.result_10 = '1' |
| | | } else { |
| | | this.model.result_10 = '0' |
| | | } |
| | | this.model = Object.assign({}, this.model); |
| | | }, |
| | | |
| | | handle11Switch(result_11) { |
| | | if ('0' == result_11) { |
| | | this.model.result_11 = '1' |
| | | } else { |
| | | this.model.result_11 = '0' |
| | | } |
| | | this.model = Object.assign({}, this.model); |
| | | }, |
| | | |
| | | handle12Switch(result_12) { |
| | | if ('0' == result_12) { |
| | | this.model.result_12 = '1' |
| | | } else { |
| | | this.model.result_12 = '0' |
| | | } |
| | | this.model = Object.assign({}, this.model); |
| | | }, |
| | | |
| | | handle13Switch(result_13) { |
| | | if ('0' == result_13) { |
| | | this.model.result_13 = '1' |
| | | } else { |
| | | this.model.result_13 = '0' |
| | | } |
| | | this.model = Object.assign({}, this.model); |
| | | }, |
| | | |
| | | handle14Switch(result_14) { |
| | | if ('0' == result_14) { |
| | | this.model.result_14 = '1' |
| | | } else { |
| | | this.model.result_14 = '0' |
| | | } |
| | | this.model = Object.assign({}, this.model); |
| | | }, |
| | | |
| | | handle15Switch(result_15) { |
| | | if ('0' == result_15) { |
| | | this.model.result_15 = '1' |
| | | } else { |
| | | this.model.result_15 = '0' |
| | | } |
| | | this.model = Object.assign({}, this.model); |
| | | }, |
| | | |
| | | handle16Switch(result_16) { |
| | | if ('0' == result_16) { |
| | | this.model.result_16 = '1' |
| | | } else { |
| | | this.model.result_16 = '0' |
| | | } |
| | | this.model = Object.assign({}, this.model); |
| | | }, |
| | | |
| | | handle17Switch(result_17) { |
| | | if ('0' == result_17) { |
| | | this.model.result_17 = '1' |
| | | } else { |
| | | this.model.result_17 = '0' |
| | | } |
| | | this.model = Object.assign({}, this.model); |
| | | }, |
| | | |
| | | handle18Switch(result_18) { |
| | | if ('0' == result_18) { |
| | | this.model.result_18 = '1' |
| | | } else { |
| | | this.model.result_18 = '0' |
| | | } |
| | | this.model = Object.assign({}, this.model); |
| | | }, |
| | | |
| | | handle19Switch(result_19) { |
| | | if ('0' == result_19) { |
| | | this.model.result_19 = '1' |
| | | } else { |
| | | this.model.result_19 = '0' |
| | | } |
| | | this.model = Object.assign({}, this.model); |
| | | }, |
| | | |
| | | handle20Switch(result_20) { |
| | | if ('0' == result_20) { |
| | | this.model.result_20 = '1' |
| | | } else { |
| | | this.model.result_20 = '0' |
| | | } |
| | | this.model = Object.assign({}, this.model); |
| | | }, |
| | | |
| | | handle21Switch(result_21) { |
| | | if ('0' == result_21) { |
| | | this.model.result_21 = '1' |
| | | } else { |
| | | this.model.result_21 = '0' |
| | | } |
| | | this.model = Object.assign({}, this.model); |
| | | }, |
| | | |
| | | handle22Switch(result_22) { |
| | | if ('0' == result_22) { |
| | | this.model.result_22 = '1' |
| | | } else { |
| | | this.model.result_22 = '0' |
| | | } |
| | | this.model = Object.assign({}, this.model); |
| | | }, |
| | | |
| | | |
| | | // onChangeJudgmentResult(e) { |
| | | // this.model.judgmentResult = e.target.value |
| | | // }, |
| | | |
| | | // handleChange(value, key, column, index) { |
| | | // let that = this; |
| | | // const temp = [...that.dataSource]; |
| | | // const target = temp.filter(item => key === item.key)[index]; |
| | | // if (target) { |
| | | // if ('actualMeasure' == column.dataIndex) { |
| | | // target['actualMeasure'] = value.target.value; |
| | | // } |
| | | // //æ¾ç¤ºå¸¦è¿æ¥çæ°æ® |
| | | // that.dataSource = temp; |
| | | // } |
| | | // }, |
| | | |
| | | }, |
| | | } |
| | | </script> |
| | | |
| | | <style lang="less" scoped> |
| | | /deep/ .frozenRowClass { |
| | | color: #c9c9c9; |
| | | } |
| | | .fontweight { |
| | | font-weight: bold; |
| | | } |
| | | .ant-btn { |
| | | padding: 0 10px; |
| | | margin-left: 3px; |
| | | } |
| | | |
| | | .ant-form-item-control { |
| | | line-height: 0px; |
| | | } |
| | | |
| | | /** 主表åè¡é´è· */ |
| | | .ant-form .ant-form-item { |
| | | margin-bottom: 10px; |
| | | } |
| | | |
| | | /** Tab页é¢è¡é´è· */ |
| | | .ant-tabs-content .ant-form-item { |
| | | margin-bottom: 0px; |
| | | } |
| | | .hightColor { |
| | | height: 10%; |
| | | font-weight: bold; |
| | | font-size: 20px; |
| | | color: #1b1e1e; |
| | | } |
| | | .frozenRowClass { |
| | | color: #c9c9c9; |
| | | } |
| | | .fontweight { |
| | | font-weight: bold; |
| | | } |
| | | .hight { |
| | | color: #f5222d; |
| | | } |
| | | /deep/ .red { |
| | | color: red; |
| | | } |
| | | |
| | | .line { |
| | | width: 1px; |
| | | height: 300px; |
| | | background-color: #000; |
| | | border: none; |
| | | float: left; |
| | | } |
| | | </style> |
| | |
| | | dataIndex: 'username', |
| | | align: "center", |
| | | scopedSlots: { customRender: 'username' }, |
| | | className: 'red', |
| | | // className: 'red', |
| | | width: 250, |
| | | }, |
| | | { |
| | |
| | | title: '*å®é
å·¥æ¶', |
| | | dataIndex: 'actualWorkingHourQuota', |
| | | align: "center", |
| | | className: 'red', |
| | | // className: 'red', |
| | | scopedSlots: { customRender: 'actualWorkingHourQuota' }, |
| | | width: 250, |
| | | }, |
| | |
| | | <template xmlns:background-color="http://www.w3.org/1999/xhtml"> |
| | | <a-row :gutter="10"> |
| | | <a-col :md="12" :sm="24"> |
| | | <a-col |
| | | :md="12" |
| | | :sm="24" |
| | | > |
| | | <a-card :bordered="false"> |
| | | |
| | | <!-- æé®æä½åºå --> |
| | | <a-row style="margin-left: 14px"> |
| | | <a-button @click="handleAdd(1)" type="primary">æ·»å é¨é¨</a-button> |
| | | <a-button @click="handleAdd(2)" type="primary">æ·»å ä¸çº§</a-button> |
| | | <a-button type="primary" icon="download" @click="handleExportXls('é¨é¨ä¿¡æ¯')">导åº</a-button> |
| | | <a-upload name="file" :showUploadList="false" :multiple="false" :headers="tokenHeader" :action="importExcelUrl" @change="handleImportExcel"> |
| | | <a-button type="primary" icon="import">导å
¥</a-button> |
| | | <a-button |
| | | @click="handleAdd(1)" |
| | | type="primary" |
| | | >æ·»å é¨é¨</a-button> |
| | | <a-button |
| | | @click="handleAdd(2)" |
| | | type="primary" |
| | | >æ·»å ä¸çº§</a-button> |
| | | <a-button |
| | | type="primary" |
| | | icon="download" |
| | | @click="handleExportXls('é¨é¨ä¿¡æ¯')" |
| | | >导åº</a-button> |
| | | <a-upload |
| | | name="file" |
| | | :showUploadList="false" |
| | | :multiple="false" |
| | | :headers="tokenHeader" |
| | | :action="importExcelUrl" |
| | | @change="handleImportExcel" |
| | | > |
| | | <a-button |
| | | type="primary" |
| | | icon="import" |
| | | >导å
¥</a-button> |
| | | </a-upload> |
| | | <a-button title="å é¤å¤æ¡æ°æ®" @click="batchDel" type="default">æ¹éå é¤</a-button> |
| | | <a-button |
| | | title="å é¤å¤æ¡æ°æ®" |
| | | @click="batchDel" |
| | | type="default" |
| | | >æ¹éå é¤</a-button> |
| | | <!--<a-button @click="refresh" type="default" icon="reload" :loading="loading">å·æ°</a-button>--> |
| | | </a-row> |
| | | <div style="background: #fff;padding-left:16px;height: 100%; margin-top: 5px"> |
| | | <a-alert type="info" :showIcon="true"> |
| | | <a-alert |
| | | type="info" |
| | | :showIcon="true" |
| | | > |
| | | <div slot="message"> |
| | | å½åéæ©ï¼<span v-if="this.currSelected.title">{{ getCurrSelectedTitle() }}</span> |
| | | <a v-if="this.currSelected.title" style="margin-left: 10px" @click="onClearSelected">åæ¶éæ©</a> |
| | | <a |
| | | v-if="this.currSelected.title" |
| | | style="margin-left: 10px" |
| | | @click="onClearSelected" |
| | | >åæ¶éæ©</a> |
| | | </div> |
| | | </a-alert> |
| | | <a-input-search @search="onSearch" style="width:100%;margin-top: 10px" placeholder="请è¾å
¥é¨é¨åç§°"/> |
| | | <a-input-search |
| | | @search="onSearch" |
| | | style="width:100%;margin-top: 10px" |
| | | placeholder="请è¾å
¥é¨é¨åç§°" |
| | | /> |
| | | <!-- æ --> |
| | | <a-col :md="10" :sm="24"> |
| | | <a-col |
| | | :md="10" |
| | | :sm="24" |
| | | > |
| | | <template> |
| | | <a-dropdown :trigger="[this.dropTrigger]" @visibleChange="dropStatus"> |
| | | <span style="user-select: none"> |
| | | <a-tree |
| | | checkable |
| | | multiple |
| | | @select="onSelect" |
| | | @check="onCheck" |
| | | @rightClick="rightHandle" |
| | | :selectedKeys="selectedKeys" |
| | | :checkedKeys="checkedKeys" |
| | | :treeData="departTree" |
| | | :checkStrictly="checkStrictly" |
| | | :expandedKeys="iExpandedKeys" |
| | | :autoExpandParent="autoExpandParent" |
| | | @expand="onExpand"/> |
| | | <a-dropdown |
| | | :trigger="[this.dropTrigger]" |
| | | @visibleChange="dropStatus" |
| | | > |
| | | <span style="user-select: none"> |
| | | <a-tree |
| | | checkable |
| | | multiple |
| | | @select="onSelect" |
| | | @check="onCheck" |
| | | @rightClick="rightHandle" |
| | | :selectedKeys="selectedKeys" |
| | | :checkedKeys="checkedKeys" |
| | | :treeData="departTree" |
| | | :checkStrictly="checkStrictly" |
| | | :expandedKeys="iExpandedKeys" |
| | | :autoExpandParent="autoExpandParent" |
| | | @expand="onExpand" |
| | | /> |
| | | </span> |
| | | <!--æ°å¢å³é®ç¹å»äºä»¶,åå¢å æ·»å åå é¤åè½--> |
| | | <a-menu slot="overlay"> |
| | | <a-menu-item @click="handleAdd(3)" key="1">æ·»å </a-menu-item> |
| | | <a-menu-item @click="handleDelete" key="2">å é¤</a-menu-item> |
| | | <a-menu-item @click="closeDrop" key="3">åæ¶</a-menu-item> |
| | | <a-menu-item |
| | | @click="handleAdd(3)" |
| | | key="1" |
| | | >æ·»å </a-menu-item> |
| | | <a-menu-item |
| | | @click="handleDelete" |
| | | key="2" |
| | | >å é¤</a-menu-item> |
| | | <a-menu-item |
| | | @click="closeDrop" |
| | | key="3" |
| | | >åæ¶</a-menu-item> |
| | | </a-menu> |
| | | </a-dropdown> |
| | | </template> |
| | |
| | | </a-card> |
| | | <!---- author:os_chengtgen -- date:20190827 -- for:忢ç¶åå¾éæ¨¡å¼ =======------> |
| | | <div class="drawer-bootom-button"> |
| | | <a-dropdown :trigger="['click']" placement="topCenter"> |
| | | <a-dropdown |
| | | :trigger="['click']" |
| | | placement="topCenter" |
| | | > |
| | | <a-menu slot="overlay"> |
| | | <a-menu-item key="1" @click="switchCheckStrictly(1)">ç¶åå
³è</a-menu-item> |
| | | <a-menu-item key="2" @click="switchCheckStrictly(2)">åæ¶å
³è</a-menu-item> |
| | | <a-menu-item key="3" @click="checkALL">å
¨é¨å¾é</a-menu-item> |
| | | <a-menu-item key="4" @click="cancelCheckALL">åæ¶å
¨é</a-menu-item> |
| | | <a-menu-item key="5" @click="expandAll">å±å¼ææ</a-menu-item> |
| | | <a-menu-item key="6" @click="closeAll">åå¹¶ææ</a-menu-item> |
| | | <a-menu-item |
| | | key="1" |
| | | @click="switchCheckStrictly(1)" |
| | | >ç¶åå
³è</a-menu-item> |
| | | <a-menu-item |
| | | key="2" |
| | | @click="switchCheckStrictly(2)" |
| | | >åæ¶å
³è</a-menu-item> |
| | | <a-menu-item |
| | | key="3" |
| | | @click="checkALL" |
| | | >å
¨é¨å¾é</a-menu-item> |
| | | <a-menu-item |
| | | key="4" |
| | | @click="cancelCheckALL" |
| | | >åæ¶å
¨é</a-menu-item> |
| | | <a-menu-item |
| | | key="5" |
| | | @click="expandAll" |
| | | >å±å¼ææ</a-menu-item> |
| | | <a-menu-item |
| | | key="6" |
| | | @click="closeAll" |
| | | >åå¹¶ææ</a-menu-item> |
| | | </a-menu> |
| | | <a-button> |
| | | æ æä½ <a-icon type="up" /> |
| | |
| | | </div> |
| | | <!---- author:os_chengtgen -- date:20190827 -- for:忢ç¶åå¾éæ¨¡å¼ =======------> |
| | | </a-col> |
| | | <a-col :md="12" :sm="24"> |
| | | <a-col |
| | | :md="12" |
| | | :sm="24" |
| | | > |
| | | <a-tabs defaultActiveKey="1"> |
| | | <a-tab-pane tab="åºæ¬ä¿¡æ¯" key="1" > |
| | | <a-card :bordered="false" v-if="selectedKeys.length>0"> |
| | | <a-form-model ref="form" :model="model" :rules="validatorRules"> |
| | | <a-form-model-item :labelCol="labelCol" :wrapperCol="wrapperCol" prop="departName" label="æºæåç§°"> |
| | | <a-input placeholder="请è¾å
¥æºæ/é¨é¨åç§°" v-model="model.departName" /> |
| | | <a-tab-pane |
| | | tab="åºæ¬ä¿¡æ¯" |
| | | key="1" |
| | | > |
| | | <a-card |
| | | :bordered="false" |
| | | v-if="selectedKeys.length>0" |
| | | > |
| | | <a-form-model |
| | | ref="form" |
| | | :model="model" |
| | | :rules="validatorRules" |
| | | > |
| | | <a-form-model-item |
| | | :labelCol="labelCol" |
| | | :wrapperCol="wrapperCol" |
| | | prop="departName" |
| | | label="æºæåç§°" |
| | | > |
| | | <a-input |
| | | placeholder="请è¾å
¥æºæ/é¨é¨åç§°" |
| | | v-model="model.departName" |
| | | /> |
| | | </a-form-model-item> |
| | | <a-form-model-item :labelCol="labelCol" :wrapperCol="wrapperCol" label="ä¸çº§é¨é¨"> |
| | | <a-form-model-item |
| | | :labelCol="labelCol" |
| | | :wrapperCol="wrapperCol" |
| | | label="使ç¨é¨é¨ç¼ç " |
| | | prop="useDepartNum" |
| | | > |
| | | <a-input |
| | | id="useDepartNum" |
| | | placeholder="请è¾å
¥ä½¿ç¨é¨é¨ç¼ç " |
| | | v-model="model.useDepartNum" |
| | | /> |
| | | </a-form-model-item> |
| | | <a-form-model-item |
| | | :labelCol="labelCol" |
| | | :wrapperCol="wrapperCol" |
| | | label="ç»´ä¿®é¨é¨ç¼ç " |
| | | prop="repairDepartNum" |
| | | > |
| | | <a-input |
| | | id="repairDepartNum" |
| | | placeholder="请è¾å
¥ç»´ä¿®é¨é¨ç¼ç " |
| | | v-model="model.repairDepartNum" |
| | | /> |
| | | </a-form-model-item> |
| | | <a-form-model-item |
| | | :labelCol="labelCol" |
| | | :wrapperCol="wrapperCol" |
| | | label="ä¸çº§é¨é¨" |
| | | > |
| | | <a-tree-select |
| | | style="width:100%" |
| | | :dropdownStyle="{maxHeight:'200px',overflow:'auto'}" |
| | | :treeData="treeData" |
| | | :disabled="disable" |
| | | v-model="model.parentId" |
| | | placeholder="æ "> |
| | | placeholder="æ " |
| | | > |
| | | </a-tree-select> |
| | | </a-form-model-item> |
| | | <a-form-model-item :labelCol="labelCol" :wrapperCol="wrapperCol" label="æåº"> |
| | | <a-form-model-item |
| | | :labelCol="labelCol" |
| | | :wrapperCol="wrapperCol" |
| | | label="æåº" |
| | | > |
| | | <a-input-number v-model="model.departOrder" /> |
| | | </a-form-model-item> |
| | | <a-form-model-item :labelCol="labelCol" :wrapperCol="wrapperCol" label="夿³¨"> |
| | | <a-textarea placeholder="请è¾å
¥å¤æ³¨" v-model="model.memo"/> |
| | | <a-form-model-item |
| | | :labelCol="labelCol" |
| | | :wrapperCol="wrapperCol" |
| | | label="夿³¨" |
| | | > |
| | | <a-textarea |
| | | placeholder="请è¾å
¥å¤æ³¨" |
| | | v-model="model.memo" |
| | | /> |
| | | </a-form-model-item> |
| | | </a-form-model> |
| | | <div class="anty-form-btn"> |
| | | <a-button @click="emptyCurrForm" type="default" htmlType="button" icon="sync">éç½®</a-button> |
| | | <a-button @click="submitCurrForm" type="primary" htmlType="button" icon="form">ä¿å</a-button> |
| | | <a-button |
| | | @click="emptyCurrForm" |
| | | type="default" |
| | | htmlType="button" |
| | | icon="sync" |
| | | >éç½®</a-button> |
| | | <a-button |
| | | @click="submitCurrForm" |
| | | type="primary" |
| | | htmlType="button" |
| | | icon="form" |
| | | >ä¿å</a-button> |
| | | </div> |
| | | </a-card> |
| | | <a-card v-else > |
| | | <a-card v-else> |
| | | <a-empty> |
| | | <span slot="description"> 请å
éæ©ä¸ä¸ªé¨é¨! </span> |
| | | </a-empty> |
| | | </a-card> |
| | | </a-tab-pane> |
| | | <a-tab-pane tab="é¨é¨æé" key="2" forceRender> |
| | | <a-tab-pane |
| | | tab="é¨é¨æé" |
| | | key="2" |
| | | forceRender |
| | | > |
| | | <!--<depart-auth-modal ref="departAuth"/>--> |
| | | <depart-m-auth-modal ref="departMAuth"></depart-m-auth-modal> |
| | | </a-tab-pane> |
| | | <a-tab-pane v-if="isDepartType == 0" tab="设å¤å表" key="3" forceRender> |
| | | <depart-auth-modal ref="departAuth"/> |
| | | <a-tab-pane |
| | | v-if="isDepartType == 0" |
| | | tab="设å¤å表" |
| | | key="3" |
| | | forceRender |
| | | > |
| | | <depart-auth-modal ref="departAuth" /> |
| | | </a-tab-pane> |
| | | |
| | | <a-tab-pane |
| | | v-if="isDepartType == 0" |
| | | tab="çç»å表" |
| | | key="4" |
| | | forceRender |
| | | > |
| | | <depart-team ref="departTeam" /> |
| | | </a-tab-pane> |
| | | </a-tabs> |
| | | |
| | | </a-col> |
| | | <depart-modal ref="departModal" @ok="loadTree"></depart-modal> |
| | | <depart-modal |
| | | ref="departModal" |
| | | @ok="loadTree" |
| | | ></depart-modal> |
| | | </a-row> |
| | | </template> |
| | | <script> |
| | | import {mapActions} from 'vuex' |
| | | import DepartMModal from './modules/DepartModal' |
| | | import DepartModal from './modules/DepartList/DepartModal' |
| | | import {queryDepartTreeList, searchByKeywords, deleteByDepartId} from '@/api/api' |
| | | import {httpAction, deleteAction} from '@/api/manage' |
| | | import {JeecgListMixin} from '@/mixins/JeecgListMixin' |
| | | import DepartAuthModal from './modules/DepartList/DepartAuthModal' |
| | | import DepartMAuthModal from './modules/DepartAuthModal' |
| | | import { mapActions } from 'vuex' |
| | | import DepartMModal from './modules/DepartModal' |
| | | import DepartModal from './modules/DepartList/DepartModal' |
| | | import { queryDepartTreeList, searchByKeywords, deleteByDepartId } from '@/api/api' |
| | | import { httpAction, deleteAction } from '@/api/manage' |
| | | import { JeecgListMixin } from '@/mixins/JeecgListMixin' |
| | | import DepartAuthModal from './modules/DepartList/DepartAuthModal' |
| | | import DepartMAuthModal from './modules/DepartAuthModal' |
| | | import DepartTeam from './modules/DepartList/DepartTeam' |
| | | |
| | | // 表头 |
| | | const columns = [ |
| | | { |
| | | title: 'æºæåç§°', |
| | | dataIndex: 'departName' |
| | | }, |
| | | { |
| | | title: 'æºæç±»å', |
| | | align: 'center', |
| | | dataIndex: 'orgType' |
| | | }, |
| | | { |
| | | title: 'æºæç¼ç ', |
| | | dataIndex: 'orgCode', |
| | | }, |
| | | { |
| | | title: 'ææºå·', |
| | | dataIndex: 'mobile' |
| | | }, |
| | | { |
| | | title: 'ä¼ ç', |
| | | dataIndex: 'fax' |
| | | }, |
| | | { |
| | | title: 'å°å', |
| | | dataIndex: 'address' |
| | | }, |
| | | { |
| | | title: 'æåº', |
| | | align: 'center', |
| | | dataIndex: 'departOrder' |
| | | }, |
| | | { |
| | | title: 'æä½', |
| | | align: 'center', |
| | | dataIndex: 'action', |
| | | scopedSlots: {customRender: 'action'} |
| | | // 表头 |
| | | const columns = [ |
| | | { |
| | | title: 'æºæåç§°', |
| | | dataIndex: 'departName' |
| | | }, |
| | | { |
| | | title: 'æºæç±»å', |
| | | align: 'center', |
| | | dataIndex: 'orgType' |
| | | }, |
| | | { |
| | | title: 'æºæç¼ç ', |
| | | dataIndex: 'orgCode', |
| | | }, |
| | | { |
| | | title: 'ææºå·', |
| | | dataIndex: 'mobile' |
| | | }, |
| | | { |
| | | title: 'ä¼ ç', |
| | | dataIndex: 'fax' |
| | | }, |
| | | { |
| | | title: 'å°å', |
| | | dataIndex: 'address' |
| | | }, |
| | | { |
| | | title: 'æåº', |
| | | align: 'center', |
| | | dataIndex: 'departOrder' |
| | | }, |
| | | { |
| | | title: 'æä½', |
| | | align: 'center', |
| | | dataIndex: 'action', |
| | | scopedSlots: { customRender: 'action' } |
| | | } |
| | | ] |
| | | export default { |
| | | name: 'DepartList', |
| | | mixins: [JeecgListMixin], |
| | | components: { |
| | | DepartAuthModal, |
| | | DepartModal, |
| | | DepartMModal, |
| | | DepartMAuthModal, |
| | | DepartTeam |
| | | }, |
| | | data() { |
| | | return { |
| | | isDepartType: "", |
| | | iExpandedKeys: [], |
| | | loading: false, |
| | | autoExpandParent: true, |
| | | currFlowId: '', |
| | | currFlowName: '', |
| | | disable: true, |
| | | treeData: [], |
| | | visible: false, |
| | | departTree: [], |
| | | rightClickSelectedKey: '', |
| | | rightClickSelectedOrgCode: '', |
| | | hiding: true, |
| | | model: {}, |
| | | dropTrigger: '', |
| | | depart: {}, |
| | | columns: columns, |
| | | disableSubmit: false, |
| | | checkedKeys: [], |
| | | selectedKeys: [], |
| | | autoIncr: 1, |
| | | currSelected: {}, |
| | | allTreeKeys: [], |
| | | checkStrictly: true, |
| | | labelCol: { |
| | | xs: { span: 24 }, |
| | | sm: { span: 5 } |
| | | }, |
| | | wrapperCol: { |
| | | xs: { span: 24 }, |
| | | sm: { span: 16 } |
| | | }, |
| | | graphDatasource: { |
| | | nodes: [], |
| | | edges: [] |
| | | }, |
| | | validatorRules: { |
| | | departName: [{ required: true, message: '请è¾å
¥æºæ/é¨é¨åç§°!' }], |
| | | orgCode: [{ required: true, message: '请è¾å
¥æºæç¼ç !' }], |
| | | orgCategory: [{ required: true, message: '请è¾å
¥æºæç±»å!' }], |
| | | mobile: [{ validator: this.validateMobile }] |
| | | }, |
| | | url: { |
| | | delete: '/sys/sysDepart/delete', |
| | | edit: '/sys/sysDepart/edit', |
| | | deleteBatch: '/sys/sysDepart/deleteBatch', |
| | | exportXlsUrl: "sys/sysDepart/exportXls", |
| | | importExcelUrl: "sys/sysDepart/importExcel", |
| | | }, |
| | | orgCategoryDisabled: false, |
| | | } |
| | | ] |
| | | export default { |
| | | name: 'DepartList', |
| | | mixins: [JeecgListMixin], |
| | | components: { |
| | | DepartAuthModal, |
| | | DepartModal, |
| | | DepartMModal, |
| | | DepartMAuthModal |
| | | }, |
| | | data() { |
| | | return { |
| | | isDepartType:"", |
| | | iExpandedKeys: [], |
| | | loading: false, |
| | | autoExpandParent: true, |
| | | currFlowId: '', |
| | | currFlowName: '', |
| | | disable: true, |
| | | treeData: [], |
| | | visible: false, |
| | | departTree: [], |
| | | rightClickSelectedKey: '', |
| | | rightClickSelectedOrgCode: '', |
| | | hiding: true, |
| | | model: {}, |
| | | dropTrigger: '', |
| | | depart: {}, |
| | | columns: columns, |
| | | disableSubmit: false, |
| | | checkedKeys: [], |
| | | selectedKeys: [], |
| | | autoIncr: 1, |
| | | currSelected: {}, |
| | | allTreeKeys:[], |
| | | checkStrictly: true, |
| | | labelCol: { |
| | | xs: {span: 24}, |
| | | sm: {span: 5} |
| | | }, |
| | | wrapperCol: { |
| | | xs: {span: 24}, |
| | | sm: {span: 16} |
| | | }, |
| | | graphDatasource: { |
| | | nodes: [], |
| | | edges: [] |
| | | }, |
| | | validatorRules: { |
| | | departName: [{required: true, message: '请è¾å
¥æºæ/é¨é¨åç§°!'}], |
| | | orgCode: [{required: true, message: '请è¾å
¥æºæç¼ç !'}], |
| | | orgCategory:[{required: true, message: '请è¾å
¥æºæç±»å!'}], |
| | | mobile:[{validator: this.validateMobile}] |
| | | }, |
| | | url: { |
| | | delete: '/sys/sysDepart/delete', |
| | | edit: '/sys/sysDepart/edit', |
| | | deleteBatch: '/sys/sysDepart/deleteBatch', |
| | | exportXlsUrl: "sys/sysDepart/exportXls", |
| | | importExcelUrl: "sys/sysDepart/importExcel", |
| | | }, |
| | | orgCategoryDisabled:false, |
| | | } |
| | | }, |
| | | computed: { |
| | | importExcelUrl: function () { |
| | | return `${window._CONFIG['domianURL']}/${this.url.importExcelUrl}`; |
| | | } |
| | | }, |
| | | methods: { |
| | | ...mapActions(['QueryDepartTree']), |
| | | queryTreeData() { |
| | | this.QueryDepartTree().then(res => { |
| | | if (res.success) { |
| | | this.isDepartType = res.result[0].value |
| | | } else { |
| | | // this.$message.warn(res.message) |
| | | this.$notification.warning({ |
| | | message:'æ¶æ¯', |
| | | description:res.message |
| | | }); |
| | | } |
| | | }).finally(() =>{ |
| | | }) |
| | | }, |
| | | loadData() { |
| | | this.refresh(); |
| | | }, |
| | | loadTree() { |
| | | var that = this |
| | | that.treeData = [] |
| | | that.departTree = [] |
| | | queryDepartTreeList().then((res) => { |
| | | if (res.success) { |
| | | //é¨é¨å
¨éåï¼åæ·»å é¨é¨ï¼é䏿°éå¢å¤ |
| | | this.allTreeKeys = []; |
| | | for (let i = 0; i < res.result.length; i++) { |
| | | let temp = res.result[i] |
| | | that.treeData.push(temp) |
| | | that.departTree.push(temp) |
| | | that.setThisExpandedKeys(temp) |
| | | that.getAllKeys(temp); |
| | | // console.log(temp.id) |
| | | } |
| | | this.loading = false |
| | | } |
| | | }) |
| | | }, |
| | | setThisExpandedKeys(node) { |
| | | if (node.children && node.children.length > 0) { |
| | | this.iExpandedKeys.push(node.key) |
| | | for (let a = 0; a < node.children.length; a++) { |
| | | this.setThisExpandedKeys(node.children[a]) |
| | | } |
| | | } |
| | | }, |
| | | refresh() { |
| | | this.loading = true |
| | | this.loadTree() |
| | | }, |
| | | // å³é®æä½æ¹æ³ |
| | | rightHandle(node) { |
| | | this.dropTrigger = 'contextmenu' |
| | | console.log(node.node.eventKey) |
| | | this.rightClickSelectedKey = node.node.eventKey |
| | | this.rightClickSelectedOrgCode = node.node.dataRef.orgCode |
| | | }, |
| | | onExpand(expandedKeys) { |
| | | console.log('onExpand', expandedKeys) |
| | | this.iExpandedKeys = expandedKeys |
| | | this.autoExpandParent = false |
| | | }, |
| | | backFlowList() { |
| | | this.$router.back(-1) |
| | | }, |
| | | // å³é®ç¹å»ä¸ææ¡æ¹åäºä»¶ |
| | | dropStatus(visible) { |
| | | if (visible == false) { |
| | | this.dropTrigger = '' |
| | | } |
| | | }, |
| | | // å³é®ä¸æå
³éä¸ææ¡ |
| | | closeDrop() { |
| | | this.dropTrigger = '' |
| | | }, |
| | | addRootNode() { |
| | | this.$refs.nodeModal.add(this.currFlowId, '') |
| | | }, |
| | | batchDel: function () { |
| | | if (this.checkedKeys.length <= 0) { |
| | | // this.$message.warning('è¯·éæ©ä¸æ¡è®°å½ï¼') |
| | | }, |
| | | computed: { |
| | | importExcelUrl: function () { |
| | | return `${window._CONFIG['domianURL']}/${this.url.importExcelUrl}`; |
| | | } |
| | | }, |
| | | methods: { |
| | | ...mapActions(['QueryDepartTree']), |
| | | queryTreeData() { |
| | | this.QueryDepartTree().then(res => { |
| | | if (res.success) { |
| | | this.isDepartType = res.result[0].value |
| | | } else { |
| | | // this.$message.warn(res.message) |
| | | this.$notification.warning({ |
| | | message:'æ¶æ¯', |
| | | description:"è¯·éæ©ä¸æ¡è®°å½" |
| | | message: 'æ¶æ¯', |
| | | description: res.message |
| | | }); |
| | | } else { |
| | | var ids = '' |
| | | for (var a = 0; a < this.checkedKeys.length; a++) { |
| | | ids += this.checkedKeys[a] + ',' |
| | | } |
| | | }).finally(() => { |
| | | }) |
| | | }, |
| | | loadData() { |
| | | this.refresh(); |
| | | }, |
| | | loadTree() { |
| | | var that = this |
| | | that.treeData = [] |
| | | that.departTree = [] |
| | | queryDepartTreeList().then((res) => { |
| | | if (res.success) { |
| | | //é¨é¨å
¨éåï¼åæ·»å é¨é¨ï¼é䏿°éå¢å¤ |
| | | this.allTreeKeys = []; |
| | | for (let i = 0; i < res.result.length; i++) { |
| | | let temp = res.result[i] |
| | | that.treeData.push(temp) |
| | | that.departTree.push(temp) |
| | | that.setThisExpandedKeys(temp) |
| | | that.getAllKeys(temp); |
| | | // console.log(temp.id) |
| | | } |
| | | var that = this |
| | | this.$confirm({ |
| | | title: '确认å é¤', |
| | | content: 'ç¡®å®è¦å 餿éä¸ç ' + this.checkedKeys.length + ' æ¡æ°æ®ï¼ä»¥ååèç¹æ°æ®å?', |
| | | onOk: function () { |
| | | deleteAction(that.url.deleteBatch, {ids: ids}).then((res) => { |
| | | if (res.success) { |
| | | // that.$message.success(res.message) |
| | | that.$notification.warning({ |
| | | message:'æ¶æ¯', |
| | | description:res.message |
| | | }); |
| | | that.loadTree() |
| | | that.onClearSelected() |
| | | } else { |
| | | // that.$message.warning(res.message) |
| | | that.$notification.warning({ |
| | | message:'æ¶æ¯', |
| | | description:res.message |
| | | }); |
| | | } |
| | | }) |
| | | } |
| | | }) |
| | | this.loading = false |
| | | } |
| | | }, |
| | | onSearch(value) { |
| | | let that = this |
| | | if (value) { |
| | | searchByKeywords({keyWord: value}).then((res) => { |
| | | if (res.success) { |
| | | that.departTree = [] |
| | | for (let i = 0; i < res.result.length; i++) { |
| | | let temp = res.result[i] |
| | | that.departTree.push(temp) |
| | | } |
| | | } else { |
| | | // that.$message.warning(res.message) |
| | | that.$notification.warning({ |
| | | message:'æ¶æ¯', |
| | | description:res.message |
| | | }); |
| | | } |
| | | }) |
| | | } else { |
| | | that.loadTree() |
| | | }) |
| | | }, |
| | | setThisExpandedKeys(node) { |
| | | if (node.children && node.children.length > 0) { |
| | | this.iExpandedKeys.push(node.key) |
| | | for (let a = 0; a < node.children.length; a++) { |
| | | this.setThisExpandedKeys(node.children[a]) |
| | | } |
| | | |
| | | }, |
| | | nodeModalOk() { |
| | | this.loadTree() |
| | | }, |
| | | nodeModalClose() { |
| | | }, |
| | | hide() { |
| | | console.log(111) |
| | | this.visible = false |
| | | }, |
| | | onCheck(checkedKeys, info) { |
| | | console.log('onCheck', checkedKeys, info) |
| | | this.hiding = false |
| | | //---- author:os_chengtgen -- date:20190827 -- for:忢ç¶åå¾éæ¨¡å¼ =======------ |
| | | if(this.checkStrictly){ |
| | | this.checkedKeys = checkedKeys.checked; |
| | | }else{ |
| | | this.checkedKeys = checkedKeys |
| | | } |
| | | }, |
| | | refresh() { |
| | | this.loading = true |
| | | this.loadTree() |
| | | }, |
| | | // å³é®æä½æ¹æ³ |
| | | rightHandle(node) { |
| | | this.dropTrigger = 'contextmenu' |
| | | console.log(node.node.eventKey) |
| | | this.rightClickSelectedKey = node.node.eventKey |
| | | this.rightClickSelectedOrgCode = node.node.dataRef.orgCode |
| | | }, |
| | | onExpand(expandedKeys) { |
| | | console.log('onExpand', expandedKeys) |
| | | this.iExpandedKeys = expandedKeys |
| | | this.autoExpandParent = false |
| | | }, |
| | | backFlowList() { |
| | | this.$router.back(-1) |
| | | }, |
| | | // å³é®ç¹å»ä¸ææ¡æ¹åäºä»¶ |
| | | dropStatus(visible) { |
| | | if (visible == false) { |
| | | this.dropTrigger = '' |
| | | } |
| | | }, |
| | | // å³é®ä¸æå
³éä¸ææ¡ |
| | | closeDrop() { |
| | | this.dropTrigger = '' |
| | | }, |
| | | addRootNode() { |
| | | this.$refs.nodeModal.add(this.currFlowId, '') |
| | | }, |
| | | batchDel: function () { |
| | | if (this.checkedKeys.length <= 0) { |
| | | // this.$message.warning('è¯·éæ©ä¸æ¡è®°å½ï¼') |
| | | this.$notification.warning({ |
| | | message: 'æ¶æ¯', |
| | | description: "è¯·éæ©ä¸æ¡è®°å½" |
| | | }); |
| | | } else { |
| | | var ids = '' |
| | | for (var a = 0; a < this.checkedKeys.length; a++) { |
| | | ids += this.checkedKeys[a] + ',' |
| | | } |
| | | //---- author:os_chengtgen -- date:20190827 -- for:忢ç¶åå¾éæ¨¡å¼ =======------ |
| | | }, |
| | | onSelect(selectedKeys, e) { |
| | | console.log('selected', selectedKeys, e) |
| | | this.hiding = false |
| | | let record = e.node.dataRef |
| | | console.log('onSelect-record', record) |
| | | this.currSelected = Object.assign({}, record) |
| | | this.model = this.currSelected |
| | | this.selectedKeys = [record.key] |
| | | this.model.parentId = record.parentId |
| | | this.setValuesToForm(record) |
| | | if(this.isDepartType == 0){ |
| | | this.$refs.departAuth.show(record.id); |
| | | } |
| | | |
| | | this.$refs.departMAuth.show(record.id) |
| | | |
| | | }, |
| | | // 触åonSelectäºä»¶æ¶,为é¨é¨æ å³ä¾§çform表åèµå¼ |
| | | setValuesToForm(record) { |
| | | if(record.orgCategory == '1'){ |
| | | this.orgCategoryDisabled = true; |
| | | }else{ |
| | | this.orgCategoryDisabled = false; |
| | | } |
| | | }, |
| | | getCurrSelectedTitle() { |
| | | return !this.currSelected.title ? '' : this.currSelected.title |
| | | }, |
| | | onClearSelected() { |
| | | this.hiding = true |
| | | this.checkedKeys = [] |
| | | this.currSelected = {} |
| | | this.selectedKeys = [] |
| | | if(this.isDepartType == 0){ |
| | | this.$refs.departAuth.departId = '' |
| | | |
| | | } |
| | | this.$refs.departMAuth.departId = '' |
| | | }, |
| | | handleNodeTypeChange(val) { |
| | | this.currSelected.nodeType = val |
| | | }, |
| | | notifyTriggerTypeChange(value) { |
| | | this.currSelected.notifyTriggerType = value |
| | | }, |
| | | receiptTriggerTypeChange(value) { |
| | | this.currSelected.receiptTriggerType = value |
| | | }, |
| | | submitCurrForm() { |
| | | this.$refs.form.validate(valid => { |
| | | if (valid) { |
| | | if (!this.currSelected.id) { |
| | | // this.$message.warning('请ç¹å»éæ©è¦ä¿®æ¹é¨é¨!') |
| | | this.$notification.warning({ |
| | | message:'æ¶æ¯', |
| | | description:"请ç¹å»éæ©è¦ä¿®æ¹é¨é¨" |
| | | }); |
| | | return |
| | | } |
| | | |
| | | httpAction(this.url.edit, this.currSelected, 'put').then((res) => { |
| | | if (res.success) { |
| | | // this.$message.success('ä¿åæå!') |
| | | this.$notification.warning({ |
| | | message:'æ¶æ¯', |
| | | description:"ä¿åæå" |
| | | }); |
| | | this.loadTree() |
| | | } else { |
| | | // this.$message.error(res.message) |
| | | this.$notification.warning({ |
| | | message:'æ¶æ¯', |
| | | description:res.message |
| | | }); |
| | | } |
| | | }) |
| | | } |
| | | }) |
| | | }, |
| | | emptyCurrForm() { |
| | | this.$refs.form.resetFields(); |
| | | this.model={} |
| | | }, |
| | | nodeSettingFormSubmit() { |
| | | this.$refs.form.validate(valid => { |
| | | if (valid) { |
| | | console.log('Received values of form: ', this.model) |
| | | } |
| | | }) |
| | | }, |
| | | openSelect() { |
| | | this.$refs.sysDirectiveModal.show() |
| | | }, |
| | | handleAdd(num) { |
| | | if (num == 1) { |
| | | this.$refs.departModal.add() |
| | | this.$refs.departModal.title = 'æ°å¢' |
| | | } else if (num == 2) { |
| | | console.log(this.currSelected) |
| | | let key = this.currSelected.key |
| | | if (!key) { |
| | | this.$message.warning('请å
ç¹å»éä¸ä¸çº§é¨é¨ï¼') |
| | | return false |
| | | } |
| | | this.$refs.departModal.add(this.selectedKeys) |
| | | this.$refs.departModal.title = 'æ°å¢' |
| | | } else { |
| | | this.$refs.departModal.add(this.rightClickSelectedKey) |
| | | this.$refs.departModal.title = 'æ°å¢' |
| | | } |
| | | }, |
| | | handleDelete() { |
| | | var that = this |
| | | this.$confirm({ |
| | | title: '确认å é¤', |
| | | content: 'ç¡®å®è¦å 餿¤é¨é¨ä»¥ååèç¹æ°æ®å?', |
| | | content: 'ç¡®å®è¦å 餿éä¸ç ' + this.checkedKeys.length + ' æ¡æ°æ®ï¼ä»¥ååèç¹æ°æ®å?', |
| | | onOk: function () { |
| | | deleteByDepartId({id: that.rightClickSelectedKey}).then((resp) => { |
| | | if (resp.success) { |
| | | //å 餿ååï¼å»é¤å·²éä¸ä¸çæ°æ® |
| | | that.checkedKeys.splice(that.checkedKeys.findIndex(key => key === that.rightClickSelectedKey), 1); |
| | | that.$message.success('å 餿å!') |
| | | deleteAction(that.url.deleteBatch, { ids: ids }).then((res) => { |
| | | if (res.success) { |
| | | // that.$message.success(res.message) |
| | | that.$notification.warning({ |
| | | message: 'æ¶æ¯', |
| | | description: res.message |
| | | }); |
| | | that.loadTree() |
| | | //å é¤å忥æ¸
空å³ä¾§åºæ¬ä¿¡æ¯å
容 |
| | | let orgCode=that.model.orgCode; |
| | | if(orgCode && orgCode === that.rightClickSelectedOrgCode){ |
| | | that.onClearSelected() |
| | | } |
| | | that.onClearSelected() |
| | | } else { |
| | | that.$message.warning('å é¤å¤±è´¥!') |
| | | // that.$message.warning(res.message) |
| | | that.$notification.warning({ |
| | | message: 'æ¶æ¯', |
| | | description: res.message |
| | | }); |
| | | } |
| | | }) |
| | | } |
| | | }) |
| | | }, |
| | | selectDirectiveOk(record) { |
| | | console.log('éä¸æä»¤æ°æ®', record) |
| | | this.nodeSettingForm.setFieldsValue({directiveCode: record.directiveCode}) |
| | | this.currSelected.sysCode = record.sysCode |
| | | }, |
| | | getFlowGraphData(node) { |
| | | this.graphDatasource.nodes.push({ |
| | | id: node.id, |
| | | text: node.flowNodeName |
| | | } |
| | | }, |
| | | onSearch(value) { |
| | | let that = this |
| | | if (value) { |
| | | searchByKeywords({ keyWord: value }).then((res) => { |
| | | if (res.success) { |
| | | that.departTree = [] |
| | | for (let i = 0; i < res.result.length; i++) { |
| | | let temp = res.result[i] |
| | | that.departTree.push(temp) |
| | | } |
| | | } else { |
| | | // that.$message.warning(res.message) |
| | | that.$notification.warning({ |
| | | message: 'æ¶æ¯', |
| | | description: res.message |
| | | }); |
| | | } |
| | | }) |
| | | if (node.children.length > 0) { |
| | | for (let a = 0; a < node.children.length; a++) { |
| | | let temp = node.children[a] |
| | | this.graphDatasource.edges.push({ |
| | | source: node.id, |
| | | target: temp.id |
| | | }) |
| | | this.getFlowGraphData(temp) |
| | | } |
| | | } |
| | | }, |
| | | } else { |
| | | that.loadTree() |
| | | } |
| | | |
| | | }, |
| | | nodeModalOk() { |
| | | this.loadTree() |
| | | }, |
| | | nodeModalClose() { |
| | | }, |
| | | hide() { |
| | | console.log(111) |
| | | this.visible = false |
| | | }, |
| | | onCheck(checkedKeys, info) { |
| | | console.log('onCheck', checkedKeys, info) |
| | | this.hiding = false |
| | | //---- author:os_chengtgen -- date:20190827 -- for:忢ç¶åå¾éæ¨¡å¼ =======------ |
| | | expandAll () { |
| | | this.iExpandedKeys = this.allTreeKeys |
| | | }, |
| | | closeAll () { |
| | | this.iExpandedKeys = [] |
| | | }, |
| | | checkALL () { |
| | | this.checkStriccheckStrictlytly = false |
| | | this.checkedKeys = this.allTreeKeys |
| | | }, |
| | | cancelCheckALL () { |
| | | //this.checkedKeys = this.defaultCheckedKeys |
| | | this.checkedKeys = [] |
| | | }, |
| | | switchCheckStrictly (v) { |
| | | if(v==1){ |
| | | this.checkStrictly = false |
| | | }else if(v==2){ |
| | | this.checkStrictly = true |
| | | } |
| | | }, |
| | | getAllKeys(node) { |
| | | // console.log('node',node); |
| | | this.allTreeKeys.push(node.key) |
| | | if (node.children && node.children.length > 0) { |
| | | for (let a = 0; a < node.children.length; a++) { |
| | | this.getAllKeys(node.children[a]) |
| | | } |
| | | } |
| | | if (this.checkStrictly) { |
| | | this.checkedKeys = checkedKeys.checked; |
| | | } else { |
| | | this.checkedKeys = checkedKeys |
| | | } |
| | | //---- author:os_chengtgen -- date:20190827 -- for:忢ç¶åå¾éæ¨¡å¼ =======------ |
| | | }, |
| | | onSelect(selectedKeys, e) { |
| | | console.log('selected', selectedKeys, e) |
| | | this.hiding = false |
| | | let record = e.node.dataRef |
| | | console.log('onSelect-record', record) |
| | | this.currSelected = Object.assign({}, record) |
| | | this.model = this.currSelected |
| | | this.selectedKeys = [record.key] |
| | | this.model.parentId = record.parentId |
| | | this.setValuesToForm(record) |
| | | if (this.isDepartType == 0) { |
| | | this.$refs.departAuth.show(record.id); |
| | | this.$refs.departTeam.show(record.id); |
| | | } |
| | | |
| | | this.$refs.departMAuth.show(record.id) |
| | | |
| | | }, |
| | | created() { |
| | | this.queryTreeData() |
| | | this.currFlowId = this.$route.params.id |
| | | this.currFlowName = this.$route.params.name |
| | | // this.loadTree() |
| | | // 触åonSelectäºä»¶æ¶,为é¨é¨æ å³ä¾§çform表åèµå¼ |
| | | setValuesToForm(record) { |
| | | if (record.orgCategory == '1') { |
| | | this.orgCategoryDisabled = true; |
| | | } else { |
| | | this.orgCategoryDisabled = false; |
| | | } |
| | | }, |
| | | getCurrSelectedTitle() { |
| | | return !this.currSelected.title ? '' : this.currSelected.title |
| | | }, |
| | | onClearSelected() { |
| | | this.hiding = true |
| | | this.checkedKeys = [] |
| | | this.currSelected = {} |
| | | this.selectedKeys = [] |
| | | if (this.isDepartType == 0) { |
| | | this.$refs.departAuth.departId = '' |
| | | this.$refs.departTeam.departId = '' |
| | | } |
| | | this.$refs.departMAuth.departId = '' |
| | | }, |
| | | handleNodeTypeChange(val) { |
| | | this.currSelected.nodeType = val |
| | | }, |
| | | notifyTriggerTypeChange(value) { |
| | | this.currSelected.notifyTriggerType = value |
| | | }, |
| | | receiptTriggerTypeChange(value) { |
| | | this.currSelected.receiptTriggerType = value |
| | | }, |
| | | submitCurrForm() { |
| | | this.$refs.form.validate(valid => { |
| | | if (valid) { |
| | | if (!this.currSelected.id) { |
| | | // this.$message.warning('请ç¹å»éæ©è¦ä¿®æ¹é¨é¨!') |
| | | this.$notification.warning({ |
| | | message: 'æ¶æ¯', |
| | | description: "请ç¹å»éæ©è¦ä¿®æ¹é¨é¨" |
| | | }); |
| | | return |
| | | } |
| | | |
| | | } |
| | | httpAction(this.url.edit, this.currSelected, 'put').then((res) => { |
| | | if (res.success) { |
| | | // this.$message.success('ä¿åæå!') |
| | | this.$notification.warning({ |
| | | message: 'æ¶æ¯', |
| | | description: "ä¿åæå" |
| | | }); |
| | | this.loadTree() |
| | | } else { |
| | | // this.$message.error(res.message) |
| | | this.$notification.warning({ |
| | | message: 'æ¶æ¯', |
| | | description: res.message |
| | | }); |
| | | } |
| | | }) |
| | | } |
| | | }) |
| | | }, |
| | | emptyCurrForm() { |
| | | this.$refs.form.resetFields(); |
| | | this.model = {} |
| | | }, |
| | | nodeSettingFormSubmit() { |
| | | this.$refs.form.validate(valid => { |
| | | if (valid) { |
| | | console.log('Received values of form: ', this.model) |
| | | } |
| | | }) |
| | | }, |
| | | openSelect() { |
| | | this.$refs.sysDirectiveModal.show() |
| | | }, |
| | | handleAdd(num) { |
| | | if (num == 1) { |
| | | this.$refs.departModal.add() |
| | | this.$refs.departModal.title = 'æ°å¢' |
| | | } else if (num == 2) { |
| | | console.log(this.currSelected) |
| | | let key = this.currSelected.key |
| | | if (!key) { |
| | | this.$message.warning('请å
ç¹å»éä¸ä¸çº§é¨é¨ï¼') |
| | | return false |
| | | } |
| | | this.$refs.departModal.add(this.selectedKeys) |
| | | this.$refs.departModal.title = 'æ°å¢' |
| | | } else { |
| | | this.$refs.departModal.add(this.rightClickSelectedKey) |
| | | this.$refs.departModal.title = 'æ°å¢' |
| | | } |
| | | }, |
| | | handleDelete() { |
| | | var that = this |
| | | this.$confirm({ |
| | | title: '确认å é¤', |
| | | content: 'ç¡®å®è¦å 餿¤é¨é¨ä»¥ååèç¹æ°æ®å?', |
| | | onOk: function () { |
| | | deleteByDepartId({ id: that.rightClickSelectedKey }).then((resp) => { |
| | | if (resp.success) { |
| | | //å 餿ååï¼å»é¤å·²éä¸ä¸çæ°æ® |
| | | that.checkedKeys.splice(that.checkedKeys.findIndex(key => key === that.rightClickSelectedKey), 1); |
| | | that.$message.success('å 餿å!') |
| | | that.loadTree() |
| | | //å é¤å忥æ¸
空å³ä¾§åºæ¬ä¿¡æ¯å
容 |
| | | let orgCode = that.model.orgCode; |
| | | if (orgCode && orgCode === that.rightClickSelectedOrgCode) { |
| | | that.onClearSelected() |
| | | } |
| | | } else { |
| | | that.$message.warning('å é¤å¤±è´¥!') |
| | | } |
| | | }) |
| | | } |
| | | }) |
| | | }, |
| | | selectDirectiveOk(record) { |
| | | console.log('éä¸æä»¤æ°æ®', record) |
| | | this.nodeSettingForm.setFieldsValue({ directiveCode: record.directiveCode }) |
| | | this.currSelected.sysCode = record.sysCode |
| | | }, |
| | | getFlowGraphData(node) { |
| | | this.graphDatasource.nodes.push({ |
| | | id: node.id, |
| | | text: node.flowNodeName |
| | | }) |
| | | if (node.children.length > 0) { |
| | | for (let a = 0; a < node.children.length; a++) { |
| | | let temp = node.children[a] |
| | | this.graphDatasource.edges.push({ |
| | | source: node.id, |
| | | target: temp.id |
| | | }) |
| | | this.getFlowGraphData(temp) |
| | | } |
| | | } |
| | | }, |
| | | //---- author:os_chengtgen -- date:20190827 -- for:忢ç¶åå¾éæ¨¡å¼ =======------ |
| | | expandAll() { |
| | | this.iExpandedKeys = this.allTreeKeys |
| | | }, |
| | | closeAll() { |
| | | this.iExpandedKeys = [] |
| | | }, |
| | | checkALL() { |
| | | this.checkStriccheckStrictlytly = false |
| | | this.checkedKeys = this.allTreeKeys |
| | | }, |
| | | cancelCheckALL() { |
| | | //this.checkedKeys = this.defaultCheckedKeys |
| | | this.checkedKeys = [] |
| | | }, |
| | | switchCheckStrictly(v) { |
| | | if (v == 1) { |
| | | this.checkStrictly = false |
| | | } else if (v == 2) { |
| | | this.checkStrictly = true |
| | | } |
| | | }, |
| | | getAllKeys(node) { |
| | | // console.log('node',node); |
| | | this.allTreeKeys.push(node.key) |
| | | if (node.children && node.children.length > 0) { |
| | | for (let a = 0; a < node.children.length; a++) { |
| | | this.getAllKeys(node.children[a]) |
| | | } |
| | | } |
| | | } |
| | | //---- author:os_chengtgen -- date:20190827 -- for:忢ç¶åå¾éæ¨¡å¼ =======------ |
| | | |
| | | }, |
| | | created() { |
| | | this.queryTreeData() |
| | | this.currFlowId = this.$route.params.id |
| | | this.currFlowName = this.$route.params.name |
| | | // this.loadTree() |
| | | }, |
| | | |
| | | } |
| | | </script> |
| | | <style scoped> |
| | | .ant-card-body .table-operator { |
| | | margin: 15px; |
| | | } |
| | | .ant-card-body .table-operator { |
| | | margin: 15px; |
| | | } |
| | | |
| | | .anty-form-btn { |
| | | width: 100%; |
| | | text-align: center; |
| | | } |
| | | .anty-form-btn { |
| | | width: 100%; |
| | | text-align: center; |
| | | } |
| | | |
| | | .anty-form-btn button { |
| | | margin: 0 5px; |
| | | } |
| | | .anty-form-btn button { |
| | | margin: 0 5px; |
| | | } |
| | | |
| | | .anty-node-layout .ant-layout-header { |
| | | padding-right: 0 |
| | | } |
| | | .anty-node-layout .ant-layout-header { |
| | | padding-right: 0; |
| | | } |
| | | |
| | | .header { |
| | | padding: 0 8px; |
| | | } |
| | | .header { |
| | | padding: 0 8px; |
| | | } |
| | | |
| | | .header button { |
| | | margin: 0 3px |
| | | } |
| | | .header button { |
| | | margin: 0 3px; |
| | | } |
| | | |
| | | .ant-modal-cust-warp { |
| | | height: 100% |
| | | } |
| | | .ant-modal-cust-warp { |
| | | height: 100%; |
| | | } |
| | | |
| | | .ant-modal-cust-warp .ant-modal-body { |
| | | height: calc(100% - 110px) !important; |
| | | overflow-y: auto |
| | | } |
| | | .ant-modal-cust-warp .ant-modal-body { |
| | | height: calc(100% - 110px) !important; |
| | | overflow-y: auto; |
| | | } |
| | | |
| | | .ant-modal-cust-warp .ant-modal-content { |
| | | height: 90% !important; |
| | | overflow-y: hidden |
| | | } |
| | | .ant-modal-cust-warp .ant-modal-content { |
| | | height: 90% !important; |
| | | overflow-y: hidden; |
| | | } |
| | | |
| | | #app .desktop { |
| | | height: auto !important; |
| | | } |
| | | #app .desktop { |
| | | height: auto !important; |
| | | } |
| | | |
| | | /** Buttonæé®é´è· */ |
| | | .ant-btn { |
| | | margin-left: 3px |
| | | } |
| | | /** Buttonæé®é´è· */ |
| | | .ant-btn { |
| | | margin-left: 3px; |
| | | } |
| | | |
| | | .drawer-bootom-button { |
| | | /*position: absolute;*/ |
| | | bottom: 0; |
| | | width: 100%; |
| | | border-top: 1px solid #e8e8e8; |
| | | padding: 10px 16px; |
| | | text-align: left; |
| | | left: 0; |
| | | background: #fff; |
| | | border-radius: 0 0 2px 2px; |
| | | } |
| | | .drawer-bootom-button { |
| | | /*position: absolute;*/ |
| | | bottom: 0; |
| | | width: 100%; |
| | | border-top: 1px solid #e8e8e8; |
| | | padding: 10px 16px; |
| | | text-align: left; |
| | | left: 0; |
| | | background: #fff; |
| | | border-radius: 0 0 2px 2px; |
| | | } |
| | | </style> |
| | |
| | | <a-card :bordered="false"> |
| | | <template v-if="this.departId"> |
| | | <div class="table-page-search-wrapper"> |
| | | <a-form layout="inline" @keyup.enter.native="searchQuery"> |
| | | <a-form |
| | | layout="inline" |
| | | @keyup.enter.native="searchQuery" |
| | | > |
| | | <a-row :gutter="24"> |
| | | |
| | | <a-col :md="6" :sm="12"> |
| | | <a-col :span="24 / 2 "> |
| | | <a-form-item label="设å¤ç¼å·"> |
| | | <a-input placeholder="请è¾å
¥è®¾å¤ç¼å·" v-model="queryParam.equipmentId"></a-input> |
| | | <a-input |
| | | placeholder="请è¾å
¥è®¾å¤ç¼å·" |
| | | v-model="queryParam.equipmentId" |
| | | ></a-input> |
| | | </a-form-item> |
| | | </a-col> |
| | | <a-col :md="6" :sm="8"> |
| | | <a-button type="primary" @click="searchQuery" icon="search">æ¥è¯¢</a-button> |
| | | <a-button type="primary" @click="searchReset" icon="reload" style="margin-left: 8px">éç½®</a-button> |
| | | <a-col :span="24 / 2 "> |
| | | <a-button |
| | | type="primary" |
| | | @click="searchQuery" |
| | | icon="search" |
| | | >æ¥è¯¢</a-button> |
| | | <a-button |
| | | type="primary" |
| | | @click="searchReset" |
| | | icon="reload" |
| | | style="margin-left: 8px" |
| | | >éç½®</a-button> |
| | | </a-col> |
| | | </a-row> |
| | | </a-form> |
| | | </div> |
| | | <div class="table-operator" style="border-top: 5px"> |
| | | <div |
| | | class="table-operator" |
| | | style="border-top: 5px" |
| | | > |
| | | <a-dropdown v-if="selectedRowKeys.length > 0"> |
| | | <a-menu slot="overlay" @click="handleMenuClick"> |
| | | <a-menu |
| | | slot="overlay" |
| | | @click="handleMenuClick" |
| | | > |
| | | <a-menu-item key="1"> |
| | | <a-icon type="delete" @click="batchDel"/> |
| | | <a-icon |
| | | type="delete" |
| | | @click="batchDel" |
| | | /> |
| | | æ¹éç§»é¤ |
| | | </a-menu-item> |
| | | </a-menu> |
| | | <a-button style="margin-left: 8px"> |
| | | æ¹éæä½ |
| | | <a-icon type="down"/> |
| | | <a-icon type="down" /> |
| | | </a-button> |
| | | </a-dropdown> |
| | | </div> |
| | |
| | | :pagination="ipagination" |
| | | :loading="loading" |
| | | :rowSelection="{selectedRowKeys: selectedRowKeys, onChange: onSelectChange}" |
| | | @change="handleTableChange"> |
| | | @change="handleTableChange" |
| | | > |
| | | |
| | | <!--<template slot="avatarslot" slot-scope="text, record, index">--> |
| | | <!--<div class="anty-img-wrap">--> |
| | | <!--<a-avatar shape="square" :src="getAvatarView(record.avatar)" icon="user"/>--> |
| | | <!--</div>--> |
| | | <!--<div class="anty-img-wrap">--> |
| | | <!--<a-avatar shape="square" :src="getAvatarView(record.avatar)" icon="user"/>--> |
| | | <!--</div>--> |
| | | <!--</template>--> |
| | | |
| | | <span slot="action" slot-scope="text, record"> |
| | | <a-popconfirm title="ç¡®å®ç§»é¤å?" @confirm="() => handleDelete(record.id)"> |
| | | <a>ç§»é¤</a> |
| | | </a-popconfirm> |
| | | <span |
| | | slot="action" |
| | | slot-scope="text, record" |
| | | > |
| | | <a-popconfirm |
| | | title="ç¡®å®ç§»é¤å?" |
| | | @confirm="() => handleDelete(record.id)" |
| | | > |
| | | <a>ç§»é¤</a> |
| | | </a-popconfirm> |
| | | </span> |
| | | </a-table> |
| | | </template> |
| | | <a-card v-else :bordered="false" style="height:200px"> |
| | | <a-card |
| | | v-else |
| | | :bordered="false" |
| | | style="height:200px" |
| | | > |
| | | <a-empty> |
| | | <span slot="description"> 请å
éæ©ä¸ä¸ªé¨é¨! </span> |
| | | </a-empty> |
| | |
| | | </template> |
| | | |
| | | <script> |
| | | import {queryTreeListForRole,queryDepartPermission,saveDepartPermission} from '@/api/api' |
| | | import DepartDataruleModal from './DepartDataruleModal' |
| | | import {JeecgListMixin} from '@/mixins/JeecgListMixin' |
| | | import { getAction,postAction } from '@/api/manage' |
| | | import { filterObj } from '@/utils/util' |
| | | import qs from 'qs' |
| | | export default { |
| | | name: 'DepartAuthModal', |
| | | mixins: [JeecgListMixin], |
| | | components: { DepartDataruleModal }, |
| | | data(){ |
| | | return { |
| | | queryParam:{}, |
| | | columns: [ |
| | | { |
| | | title: '#', |
| | | dataIndex: '', |
| | | key:'rowIndex', |
| | | width:60, |
| | | align:"center", |
| | | customRender:function (t,r,index) { |
| | | return parseInt(index)+1; |
| | | } |
| | | }, |
| | | { |
| | | title: '设å¤ç¼å·', |
| | | align: "center", |
| | | dataIndex: 'equipmentId', |
| | | width: 120, |
| | | // sorter: true |
| | | }, |
| | | { |
| | | title: '设å¤åç§°', |
| | | align: "center", |
| | | width: 150, |
| | | dataIndex: 'equipmentName', |
| | | }, |
| | | { |
| | | title: '设å¤ç±»å', |
| | | align: "center", |
| | | width: 120, |
| | | dataIndex: 'equipmentType', |
| | | // scopedSlots: {customRender: "avatarslot"} |
| | | }, |
| | | |
| | | { |
| | | title: '驱å¨ç±»å', |
| | | align: "center", |
| | | width: 80, |
| | | dataIndex: 'driveType', |
| | | // sorter: true |
| | | }, |
| | | |
| | | { |
| | | title: 'æä½', |
| | | dataIndex: 'action', |
| | | scopedSlots: {customRender: 'action'}, |
| | | align: "center", |
| | | width: 120 |
| | | import { queryTreeListForRole, queryDepartPermission, saveDepartPermission } from '@/api/api' |
| | | import DepartDataruleModal from './DepartDataruleModal' |
| | | import { JeecgListMixin } from '@/mixins/JeecgListMixin' |
| | | import { getAction, postAction } from '@/api/manage' |
| | | import { filterObj } from '@/utils/util' |
| | | import qs from 'qs' |
| | | export default { |
| | | name: 'DepartAuthModal', |
| | | mixins: [JeecgListMixin], |
| | | components: { DepartDataruleModal }, |
| | | data() { |
| | | return { |
| | | queryParam: {}, |
| | | columns: [ |
| | | { |
| | | title: '#', |
| | | dataIndex: '', |
| | | key: 'rowIndex', |
| | | width: 60, |
| | | align: "center", |
| | | customRender: function (t, r, index) { |
| | | return parseInt(index) + 1; |
| | | } |
| | | }, |
| | | { |
| | | title: '设å¤ç¼å·', |
| | | align: "center", |
| | | dataIndex: 'equipmentId', |
| | | width: 120, |
| | | // sorter: true |
| | | }, |
| | | { |
| | | title: '设å¤åç§°', |
| | | align: "center", |
| | | width: 150, |
| | | dataIndex: 'equipmentName', |
| | | }, |
| | | { |
| | | title: '设å¤ç±»å', |
| | | align: "center", |
| | | width: 120, |
| | | dataIndex: 'equipmentType', |
| | | // scopedSlots: {customRender: "avatarslot"} |
| | | }, |
| | | |
| | | ], |
| | | disableMixinCreated:true, |
| | | departId:"", |
| | | title:"é¨é¨æéé
ç½®", |
| | | visible: false, |
| | | loading: false, |
| | | url:{ |
| | | list:'/mdc/mdcEquipment/equipmentListByDepart', |
| | | removeEquipmentForDepart:'/mdc/mdcEquipment/removeEquipmentForDepart', |
| | | serachEquipment:'/mdc/mdcEquipment/equipmentListByDepart', |
| | | removeEquipmentsForDepart:"/mdc/mdcEquipment/removeEquipmentsForDepart" |
| | | { |
| | | title: '驱å¨ç±»å', |
| | | align: "center", |
| | | width: 80, |
| | | dataIndex: 'driveType', |
| | | // sorter: true |
| | | }, |
| | | |
| | | { |
| | | title: 'æä½', |
| | | dataIndex: 'action', |
| | | scopedSlots: { customRender: 'action' }, |
| | | align: "center", |
| | | width: 120 |
| | | } |
| | | |
| | | ], |
| | | disableMixinCreated: true, |
| | | departId: "", |
| | | title: "é¨é¨æéé
ç½®", |
| | | visible: false, |
| | | loading: false, |
| | | url: { |
| | | list: '/mdc/mdcEquipment/equipmentListByDepart', |
| | | removeEquipmentForDepart: '/mdc/mdcEquipment/removeEquipmentForDepart', |
| | | serachEquipment: '/mdc/mdcEquipment/equipmentListByDepart', |
| | | removeEquipmentsForDepart: "/mdc/mdcEquipment/removeEquipmentsForDepart" |
| | | } |
| | | } |
| | | }, |
| | | methods: { |
| | | |
| | | show(departId) { |
| | | this.departId = departId |
| | | this.loadData(); |
| | | }, |
| | | close() { |
| | | this.reset() |
| | | this.$emit('close'); |
| | | this.visible = false; |
| | | }, |
| | | searchReset() { |
| | | this.queryParam = {} |
| | | this.loadData(); |
| | | }, |
| | | searchQuery() { |
| | | var id = this.queryParam.equipmentId |
| | | this.loading = true; |
| | | var params = this.getQueryParams();//æ¥è¯¢æ¡ä»¶ |
| | | |
| | | params.pageNo = this.ipagination.current; |
| | | params.pageSize = this.ipagination.pageSize; |
| | | getAction(this.url.serachEquipment, { equipmentId: this.queryParam.equipmentId, departId: this.departId, pageNo: params.pageNo, pageSize: params.pageSize }).then((res) => { |
| | | if (res.success) { |
| | | // console.log(res) |
| | | //update-begin---author:zhangyafei Date:20201118 forï¼éé
ä¸åé¡µçæ°æ®å表------------ |
| | | this.dataSource = res.result.records || res.result; |
| | | if (res.result.total) { |
| | | this.ipagination.total = res.result.total; |
| | | } else { |
| | | this.ipagination.total = 0; |
| | | } |
| | | //update-end---author:zhangyafei Date:20201118 forï¼éé
ä¸åé¡µçæ°æ®å表------------ |
| | | } else { |
| | | this.$message.warning(res.message) |
| | | } |
| | | }).finally(() => { |
| | | this.loading = false |
| | | }) |
| | | }, |
| | | handleTableChange(pagination, filters, sorter) { |
| | | //å页ãæåºãçéååæ¶è§¦å |
| | | //TODO çé |
| | | // console.log(pagination) |
| | | if (Object.keys(sorter).length > 0) { |
| | | this.isorter.column = sorter.field; |
| | | this.isorter.order = "ascend" == sorter.order ? "asc" : "desc" |
| | | } |
| | | this.ipagination = pagination; |
| | | this.loadData(); |
| | | }, |
| | | loadData() { |
| | | //å è½½æ°æ® è¥ä¼ å
¥åæ°1åå 载第ä¸é¡µçå
容 |
| | | // if (arg === 1) { |
| | | // this.ipagination.current = 1; |
| | | // } |
| | | var params = this.getQueryParams();//æ¥è¯¢æ¡ä»¶ |
| | | |
| | | params.pageNo = this.ipagination.current; |
| | | params.pageSize = this.ipagination.pageSize; |
| | | this.loading = true; |
| | | getAction(this.url.list, params).then((res) => { |
| | | if (res.success) { |
| | | // console.log(res) |
| | | //update-begin---author:zhangyafei Date:20201118 forï¼éé
ä¸åé¡µçæ°æ®å表------------ |
| | | this.dataSource = res.result.records || res.result; |
| | | if (res.result.total) { |
| | | this.ipagination.total = res.result.total; |
| | | } else { |
| | | this.ipagination.total = 0; |
| | | } |
| | | //update-end---author:zhangyafei Date:20201118 forï¼éé
ä¸åé¡µçæ°æ®å表------------ |
| | | } else { |
| | | // this.$message.warning(res.message) |
| | | this.$notification.warning({ |
| | | message: 'æ¶æ¯', |
| | | description: res.message |
| | | }); |
| | | } |
| | | }).finally(() => { |
| | | this.loading = false |
| | | }) |
| | | }, |
| | | getQueryParams() { |
| | | //è·åæ¥è¯¢æ¡ä»¶ |
| | | let sqp = {} |
| | | if (this.superQueryParams) { |
| | | sqp['superQueryParams'] = encodeURI(this.superQueryParams) |
| | | sqp['superQueryMatchType'] = this.superQueryMatchType |
| | | } |
| | | var param = Object.assign(sqp, this.queryParam, this.isorter, this.filters); |
| | | param.field = this.getQueryField(); |
| | | param.pageNo = this.ipagination.current; |
| | | param.pageSize = this.ipagination.pageSize; |
| | | param.departId = this.departId; |
| | | //è·åç¨æ·å®å¶ç忰屿§ |
| | | if (this.getCustomQueryParams) { |
| | | param = this.getCustomQueryParams(param); |
| | | if (!param) { |
| | | return false; |
| | | } |
| | | } |
| | | |
| | | return filterObj(param); |
| | | }, |
| | | methods: { |
| | | handleDelete(equipmentId) { |
| | | |
| | | show(departId){ |
| | | this.departId=departId |
| | | this.loadData(); |
| | | }, |
| | | close () { |
| | | this.reset() |
| | | this.$emit('close'); |
| | | this.visible = false; |
| | | }, |
| | | searchReset() { |
| | | this.queryParam = {} |
| | | this.loadData(); |
| | | }, |
| | | searchQuery() { |
| | | var id = this.queryParam.equipmentId |
| | | this.loading = true; |
| | | var params = this.getQueryParams();//æ¥è¯¢æ¡ä»¶ |
| | | |
| | | params.pageNo = this.ipagination.current; |
| | | params.pageSize = this.ipagination.pageSize; |
| | | getAction(this.url.serachEquipment,{equipmentId:this.queryParam.equipmentId,departId:this.departId,pageNo:params.pageNo,pageSize:params.pageSize}).then((res)=>{ |
| | | if (res.success) { |
| | | // console.log(res) |
| | | //update-begin---author:zhangyafei Date:20201118 forï¼éé
ä¸åé¡µçæ°æ®å表------------ |
| | | this.dataSource = res.result.records||res.result; |
| | | if(res.result.total) |
| | | { |
| | | this.ipagination.total = res.result.total; |
| | | }else{ |
| | | this.ipagination.total = 0; |
| | | } |
| | | //update-end---author:zhangyafei Date:20201118 forï¼éé
ä¸åé¡µçæ°æ®å表------------ |
| | | }else{ |
| | | this.$message.warning(res.message) |
| | | } |
| | | }).finally(() => { |
| | | this.loading = false |
| | | }) |
| | | }, |
| | | handleTableChange(pagination, filters, sorter) { |
| | | //å页ãæåºãçéååæ¶è§¦å |
| | | //TODO çé |
| | | // console.log(pagination) |
| | | if (Object.keys(sorter).length > 0) { |
| | | this.isorter.column = sorter.field; |
| | | this.isorter.order = "ascend" == sorter.order ? "asc" : "desc" |
| | | } |
| | | this.ipagination = pagination; |
| | | this.loadData(); |
| | | }, |
| | | loadData(){ |
| | | //å è½½æ°æ® è¥ä¼ å
¥åæ°1åå 载第ä¸é¡µçå
容 |
| | | // if (arg === 1) { |
| | | // this.ipagination.current = 1; |
| | | // } |
| | | var params = this.getQueryParams();//æ¥è¯¢æ¡ä»¶ |
| | | |
| | | params.pageNo = this.ipagination.current; |
| | | params.pageSize = this.ipagination.pageSize; |
| | | this.loading = true; |
| | | getAction(this.url.list,params).then((res)=>{ |
| | | if (res.success) { |
| | | // console.log(res) |
| | | //update-begin---author:zhangyafei Date:20201118 forï¼éé
ä¸åé¡µçæ°æ®å表------------ |
| | | this.dataSource = res.result.records||res.result; |
| | | if(res.result.total) |
| | | { |
| | | this.ipagination.total = res.result.total; |
| | | }else{ |
| | | this.ipagination.total = 0; |
| | | } |
| | | //update-end---author:zhangyafei Date:20201118 forï¼éé
ä¸åé¡µçæ°æ®å表------------ |
| | | }else{ |
| | | // this.$message.warning(res.message) |
| | | this.$notification.warning({ |
| | | message:'æ¶æ¯', |
| | | description:res.message |
| | | }); |
| | | } |
| | | }).finally(() => { |
| | | this.loading = false |
| | | }) |
| | | }, |
| | | getQueryParams() { |
| | | //è·åæ¥è¯¢æ¡ä»¶ |
| | | let sqp = {} |
| | | if(this.superQueryParams){ |
| | | sqp['superQueryParams']=encodeURI(this.superQueryParams) |
| | | sqp['superQueryMatchType'] = this.superQueryMatchType |
| | | } |
| | | var param = Object.assign(sqp, this.queryParam, this.isorter ,this.filters); |
| | | param.field = this.getQueryField(); |
| | | param.pageNo = this.ipagination.current; |
| | | param.pageSize = this.ipagination.pageSize; |
| | | param.departId = this.departId; |
| | | //è·åç¨æ·å®å¶ç忰屿§ |
| | | if (this.getCustomQueryParams) { |
| | | param = this.getCustomQueryParams(param); |
| | | if(!param){ |
| | | return false; |
| | | } |
| | | } |
| | | |
| | | return filterObj(param); |
| | | }, |
| | | handleDelete(equipmentId){ |
| | | |
| | | postAction(this.url.removeEquipmentForDepart,qs.stringify({departId:this.departId,equipmentId:equipmentId})).then((res)=>{ |
| | | if (res.success) { |
| | | // this.$message.warning(res.message) |
| | | this.$notification.success({ |
| | | message:'æ¶æ¯', |
| | | description:res.message |
| | | }); |
| | | |
| | | this.loadData(this.departId); |
| | | }else{ |
| | | // this.$message.warning(res.message) |
| | | this.$notification.warning({ |
| | | message:'æ¶æ¯', |
| | | description:res.message |
| | | }); |
| | | |
| | | } |
| | | }).finally(() => { |
| | | |
| | | }) |
| | | }, |
| | | handleMenuClick(e) { |
| | | if (e.key == 1) { |
| | | this.batchDel(); |
| | | } |
| | | }, |
| | | batchDel: function () { |
| | | if(!this.url.removeEquipmentsForDepart){ |
| | | this.$message.error("请设置url.removeEquipmentsForDepart屿§!") |
| | | return |
| | | } |
| | | if (this.selectedRowKeys.length <= 0) { |
| | | // this.$message.warning('è¯·éæ©ä¸æ¡è®°å½ï¼'); |
| | | this.$notification.warning({ |
| | | message:'æ¶æ¯', |
| | | description:"è¯·éæ©ä¸æ¡è®°å½" |
| | | postAction(this.url.removeEquipmentForDepart, qs.stringify({ departId: this.departId, equipmentId: equipmentId })).then((res) => { |
| | | if (res.success) { |
| | | // this.$message.warning(res.message) |
| | | this.$notification.success({ |
| | | message: 'æ¶æ¯', |
| | | description: res.message |
| | | }); |
| | | return; |
| | | |
| | | this.loadData(this.departId); |
| | | } else { |
| | | var ids = ""; |
| | | for (var a = 0; a < this.selectedRowKeys.length; a++) { |
| | | ids += this.selectedRowKeys[a] + ","; |
| | | } |
| | | var that = this; |
| | | this.$confirm({ |
| | | title: "确认å é¤", |
| | | content: "æ¯å¦å é¤é䏿°æ®?", |
| | | onOk: function () { |
| | | that.loading = true; |
| | | postAction(that.url.removeEquipmentsForDepart,qs.stringify({departId:that.departId,equipmentIds:ids})).then((res) => { |
| | | if (res.success) { |
| | | //éæ°è®¡ç®å页é®é¢ |
| | | that.reCalculatePage(that.selectedRowKeys.length) |
| | | // that.$message.success(res.message); |
| | | that.$notification.success({ |
| | | message:'æ¶æ¯', |
| | | description:res.message |
| | | }); |
| | | that.loadData(that.departId); |
| | | that.onClearSelected(); |
| | | } else { |
| | | // that.$message.warning(res.message); |
| | | that.$notification.warning({ |
| | | message:'æ¶æ¯', |
| | | description:res.message |
| | | }); |
| | | } |
| | | }).finally(() => { |
| | | that.loading = false; |
| | | }); |
| | | } |
| | | // this.$message.warning(res.message) |
| | | this.$notification.warning({ |
| | | message: 'æ¶æ¯', |
| | | description: res.message |
| | | }); |
| | | |
| | | } |
| | | }, |
| | | }).finally(() => { |
| | | |
| | | }) |
| | | }, |
| | | } |
| | | handleMenuClick(e) { |
| | | if (e.key == 1) { |
| | | this.batchDel(); |
| | | } |
| | | }, |
| | | batchDel: function () { |
| | | if (!this.url.removeEquipmentsForDepart) { |
| | | this.$message.error("请设置url.removeEquipmentsForDepart屿§!") |
| | | return |
| | | } |
| | | if (this.selectedRowKeys.length <= 0) { |
| | | // this.$message.warning('è¯·éæ©ä¸æ¡è®°å½ï¼'); |
| | | this.$notification.warning({ |
| | | message: 'æ¶æ¯', |
| | | description: "è¯·éæ©ä¸æ¡è®°å½" |
| | | }); |
| | | return; |
| | | } else { |
| | | var ids = ""; |
| | | for (var a = 0; a < this.selectedRowKeys.length; a++) { |
| | | ids += this.selectedRowKeys[a] + ","; |
| | | } |
| | | var that = this; |
| | | this.$confirm({ |
| | | title: "确认å é¤", |
| | | content: "æ¯å¦å é¤é䏿°æ®?", |
| | | onOk: function () { |
| | | that.loading = true; |
| | | postAction(that.url.removeEquipmentsForDepart, qs.stringify({ departId: that.departId, equipmentIds: ids })).then((res) => { |
| | | if (res.success) { |
| | | //éæ°è®¡ç®å页é®é¢ |
| | | that.reCalculatePage(that.selectedRowKeys.length) |
| | | // that.$message.success(res.message); |
| | | that.$notification.success({ |
| | | message: 'æ¶æ¯', |
| | | description: res.message |
| | | }); |
| | | that.loadData(that.departId); |
| | | that.onClearSelected(); |
| | | } else { |
| | | // that.$message.warning(res.message); |
| | | that.$notification.warning({ |
| | | message: 'æ¶æ¯', |
| | | description: res.message |
| | | }); |
| | | } |
| | | }).finally(() => { |
| | | that.loading = false; |
| | | }); |
| | | } |
| | | }); |
| | | } |
| | | }, |
| | | }, |
| | | } |
| | | </script> |
| | | |
| | | <style scoped> |
| | | |
| | | </style> |
| | |
| | | :okButtonProps="{ props: {disabled: disableSubmit} }" |
| | | @ok="handleOk" |
| | | @cancel="handleCancel" |
| | | cancelText="å
³é"> |
| | | cancelText="å
³é" |
| | | > |
| | | |
| | | <a-spin :spinning="confirmLoading"> |
| | | <a-form-model ref="form" :model="model" :rules="validatorRules"> |
| | | <a-form-model |
| | | ref="form" |
| | | :model="model" |
| | | :rules="validatorRules" |
| | | > |
| | | <a-form-model-item |
| | | :labelCol="labelCol" |
| | | :wrapperCol="wrapperCol" |
| | | label="æºæåç§°" |
| | | prop="departName" |
| | | :hidden="false" |
| | | hasFeedback > |
| | | <a-input id="departName" placeholder="请è¾å
¥æºæ/é¨é¨åç§°" v-model="model.departName"/> |
| | | </a-form-model-item> |
| | | <a-form-model-item :labelCol="labelCol" :wrapperCol="wrapperCol" :hidden="seen" label="ä¸çº§é¨é¨" hasFeedback> |
| | | <a-tree-select |
| | | style="width:100%" |
| | | :dropdownStyle="{maxHeight:'200px',overflow:'auto'}" |
| | | :treeData="departTree" |
| | | v-model="model.parentId" |
| | | placeholder="è¯·éæ©ä¸çº§é¨é¨" |
| | | :disabled="condition"> |
| | | </a-tree-select> |
| | | </a-form-model-item> |
| | | <!--<a-form-model-item--> |
| | | <!--:labelCol="labelCol"--> |
| | | <!--:wrapperCol="wrapperCol"--> |
| | | <!--label="æºæç±»å">--> |
| | | <!--<template v-if="seen">--> |
| | | <!--<a-radio-group v-model="model.orgCategory" placeholder="è¯·éæ©æºæç±»å">--> |
| | | <!--<a-radio value="1">--> |
| | | <!--å
¬å¸--> |
| | | <!--</a-radio>--> |
| | | <!--</a-radio-group>--> |
| | | <!--</template>--> |
| | | <!--<template v-else>--> |
| | | <!--<a-radio-group v-model="model.orgCategory" placeholder="è¯·éæ©æºæç±»å">--> |
| | | <!--<a-radio value="2">--> |
| | | <!--é¨é¨--> |
| | | <!--</a-radio>--> |
| | | <!--<a-radio value="3">--> |
| | | <!--å²ä½--> |
| | | <!--</a-radio>--> |
| | | <!--</a-radio-group>--> |
| | | <!--</template>--> |
| | | <!--</a-form-model-item>--> |
| | | <!--<a-form-model-item--> |
| | | <!--:labelCol="labelCol"--> |
| | | <!--:wrapperCol="wrapperCol"--> |
| | | <!--prop="mobile"--> |
| | | <!--label="çµè¯">--> |
| | | <!--<a-input placeholder="请è¾å
¥çµè¯" v-model="model.mobile"/>--> |
| | | <!--</a-form-model-item>--> |
| | | <!--<a-form-model-item--> |
| | | <!--:labelCol="labelCol"--> |
| | | <!--:wrapperCol="wrapperCol"--> |
| | | <!--label="ä¼ ç">--> |
| | | <!--<a-input placeholder="请è¾å
¥ä¼ ç" v-model="model.fax"/>--> |
| | | <!--</a-form-model-item>--> |
| | | <!--<a-form-model-item--> |
| | | <!--:labelCol="labelCol"--> |
| | | <!--:wrapperCol="wrapperCol"--> |
| | | <!--label="å°å">--> |
| | | <!--<a-input placeholder="请è¾å
¥å°å" v-model="model.address"/>--> |
| | | <!--</a-form-model-item>--> |
| | | <a-form-model-item |
| | | :labelCol="labelCol" |
| | | :wrapperCol="wrapperCol" |
| | | label="æåº"> |
| | | <a-input-number v-model="model.departOrder"/> |
| | | hasFeedback |
| | | > |
| | | <a-input |
| | | id="departName" |
| | | placeholder="请è¾å
¥æºæ/é¨é¨åç§°" |
| | | v-model="model.departName" |
| | | /> |
| | | </a-form-model-item> |
| | | <a-form-model-item |
| | | :labelCol="labelCol" |
| | | :wrapperCol="wrapperCol" |
| | | label="夿³¨"> |
| | | <a-textarea placeholder="请è¾å
¥å¤æ³¨" v-model="model.memo"/> |
| | | label="使ç¨é¨é¨ç¼ç " |
| | | prop="useDepartNum" |
| | | :hidden="false" |
| | | hasFeedback |
| | | > |
| | | <a-input |
| | | id="useDepartNum" |
| | | placeholder="请è¾å
¥ä½¿ç¨é¨é¨ç¼ç " |
| | | v-model="model.useDepartNum" |
| | | /> |
| | | </a-form-model-item> |
| | | <a-form-model-item |
| | | :labelCol="labelCol" |
| | | :wrapperCol="wrapperCol" |
| | | label="ç»´ä¿®é¨é¨ç¼ç " |
| | | prop="repairDepartNum" |
| | | :hidden="false" |
| | | hasFeedback |
| | | > |
| | | <a-input |
| | | id="repairDepartNum" |
| | | placeholder="请è¾å
¥ç»´ä¿®é¨é¨ç¼ç " |
| | | v-model="model.repairDepartNum" |
| | | /> |
| | | </a-form-model-item> |
| | | <a-form-model-item |
| | | :labelCol="labelCol" |
| | | :wrapperCol="wrapperCol" |
| | | :hidden="seen" |
| | | label="ä¸çº§é¨é¨" |
| | | hasFeedback |
| | | > |
| | | <a-tree-select |
| | | style="width:100%" |
| | | :dropdownStyle="{maxHeight:'200px',overflow:'auto'}" |
| | | :treeData="departTree" |
| | | v-model="model.parentId" |
| | | placeholder="è¯·éæ©ä¸çº§é¨é¨" |
| | | :disabled="condition" |
| | | > |
| | | </a-tree-select> |
| | | </a-form-model-item> |
| | | <!--<a-form-model-item--> |
| | | <!--:labelCol="labelCol"--> |
| | | <!--:wrapperCol="wrapperCol"--> |
| | | <!--label="æºæç±»å">--> |
| | | <!--<template v-if="seen">--> |
| | | <!--<a-radio-group v-model="model.orgCategory" placeholder="è¯·éæ©æºæç±»å">--> |
| | | <!--<a-radio value="1">--> |
| | | <!--å
¬å¸--> |
| | | <!--</a-radio>--> |
| | | <!--</a-radio-group>--> |
| | | <!--</template>--> |
| | | <!--<template v-else>--> |
| | | <!--<a-radio-group v-model="model.orgCategory" placeholder="è¯·éæ©æºæç±»å">--> |
| | | <!--<a-radio value="2">--> |
| | | <!--é¨é¨--> |
| | | <!--</a-radio>--> |
| | | <!--<a-radio value="3">--> |
| | | <!--å²ä½--> |
| | | <!--</a-radio>--> |
| | | <!--</a-radio-group>--> |
| | | <!--</template>--> |
| | | <!--</a-form-model-item>--> |
| | | <!--<a-form-model-item--> |
| | | <!--:labelCol="labelCol"--> |
| | | <!--:wrapperCol="wrapperCol"--> |
| | | <!--prop="mobile"--> |
| | | <!--label="çµè¯">--> |
| | | <!--<a-input placeholder="请è¾å
¥çµè¯" v-model="model.mobile"/>--> |
| | | <!--</a-form-model-item>--> |
| | | <!--<a-form-model-item--> |
| | | <!--:labelCol="labelCol"--> |
| | | <!--:wrapperCol="wrapperCol"--> |
| | | <!--label="ä¼ ç">--> |
| | | <!--<a-input placeholder="请è¾å
¥ä¼ ç" v-model="model.fax"/>--> |
| | | <!--</a-form-model-item>--> |
| | | <!--<a-form-model-item--> |
| | | <!--:labelCol="labelCol"--> |
| | | <!--:wrapperCol="wrapperCol"--> |
| | | <!--label="å°å">--> |
| | | <!--<a-input placeholder="请è¾å
¥å°å" v-model="model.address"/>--> |
| | | <!--</a-form-model-item>--> |
| | | <a-form-model-item |
| | | :labelCol="labelCol" |
| | | :wrapperCol="wrapperCol" |
| | | label="æåº" |
| | | > |
| | | <a-input-number v-model="model.departOrder" /> |
| | | </a-form-model-item> |
| | | <a-form-model-item |
| | | :labelCol="labelCol" |
| | | :wrapperCol="wrapperCol" |
| | | label="夿³¨" |
| | | > |
| | | <a-textarea |
| | | placeholder="请è¾å
¥å¤æ³¨" |
| | | v-model="model.memo" |
| | | /> |
| | | </a-form-model-item> |
| | | |
| | | </a-form-model> |
| | |
| | | </template> |
| | | |
| | | <script> |
| | | import { httpAction } from '@/api/manage' |
| | | import { queryIdTree } from '@/api/api' |
| | | import pick from 'lodash.pick' |
| | | import ATextarea from 'ant-design-vue/es/input/TextArea' |
| | | export default { |
| | | name: "SysDepartModal", |
| | | components: { ATextarea }, |
| | | data () { |
| | | return { |
| | | departTree:[], |
| | | orgTypeData:[], |
| | | phoneWarning:'', |
| | | departName:"", |
| | | title:"æä½", |
| | | seen:false, |
| | | visible: false, |
| | | condition:true, |
| | | disableSubmit:false, |
| | | model: {}, |
| | | defaultModel:{ |
| | | departOrder:0, |
| | | orgCategory:'1' |
| | | }, |
| | | menuhidden:false, |
| | | menuusing:true, |
| | | labelCol: { |
| | | xs: { span: 24 }, |
| | | sm: { span: 5 }, |
| | | }, |
| | | wrapperCol: { |
| | | xs: { span: 24 }, |
| | | sm: { span: 16 }, |
| | | }, |
| | | import { httpAction } from '@/api/manage' |
| | | import { queryIdTree } from '@/api/api' |
| | | import pick from 'lodash.pick' |
| | | import ATextarea from 'ant-design-vue/es/input/TextArea' |
| | | export default { |
| | | name: "SysDepartModal", |
| | | components: { ATextarea }, |
| | | data() { |
| | | return { |
| | | departTree: [], |
| | | orgTypeData: [], |
| | | phoneWarning: '', |
| | | departName: "", |
| | | title: "æä½", |
| | | seen: false, |
| | | visible: false, |
| | | condition: true, |
| | | disableSubmit: false, |
| | | model: {}, |
| | | defaultModel: { |
| | | departOrder: 0, |
| | | orgCategory: '1' |
| | | }, |
| | | menuhidden: false, |
| | | menuusing: true, |
| | | labelCol: { |
| | | xs: { span: 24 }, |
| | | sm: { span: 5 }, |
| | | }, |
| | | wrapperCol: { |
| | | xs: { span: 24 }, |
| | | sm: { span: 16 }, |
| | | }, |
| | | |
| | | confirmLoading: false, |
| | | validatorRules:{ |
| | | departName:[{ required: true, message: '请è¾å
¥æºæ/é¨é¨åç§°!' }], |
| | | // orgCode:[{ required: true, message: '请è¾å
¥æºæç¼ç !' }], |
| | | // mobile: [{validator:this.validateMobile}], |
| | | // orgCategory:[{required: true, message: '请è¾å
¥æºæç±»å!'}] |
| | | }, |
| | | url: { |
| | | add: "/sys/sysDepart/add", |
| | | }, |
| | | dictDisabled:true, |
| | | confirmLoading: false, |
| | | validatorRules: { |
| | | departName: [{ required: true, message: '请è¾å
¥æºæ/é¨é¨åç§°!' }], |
| | | useDepartNum: [{ required: false, message: '请è¾å
¥ä½¿ç¨é¨é¨ç¼ç !' }], |
| | | repairDepartNum: [{ required: false, message: '请è¾å
¥ç»´ä¿®é¨é¨ç¼ç !' }], |
| | | // orgCode:[{ required: true, message: '请è¾å
¥æºæç¼ç !' }], |
| | | // mobile: [{validator:this.validateMobile}], |
| | | // orgCategory:[{required: true, message: '请è¾å
¥æºæç±»å!'}] |
| | | }, |
| | | url: { |
| | | add: "/sys/sysDepart/add", |
| | | }, |
| | | dictDisabled: true, |
| | | } |
| | | }, |
| | | created() { |
| | | }, |
| | | methods: { |
| | | loadTreeData() { |
| | | var that = this; |
| | | queryIdTree().then((res) => { |
| | | if (res.success) { |
| | | that.departTree = []; |
| | | for (let i = 0; i < res.result.length; i++) { |
| | | let temp = res.result[i]; |
| | | that.departTree.push(temp); |
| | | } |
| | | } |
| | | |
| | | }) |
| | | }, |
| | | add(depart) { |
| | | if (depart) { |
| | | this.seen = false; |
| | | this.dictDisabled = false; |
| | | } else { |
| | | this.seen = true; |
| | | this.dictDisabled = true; |
| | | } |
| | | this.edit(depart); |
| | | }, |
| | | edit(record) { |
| | | this.visible = true; |
| | | this.model = Object.assign({}, this.defaultModel, record) |
| | | this.loadTreeData(); |
| | | this.model.parentId = record != null ? record.toString() : null; |
| | | if (this.seen) { |
| | | this.model.orgCategory = '1'; |
| | | } else { |
| | | this.model.orgCategory = '2'; |
| | | } |
| | | }, |
| | | created () { |
| | | close() { |
| | | this.$emit('close'); |
| | | this.disableSubmit = false; |
| | | this.visible = false; |
| | | this.$refs.form.resetFields(); |
| | | }, |
| | | methods: { |
| | | loadTreeData(){ |
| | | var that = this; |
| | | queryIdTree().then((res)=>{ |
| | | if(res.success){ |
| | | that.departTree = []; |
| | | for (let i = 0; i < res.result.length; i++) { |
| | | let temp = res.result[i]; |
| | | that.departTree.push(temp); |
| | | handleOk() { |
| | | const that = this; |
| | | // 触å表åéªè¯ |
| | | this.$refs.form.validate(valid => { |
| | | if (valid) { |
| | | that.confirmLoading = true; |
| | | httpAction(this.url.add, this.model, "post").then((res) => { |
| | | if (res.success) { |
| | | // that.$message.success(res.message); |
| | | that.$notification.success({ |
| | | message: 'æ¶æ¯', |
| | | description: res.message |
| | | }); |
| | | that.loadTreeData(); |
| | | that.$emit('ok'); |
| | | } else { |
| | | // that.$message.warning(res.message); |
| | | that.$notification.warning({ |
| | | message: 'æ¶æ¯', |
| | | description: res.message |
| | | }); |
| | | } |
| | | } |
| | | }).finally(() => { |
| | | that.confirmLoading = false; |
| | | that.close(); |
| | | }) |
| | | |
| | | }) |
| | | }, |
| | | add (depart) { |
| | | if(depart){ |
| | | this.seen = false; |
| | | this.dictDisabled = false; |
| | | }else{ |
| | | this.seen = true; |
| | | this.dictDisabled = true; |
| | | } else { |
| | | return false; |
| | | } |
| | | this.edit(depart); |
| | | }, |
| | | edit (record) { |
| | | this.visible = true; |
| | | this.model = Object.assign({}, this.defaultModel, record) |
| | | this.loadTreeData(); |
| | | this.model.parentId = record!=null?record.toString():null; |
| | | if(this.seen){ |
| | | this.model.orgCategory = '1'; |
| | | }else{ |
| | | this.model.orgCategory = '2'; |
| | | } |
| | | }, |
| | | close () { |
| | | this.$emit('close'); |
| | | this.disableSubmit = false; |
| | | this.visible = false; |
| | | this.$refs.form.resetFields(); |
| | | }, |
| | | handleOk () { |
| | | const that = this; |
| | | // 触å表åéªè¯ |
| | | this.$refs.form.validate(valid => { |
| | | if (valid) { |
| | | that.confirmLoading = true; |
| | | httpAction(this.url.add,this.model,"post").then((res)=>{ |
| | | if(res.success){ |
| | | // that.$message.success(res.message); |
| | | that.$notification.success({ |
| | | message:'æ¶æ¯', |
| | | description:res.message |
| | | }); |
| | | that.loadTreeData(); |
| | | that.$emit('ok'); |
| | | }else{ |
| | | // that.$message.warning(res.message); |
| | | that.$notification.warning({ |
| | | message:'æ¶æ¯', |
| | | description:res.message |
| | | }); |
| | | } |
| | | }).finally(() => { |
| | | that.confirmLoading = false; |
| | | that.close(); |
| | | }) |
| | | |
| | | }else{ |
| | | return false; |
| | | } |
| | | }) |
| | | }, |
| | | handleCancel () { |
| | | this.close() |
| | | }, |
| | | validateMobile(rule,value,callback){ |
| | | if (!value || new RegExp(/^1([38][0-9]|4[579]|5[0-3,5-9]|6[6]|7[0135678]|9[89])\d{8}$/).test(value)){ |
| | | callback(); |
| | | }else{ |
| | | callback("æ¨çææºå·ç æ ¼å¼ä¸æ£ç¡®!"); |
| | | } |
| | | |
| | | }) |
| | | }, |
| | | handleCancel() { |
| | | this.close() |
| | | }, |
| | | validateMobile(rule, value, callback) { |
| | | if (!value || new RegExp(/^1([38][0-9]|4[579]|5[0-3,5-9]|6[6]|7[0135678]|9[89])\d{8}$/).test(value)) { |
| | | callback(); |
| | | } else { |
| | | callback("æ¨çææºå·ç æ ¼å¼ä¸æ£ç¡®!"); |
| | | } |
| | | |
| | | } |
| | | } |
| | | } |
| | | </script> |
| | | |
| | | <style scoped> |
| | | |
| | | </style> |
¶Ô±ÈÐÂÎļþ |
| | |
| | | <template> |
| | | <a-card :bordered="false"> |
| | | <template v-if="this.departId"> |
| | | <div class="table-page-search-wrapper"> |
| | | <a-form |
| | | layout="inline" |
| | | @keyup.enter.native="searchQuery" |
| | | > |
| | | <a-row :gutter="24"> |
| | | |
| | | <a-col :span="24 / 2 "> |
| | | <a-form-item |
| | | :labelCol="labelCol" |
| | | :wrapperCol="wrapperCol" |
| | | label="çç»ç¼å·" |
| | | > |
| | | <j-input |
| | | placeholder="请è¾å
¥çç»ç¼å·" |
| | | v-model="queryParam.num" |
| | | ></j-input> |
| | | </a-form-item> |
| | | </a-col> |
| | | <a-col :span="24 / 2 "> |
| | | <a-button |
| | | type="primary" |
| | | @click="searchQuery" |
| | | icon="search" |
| | | >æ¥è¯¢</a-button> |
| | | <a-button |
| | | type="primary" |
| | | @click="searchReset" |
| | | icon="reload" |
| | | style="margin-left: 8px" |
| | | >éç½®</a-button> |
| | | <a-button |
| | | type="primary" |
| | | @click="handleAdd" |
| | | icon="plus" |
| | | style="margin-left: 8px" |
| | | >æ°å¢</a-button> |
| | | </a-col> |
| | | </a-row> |
| | | </a-form> |
| | | </div> |
| | | <div |
| | | class="table-operator" |
| | | style="border-top: 5px" |
| | | > |
| | | <a-dropdown v-if="selectedRowKeys.length > 0"> |
| | | <a-menu |
| | | slot="overlay" |
| | | @click="handleMenuClick" |
| | | > |
| | | <a-menu-item key="1"> |
| | | <a-icon |
| | | type="delete" |
| | | @click="batchDel" |
| | | /> |
| | | æ¹éç§»é¤ |
| | | </a-menu-item> |
| | | </a-menu> |
| | | <a-button style="margin-left: 8px"> |
| | | æ¹éæä½ |
| | | <a-icon type="down" /> |
| | | </a-button> |
| | | </a-dropdown> |
| | | </div> |
| | | <a-table |
| | | ref="table" |
| | | bordered |
| | | size="middle" |
| | | rowKey="id" |
| | | :scroll="{x: 500}" |
| | | :columns="columns" |
| | | :dataSource="dataSource" |
| | | :pagination="ipagination" |
| | | :loading="loading" |
| | | :rowSelection="{selectedRowKeys: selectedRowKeys, onChange: onSelectChange}" |
| | | @change="handleTableChange" |
| | | > |
| | | |
| | | <!--<template slot="avatarslot" slot-scope="text, record, index">--> |
| | | <!--<div class="anty-img-wrap">--> |
| | | <!--<a-avatar shape="square" :src="getAvatarView(record.avatar)" icon="user"/>--> |
| | | <!--</div>--> |
| | | <!--</template>--> |
| | | <span |
| | | slot="name" |
| | | slot-scope="text" |
| | | > |
| | | <j-ellipsis |
| | | :value="text" |
| | | :length="7" |
| | | /> |
| | | </span> |
| | | |
| | | <span |
| | | slot="action" |
| | | slot-scope="text, record" |
| | | > |
| | | <a @click="handleEdit(record)">ç¼è¾</a> |
| | | <a-divider type="vertical" /> |
| | | <a-popconfirm |
| | | title="ç¡®å®ç§»é¤å?" |
| | | @confirm="() => handleDelete(record.id)" |
| | | > |
| | | <a>ç§»é¤</a> |
| | | </a-popconfirm> |
| | | </span> |
| | | </a-table> |
| | | </template> |
| | | <a-card |
| | | v-else |
| | | :bordered="false" |
| | | style="height:200px" |
| | | > |
| | | <a-empty> |
| | | <span slot="description"> 请å
éæ©ä¸ä¸ªé¨é¨! </span> |
| | | </a-empty> |
| | | </a-card> |
| | | <team-modal |
| | | ref="modalForm" |
| | | @ok="modalFormOk" |
| | | :departId=this.departId |
| | | ></team-modal> |
| | | <!-- :nodeSelected="nodeSelected" --> |
| | | </a-card> |
| | | </template> |
| | | |
| | | <script> |
| | | import { queryTreeListForRole, queryDepartPermission, saveDepartPermission } from '@/api/api' |
| | | import DepartDataruleModal from './DepartDataruleModal' |
| | | import { JeecgListMixin } from '@/mixins/JeecgListMixin' |
| | | import { getAction, postAction, deleteAction } from '@/api/manage' |
| | | import { filterObj } from '@/utils/util' |
| | | import JEllipsis from '@/components/jeecg/JEllipsis' |
| | | import qs from 'qs' |
| | | import TeamModal from './TeamModal' |
| | | export default { |
| | | name: 'DepartTeam', |
| | | mixins: [JeecgListMixin], |
| | | components: { DepartDataruleModal, TeamModal, JEllipsis }, |
| | | data() { |
| | | return { |
| | | queryParam: {}, |
| | | labelCol: { |
| | | xs: { span: 24 }, |
| | | sm: { span: 5 }, |
| | | }, |
| | | wrapperCol: { |
| | | xs: { span: 24 }, |
| | | sm: { span: 16 }, |
| | | }, |
| | | columns: [ |
| | | { |
| | | title: '#', |
| | | dataIndex: '', |
| | | key: 'rowIndex', |
| | | width: 60, |
| | | align: "center", |
| | | customRender: function (t, r, index) { |
| | | return parseInt(index) + 1; |
| | | } |
| | | }, |
| | | { |
| | | title: 'é¨é¨', |
| | | align: "center", |
| | | dataIndex: 'departId_dictText', |
| | | }, |
| | | { |
| | | title: 'çç»ç¼å·', |
| | | align: "center", |
| | | dataIndex: 'num', |
| | | }, |
| | | { |
| | | title: 'çç»åç§°', |
| | | align: "center", |
| | | dataIndex: 'name', |
| | | scopedSlots: { customRender: 'name' }, |
| | | }, |
| | | { |
| | | title: '夿³¨', |
| | | align: "center", |
| | | dataIndex: 'remark', |
| | | }, |
| | | |
| | | { |
| | | title: 'æä½', |
| | | dataIndex: 'action', |
| | | scopedSlots: { customRender: 'action' }, |
| | | align: "center", |
| | | width: 120 |
| | | } |
| | | |
| | | ], |
| | | disableMixinCreated: true, |
| | | departId: "", |
| | | title: "é¨é¨æéé
ç½®", |
| | | visible: false, |
| | | loading: false, |
| | | hidden: true, |
| | | url: { |
| | | list: '/base/team/list', |
| | | remove: '/base/team/delete', |
| | | serachTeams: '/base/team/list', |
| | | deleteBatch: "/base/team/deleteBatch" |
| | | } |
| | | } |
| | | }, |
| | | methods: { |
| | | |
| | | show(departId) { |
| | | this.departId = departId |
| | | this.loadData(); |
| | | }, |
| | | close() { |
| | | this.reset() |
| | | this.$emit('close'); |
| | | this.visible = false; |
| | | }, |
| | | searchReset() { |
| | | this.queryParam = {} |
| | | this.loadData(); |
| | | }, |
| | | searchQuery() { |
| | | this.loading = true; |
| | | var params = this.getQueryParams();//æ¥è¯¢æ¡ä»¶ |
| | | params.pageNo = this.ipagination.current; |
| | | params.pageSize = this.ipagination.pageSize; |
| | | getAction(this.url.serachTeams, params).then((res) => { |
| | | if (res.success) { |
| | | // console.log(res) |
| | | //update-begin---author:zhangyafei Date:20201118 forï¼éé
ä¸åé¡µçæ°æ®å表------------ |
| | | this.dataSource = res.result.records || res.result; |
| | | if (res.result.total) { |
| | | this.ipagination.total = res.result.total; |
| | | } else { |
| | | this.ipagination.total = 0; |
| | | } |
| | | //update-end---author:zhangyafei Date:20201118 forï¼éé
ä¸åé¡µçæ°æ®å表------------ |
| | | } else { |
| | | this.$message.warning(res.message) |
| | | } |
| | | }).finally(() => { |
| | | this.loading = false |
| | | }) |
| | | }, |
| | | handleTableChange(pagination, filters, sorter) { |
| | | //å页ãæåºãçéååæ¶è§¦å |
| | | //TODO çé |
| | | // console.log(pagination) |
| | | if (Object.keys(sorter).length > 0) { |
| | | this.isorter.column = sorter.field; |
| | | this.isorter.order = "ascend" == sorter.order ? "asc" : "desc" |
| | | } |
| | | this.ipagination = pagination; |
| | | this.loadData(); |
| | | }, |
| | | loadData() { |
| | | //å è½½æ°æ® è¥ä¼ å
¥åæ°1åå 载第ä¸é¡µçå
容 |
| | | // if (arg === 1) { |
| | | // this.ipagination.current = 1; |
| | | // } |
| | | var params = this.getQueryParams();//æ¥è¯¢æ¡ä»¶ |
| | | |
| | | params.pageNo = this.ipagination.current; |
| | | params.pageSize = this.ipagination.pageSize; |
| | | this.loading = true; |
| | | getAction(this.url.list, params).then((res) => { |
| | | if (res.success) { |
| | | // console.log(res) |
| | | //update-begin---author:zhangyafei Date:20201118 forï¼éé
ä¸åé¡µçæ°æ®å表------------ |
| | | this.dataSource = res.result.records || res.result; |
| | | if (res.result.total) { |
| | | this.ipagination.total = res.result.total; |
| | | } else { |
| | | this.ipagination.total = 0; |
| | | } |
| | | //update-end---author:zhangyafei Date:20201118 forï¼éé
ä¸åé¡µçæ°æ®å表------------ |
| | | } else { |
| | | // this.$message.warning(res.message) |
| | | this.$notification.warning({ |
| | | message: 'æ¶æ¯', |
| | | description: res.message |
| | | }); |
| | | } |
| | | }).finally(() => { |
| | | this.loading = false |
| | | }) |
| | | }, |
| | | getQueryParams() { |
| | | //è·åæ¥è¯¢æ¡ä»¶ |
| | | let sqp = {} |
| | | if (this.superQueryParams) { |
| | | sqp['superQueryParams'] = encodeURI(this.superQueryParams) |
| | | sqp['superQueryMatchType'] = this.superQueryMatchType |
| | | } |
| | | var param = Object.assign(sqp, this.queryParam, this.isorter, this.filters); |
| | | param.field = this.getQueryField(); |
| | | param.pageNo = this.ipagination.current; |
| | | param.pageSize = this.ipagination.pageSize; |
| | | param.departId = this.departId; |
| | | //è·åç¨æ·å®å¶ç忰屿§ |
| | | if (this.getCustomQueryParams) { |
| | | param = this.getCustomQueryParams(param); |
| | | if (!param) { |
| | | return false; |
| | | } |
| | | } |
| | | |
| | | return filterObj(param); |
| | | }, |
| | | handleDelete(id) { |
| | | |
| | | deleteAction(this.url.remove, { id: id }).then((res) => { |
| | | if (res.success) { |
| | | // this.$message.warning(res.message) |
| | | this.$notification.success({ |
| | | message: 'æ¶æ¯', |
| | | description: res.message |
| | | }); |
| | | |
| | | this.show(this.departId); |
| | | } else { |
| | | // this.$message.warning(res.message) |
| | | this.$notification.warning({ |
| | | message: 'æ¶æ¯', |
| | | description: res.message |
| | | }); |
| | | |
| | | } |
| | | }).finally(() => { |
| | | |
| | | }) |
| | | }, |
| | | handleMenuClick(e) { |
| | | if (e.key == 1) { |
| | | this.batchDel(); |
| | | } |
| | | }, |
| | | batchDel: function () { |
| | | if (!this.url.deleteBatch) { |
| | | this.$message.error("请设置url.deleteBatch屿§!") |
| | | return |
| | | } |
| | | if (this.selectedRowKeys.length <= 0) { |
| | | // this.$message.warning('è¯·éæ©ä¸æ¡è®°å½ï¼'); |
| | | this.$notification.warning({ |
| | | message: 'æ¶æ¯', |
| | | description: "è¯·éæ©ä¸æ¡è®°å½" |
| | | }); |
| | | return; |
| | | } else { |
| | | var ids = ""; |
| | | for (var a = 0; a < this.selectedRowKeys.length; a++) { |
| | | ids += this.selectedRowKeys[a] + ","; |
| | | } |
| | | var that = this; |
| | | this.$confirm({ |
| | | title: "确认å é¤", |
| | | content: "æ¯å¦å é¤é䏿°æ®?", |
| | | onOk: function () { |
| | | that.loading = true; |
| | | deleteAction(that.url.deleteBatch, { ids: ids }).then((res) => { |
| | | if (res.success) { |
| | | //éæ°è®¡ç®å页é®é¢ |
| | | that.reCalculatePage(that.selectedRowKeys.length) |
| | | // that.$message.success(res.message); |
| | | that.$notification.success({ |
| | | message: 'æ¶æ¯', |
| | | description: res.message |
| | | }); |
| | | that.show(that.departId); |
| | | that.onClearSelected(); |
| | | } else { |
| | | // that.$message.warning(res.message); |
| | | that.$notification.warning({ |
| | | message: 'æ¶æ¯', |
| | | description: res.message |
| | | }); |
| | | } |
| | | }).finally(() => { |
| | | that.loading = false; |
| | | }); |
| | | } |
| | | }); |
| | | } |
| | | }, |
| | | }, |
| | | } |
| | | </script> |
| | | |
| | | <style scoped> |
| | | </style> |
¶Ô±ÈÐÂÎļþ |
| | |
| | | <template> |
| | | <a-modal |
| | | :title="title" |
| | | :width="800" |
| | | :visible="visible" |
| | | :confirmLoading="confirmLoading" |
| | | :okButtonProps="{ props: {disabled: disableSubmit} }" |
| | | @ok="handleOk" |
| | | @cancel="handleCancel" |
| | | cancelText="å
³é" |
| | | > |
| | | |
| | | <a-spin :spinning="confirmLoading"> |
| | | <a-form :form="form"> |
| | | <a-row :gutter="24"> |
| | | <a-col :span="24"> |
| | | <a-form-model-item |
| | | :labelCol="{span:4}" |
| | | :wrapperCol="{span:18}" |
| | | :hidden="seen" |
| | | label="ä¸çº§é¨é¨" |
| | | hasFeedback |
| | | > |
| | | <a-tree-select |
| | | style="width:100%" |
| | | :dropdownStyle="{maxHeight:'200px',overflow:'auto'}" |
| | | :treeData="departTree" |
| | | v-model="model.departId" |
| | | placeholder="è¯·éæ©ä¸çº§é¨é¨" |
| | | :disabled="true" |
| | | > |
| | | </a-tree-select> |
| | | </a-form-model-item> |
| | | </a-col> |
| | | </a-row> |
| | | <a-row :gutter="24"> |
| | | <a-col :span="24"> |
| | | <a-form-item |
| | | label="çç»ç¼å·" |
| | | :labelCol="{span:4}" |
| | | :wrapperCol="{span:18}" |
| | | > |
| | | <a-input |
| | | :readOnly="disableSubmit" |
| | | allow-clear |
| | | placeholder="请è¾å
¥çç»ç¼å·" |
| | | v-decorator="['num', validatorRules.num ]" |
| | | /> |
| | | </a-form-item> |
| | | </a-col> |
| | | </a-row> |
| | | |
| | | <a-row :gutter="24"> |
| | | <a-col :span="24"> |
| | | <a-form-item |
| | | label="çç»åç§°" |
| | | :labelCol="{span:4}" |
| | | :wrapperCol="{span:18}" |
| | | > |
| | | <a-input |
| | | :readOnly="disableSubmit" |
| | | allow-clear |
| | | placeholder="请è¾å
¥çç»åç§°" |
| | | v-decorator="['name', validatorRules.name ]" |
| | | /> |
| | | </a-form-item> |
| | | </a-col> |
| | | </a-row> |
| | | |
| | | <a-row :gutter="24"> |
| | | <a-col :span="24"> |
| | | <a-form-item |
| | | :labelCol="{span:4}" |
| | | :wrapperCol="{span:18}" |
| | | label="夿³¨" |
| | | > |
| | | <a-textarea |
| | | :readOnly="disableSubmit" |
| | | placeholder="请è¾å
¥å¤æ³¨" |
| | | allow-clear |
| | | v-decorator="['remark', validatorRules.remark]" |
| | | /> |
| | | </a-form-item> |
| | | </a-col> |
| | | </a-row> |
| | | |
| | | </a-form> |
| | | </a-spin> |
| | | </a-modal> |
| | | </template> |
| | | |
| | | <script> |
| | | import pick from 'lodash.pick' |
| | | import { postAction, requestPut } from '@/api/manage' |
| | | import { duplicateCheck } from '@/api/api' |
| | | import { queryIdTree } from '@/api/api' |
| | | |
| | | export default { |
| | | name: 'TeamModal', |
| | | props: { |
| | | // nodeSelected: { |
| | | // type: Object, |
| | | // default: {} |
| | | // }, |
| | | departId: { |
| | | type: String, |
| | | default: "" |
| | | }, |
| | | }, |
| | | data() { |
| | | return { |
| | | title: "æä½", |
| | | visible: false, |
| | | model: {}, |
| | | departTree: [], |
| | | labelCol: { |
| | | xs: { span: 24 }, |
| | | sm: { span: 6 }, |
| | | }, |
| | | wrapperCol: { |
| | | xs: { span: 24 }, |
| | | sm: { span: 18 }, |
| | | }, |
| | | confirmLoading: false, |
| | | form: this.$form.createForm(this), |
| | | validatorRules: { |
| | | num: { |
| | | rules: [ |
| | | { required: true, message: '请è¾å
¥çç»ç¼å·!' }, |
| | | { min: 0, max: 30, message: 'é¿åº¦ä¸è¶
è¿ 30 个å符', trigger: 'blur' }, |
| | | { validator: this.validateNum }, |
| | | ] |
| | | }, |
| | | name: { |
| | | rules: [ |
| | | { required: true, message: '请è¾å
¥çç»åç§°!' }, |
| | | { min: 0, max: 64, message: 'é¿åº¦ä¸è¶
è¿ 64 个å符', trigger: 'blur' }, |
| | | { validator: this.validateName }, |
| | | ] |
| | | }, |
| | | remark: { |
| | | rules: [ |
| | | { min: 0, max: 100, message: 'é¿åº¦ä¸è¶
è¿ 100 个å符', trigger: 'blur' }, |
| | | ] |
| | | } |
| | | }, |
| | | url: { |
| | | add: "/base/team/add", |
| | | edit: "/base/team/edit" |
| | | }, |
| | | disableSubmit: false, |
| | | //æ°å¢ãç¼è¾ãå é¤ãæ¹éå 餿使¹åæ°æ®åå·æ°å
³èçç»ä»¶ççå¬å±æ§ |
| | | // alterFlag: "" |
| | | } |
| | | }, |
| | | created() { |
| | | }, |
| | | methods: { |
| | | add() { |
| | | this.edit({}); |
| | | }, |
| | | edit(record) { |
| | | this.loadTreeData(); |
| | | this.form.resetFields(); |
| | | this.model = Object.assign({}, record); |
| | | this.model.departId = this.departId |
| | | this.visible = true; |
| | | this.disableSubmit = false; |
| | | this.$nextTick(() => { |
| | | this.form.setFieldsValue(pick(this.model, 'num', 'name', 'remark')) |
| | | }); |
| | | }, |
| | | close() { |
| | | this.$emit('close'); |
| | | this.visible = false; |
| | | }, |
| | | handleOk() { |
| | | const that = this; |
| | | // 触å表åéªè¯ |
| | | this.form.validateFields((err, values) => { |
| | | if (!err) { |
| | | that.confirmLoading = true; |
| | | let formData = Object.assign(this.model, values); |
| | | let obj; |
| | | if (!this.model.id) { |
| | | obj = postAction(this.url.add, formData); |
| | | } else { |
| | | obj = requestPut(this.url.edit, formData, { id: this.model.id }); |
| | | } |
| | | obj.then((res) => { |
| | | if (res.success) { |
| | | that.$message.success(res.message); |
| | | that.$emit('ok'); |
| | | that.alterFlag = new Date() |
| | | } else { |
| | | that.$message.warning(res.message); |
| | | } |
| | | }).finally(() => { |
| | | that.confirmLoading = false; |
| | | that.close(); |
| | | }) |
| | | } |
| | | }) |
| | | }, |
| | | |
| | | loadTreeData() { |
| | | var that = this; |
| | | queryIdTree().then((res) => { |
| | | if (res.success) { |
| | | that.departTree = []; |
| | | for (let i = 0; i < res.result.length; i++) { |
| | | let temp = res.result[i]; |
| | | that.departTree.push(temp); |
| | | } |
| | | } |
| | | |
| | | }) |
| | | }, |
| | | handleCancel() { |
| | | this.close() |
| | | }, |
| | | //éªè¯ ç¼å· |
| | | validateNum(rule, value, callback) { |
| | | var params = { |
| | | tableName: 'mom_base_team', |
| | | fieldName: 'num', |
| | | fieldVal: value, |
| | | dataId: this.model.id, |
| | | //æ°æ®åºä¸åå¨å段del_flag并使ç¨è¯¥å段ä½ä¸ºæªå é¤çç¥ï¼çå é¤ï¼false åå é¤ï¼true |
| | | delFlag: 'true', |
| | | }; |
| | | duplicateCheck(params).then((res) => { |
| | | if (res.success) { |
| | | callback(); |
| | | } else { |
| | | callback("ç¼å·å·²åå¨!"); |
| | | } |
| | | }) |
| | | }, |
| | | //éªè¯ åç§° |
| | | validateName(rule, value, callback) { |
| | | var params = { |
| | | tableName: 'mom_base_team', |
| | | fieldName: 'name', |
| | | fieldVal: value, |
| | | dataId: this.model.id, |
| | | //æ°æ®åºä¸åå¨å段del_flag并使ç¨è¯¥å段ä½ä¸ºæªå é¤çç¥ï¼çå é¤ï¼false åå é¤ï¼true |
| | | delFlag: 'true', |
| | | }; |
| | | duplicateCheck(params).then((res) => { |
| | | if (res.success) { |
| | | callback(); |
| | | } else { |
| | | callback("åç§°å·²åå¨!"); |
| | | } |
| | | }) |
| | | }, |
| | | }, |
| | | // watch: { |
| | | // alterFlag() { |
| | | // this.$bus.$emit('queryTreeData'); |
| | | // } |
| | | // } |
| | | } |
| | | </script> |
| | | |
| | | <style scoped> |
| | | .ant-btn { |
| | | padding: 0 10px; |
| | | margin-left: 3px; |
| | | } |
| | | |
| | | .ant-form-item-control { |
| | | line-height: 0px; |
| | | } |
| | | |
| | | /** 主表åè¡é´è· */ |
| | | .ant-form .ant-form-item { |
| | | margin-bottom: 10px; |
| | | } |
| | | |
| | | /** Tab页é¢è¡é´è· */ |
| | | .ant-tabs-content .ant-form-item { |
| | | margin-bottom: 0px; |
| | | } |
| | | </style> |