¶Ô±ÈÐÂÎļþ |
| | |
| | | <template> |
| | | <a-row |
| | | type="flex" |
| | | :gutter="16" |
| | | > |
| | | <a-col |
| | | :md="6" |
| | | :sm="24" |
| | | > |
| | | <site-area-line-left /> |
| | | </a-col> |
| | | <a-col |
| | | :md="24-6" |
| | | :sm="24" |
| | | > |
| | | <site-area-line-right /> |
| | | </a-col> |
| | | </a-row> |
| | | </template> |
| | | |
| | | <script> |
| | | import SiteAreaLineLeft from './modules/siteAreaLine/SiteAreaLineLeft' |
| | | import SiteAreaLineRight from './modules/siteAreaLine/SiteAreaLineRight' |
| | | export default { |
| | | name: 'SiteAreaLineManagerNew', |
| | | components: { |
| | | SiteAreaLineLeft, |
| | | SiteAreaLineRight |
| | | }, |
| | | data() { |
| | | return { |
| | | description: 'æ
éåå ' |
| | | } |
| | | }, |
| | | methods: {} |
| | | } |
| | | </script> |
| | | |
| | | <style scoped> |
| | | @import '~@assets/less/common.less'; |
| | | </style> |
| | |
| | | @search="onDepartList()" |
| | | :read-only="true" |
| | | v-decorator="['useDepartName', validatorRules.useDepartName]" |
| | | /> --> |
| | | /> |
| | | <a-tree-select |
| | | style="width: 100%" |
| | | :dropdown-style="{ maxHeight: '400px', overflow: 'auto' }" |
| | |
| | | placeholder="è¯·éæ©ä½¿ç¨é¨é¨" |
| | | tree-default-expand-all |
| | | v-decorator="['useId', validatorRules.useId ]" |
| | | />--> |
| | | |
| | | <j-dict-select-tag |
| | | allow-clear |
| | | :disabled="disableSubmit" |
| | | :placeholder="disableSubmit?'':'è¯·éæ©ä½¿ç¨é¨é¨'" |
| | | :triggerChange="true" |
| | | dictCode="sys_depart,depart_name,id,del_flag!='1'" |
| | | v-decorator="['useId', {}]" |
| | | /> |
| | | </a-form-item> |
| | | </a-col> |
| | |
| | | @search="onDepartList()" |
| | | :read-only="true" |
| | | v-decorator="['useDepartName', validatorRules.useDepartName]" |
| | | /> --> |
| | | /> |
| | | <a-tree-select |
| | | style="width: 100%" |
| | | :dropdown-style="{ maxHeight: '400px', overflow: 'auto' }" |
| | |
| | | placeholder="è¯·éæ©é¨é¨" |
| | | tree-default-expand-all |
| | | v-decorator="['departId', validatorRules.useId ]" |
| | | />--> |
| | | |
| | | <j-dict-select-tag |
| | | allow-clear |
| | | :disabled="disableSubmit" |
| | | :placeholder="disableSubmit?'':'è¯·éæ©ä½¿ç¨é¨é¨'" |
| | | :triggerChange="true" |
| | | dictCode="sys_depart,depart_name,id,del_flag!='1'" |
| | | v-decorator="['departId', {}]" |
| | | /> |
| | | </a-form-item> |
| | | </a-col> |
| | |
| | | :wrapperCol="wrapperCol" |
| | | prop="useId" |
| | | > |
| | | <a-tree-select |
| | | <!-- <a-tree-select |
| | | style="width: 100%" |
| | | :disabled="formDisabled" |
| | | :dropdown-style="{ maxHeight: '400px', overflow: 'auto' }" |
| | | :tree-data="treeData" |
| | | placeholder="è¯·éæ©ä½¿ç¨é¨é¨" |
| | | tree-default-expand-all |
| | | v-model="model.useId" |
| | | /> --> |
| | | <j-dict-select-tag |
| | | allow-clear |
| | | :disabled="formDisabled" |
| | | placeholder="è¯·éæ©ä½¿ç¨é¨é¨" |
| | | :triggerChange="true" |
| | | dictCode="sys_depart,depart_name,id,del_flag!='1'" |
| | | v-model="model.useId" |
| | | /> |
| | | </a-form-model-item> |
| | |
| | | :wrapperCol="wrapperCol" |
| | | prop="manageId" |
| | | > |
| | | <a-tree-select |
| | | <!-- <a-tree-select |
| | | :disabled="formDisabled" |
| | | style="width: 100%" |
| | | :dropdown-style="{ maxHeight: '400px', overflow: 'auto' }" |
| | | :tree-data="treeData" |
| | | placeholder="è¯·éæ©ç»´æ¤é¨é¨" |
| | | tree-default-expand-all |
| | | v-model="model.manageId" |
| | | /> --> |
| | | <j-dict-select-tag |
| | | allow-clear |
| | | :disabled="formDisabled" |
| | | placeholder="è¯·éæ©ç»´æ¤é¨é¨" |
| | | :triggerChange="true" |
| | | dictCode="sys_depart,depart_name,id,del_flag!='1'" |
| | | v-model="model.manageId" |
| | | /> |
| | | </a-form-model-item> |
| | |
| | | /> |
| | | </a-form-model-item> |
| | | </a-col> |
| | | <a-col :span="6" v-if="model.operatingSystem=='yes'"> |
| | | <a-col |
| | | :span="6" |
| | | v-if="model.operatingSystem=='yes'" |
| | | > |
| | | <a-form-model-item |
| | | label="ç³»ç»" |
| | | :labelCol="labelCol" |
| | |
| | | </a-form-model-item> |
| | | </a-col> |
| | | <a-col :span="6"> |
| | | <a-form-model-item |
| | | label="åæ æ°é" |
| | | :labelCol="labelCol" |
| | | :wrapperCol="wrapperCol" |
| | | prop="coordinateNum" |
| | | > |
| | | <a-form-model-item |
| | | label="åæ æ°é" |
| | | :labelCol="labelCol" |
| | | :wrapperCol="wrapperCol" |
| | | prop="coordinateNum" |
| | | > |
| | | <a-input-number |
| | | v-model="model.coordinateNum" |
| | | :disabled="formDisabled" |
| | |
| | | ></a-input> |
| | | </a-form-model-item> |
| | | </a-col> |
| | | </a-row> |
| | | <a-row hidden> |
| | | </a-row> |
| | | <a-row hidden> |
| | | <a-col :span="6"> |
| | | <a-form-model-item |
| | | label="å¹³å使ç¨ç" |
| | |
| | | default: false, |
| | | required: false |
| | | }, |
| | | caytegoryParam:{ |
| | | type:String, |
| | | caytegoryParam: { |
| | | type: String, |
| | | default: '', |
| | | required: false |
| | | } |
| | |
| | | propertyStatus: [ |
| | | { required: true, message: 'è¯·éæ©èµäº§ç¶æ!' }, |
| | | ], |
| | | system:[ |
| | | system: [ |
| | | { required: true, message: '请è¾å
¥ç³»ç»!' }, |
| | | ] |
| | | }, |
| | |
| | | add: "/eam/equipment/add", |
| | | edit: "/eam/equipment/edit", |
| | | loadOptions: '/sys/sysDepart/loadDepartTreeOptions', |
| | | getCategoryFlag:"/eam/equipmentCategory/queryById" |
| | | getCategoryFlag: "/eam/equipmentCategory/queryById" |
| | | }, |
| | | treeData: [], |
| | | needSpecific: false, |
| | |
| | | edit(record) { |
| | | console.log(this.disabled) |
| | | this.model = Object.assign({}, record); |
| | | if(!this.model.id){ |
| | | this.model.equipmentStatus = '1' |
| | | if (!this.model.id) { |
| | | this.model.equipmentStatus = '1' |
| | | } |
| | | this.visible = true; |
| | | }, |
| | |
| | | }, |
| | | |
| | | onSearchPrecisionParametersTemplate() { |
| | | if(this.model.num ==''||this.model.num==undefined||this.model.num==null){ |
| | | this.$message.warn("请å
å¡«åç»ä¸ç¼ç ") |
| | | return false; |
| | | if (this.model.num == '' || this.model.num == undefined || this.model.num == null) { |
| | | this.$message.warn("请å
å¡«åç»ä¸ç¼ç ") |
| | | return false; |
| | | } |
| | | this.$refs.PrecisionParametersTemplateList.list(); |
| | | this.$refs.PrecisionParametersTemplateList.title = "éæ©è®¾å¤ç²¾åº¦æ¨¡æ¿"; |
| | |
| | | }) |
| | | } |
| | | //æ¹åææ¯ç¶æé´å®å¨æ |
| | | if(this.model.equipmentCategoryId!==null&&this.model.equipmentCategoryId!=''){ |
| | | if (this.model.equipmentCategoryId !== null && this.model.equipmentCategoryId != '') { |
| | | var value = this.model.equipmentCategoryId; |
| | | getAction(this.url.getCategoryFlag,{id:value}).then(res=>{ |
| | | if(res.result.equipmentCategoryUda1!=='weldingMachine'&&res.result.equipmentCategoryUda11!=='filesCarousel'&&res.result.equipmentCategoryUda1!=='tester'){ |
| | | if(val==='A'){ |
| | | this.model.checkPeriod=365*3+''; |
| | | } |
| | | if(val==='B'||val==='C'||val==='D'){ |
| | | this.model.checkPeriod=365*4+''; |
| | | } |
| | | } |
| | | this.model = Object.assign({},this.model); |
| | | getAction(this.url.getCategoryFlag, { id: value }).then(res => { |
| | | if (res.result.equipmentCategoryUda1 !== 'weldingMachine' && res.result.equipmentCategoryUda11 !== 'filesCarousel' && res.result.equipmentCategoryUda1 !== 'tester') { |
| | | if (val === 'A') { |
| | | this.model.checkPeriod = 365 * 3 + ''; |
| | | } |
| | | if (val === 'B' || val === 'C' || val === 'D') { |
| | | this.model.checkPeriod = 365 * 4 + ''; |
| | | } |
| | | } |
| | | this.model = Object.assign({}, this.model); |
| | | }) |
| | | } |
| | | }, |
| | | categoryChange(value){ |
| | | getAction(this.url.getCategoryFlag,{id:value}).then(res=>{ |
| | | if(res.result.equipmentCategoryUda1==='weldingMachine'){ |
| | | this.model.checkPeriod=365*3+''; |
| | | }else if(res.result.equipmentCategoryUda1==='filesCarousel'){ |
| | | this.model.checkPeriod=365*4+''; |
| | | }else if(res.result.equipmentCategoryUda1==='tester'){ |
| | | this.model.checkPeriod=365*1+''; |
| | | } |
| | | this.model = Object.assign({},this.model); |
| | | }) |
| | | categoryChange(value) { |
| | | getAction(this.url.getCategoryFlag, { id: value }).then(res => { |
| | | if (res.result.equipmentCategoryUda1 === 'weldingMachine') { |
| | | this.model.checkPeriod = 365 * 3 + ''; |
| | | } else if (res.result.equipmentCategoryUda1 === 'filesCarousel') { |
| | | this.model.checkPeriod = 365 * 4 + ''; |
| | | } else if (res.result.equipmentCategoryUda1 === 'tester') { |
| | | this.model.checkPeriod = 365 * 1 + ''; |
| | | } |
| | | this.model = Object.assign({}, this.model); |
| | | }) |
| | | } |
| | | }, |
| | | computed: { |
| | |
| | | :wrapperCol="{span:18}" |
| | | > |
| | | <a-input |
| | | :readOnly="true" |
| | | :readOnly="codeDisable" |
| | | allow-clear |
| | | placeholder="å°ç±ç³»ç»èªå¨çæ" |
| | | v-decorator="['num', validatorRules.num ]" |
| | |
| | | |
| | | <script> |
| | | import pick from 'lodash.pick' |
| | | import { getAction,postAction, requestPut } from '@/api/manage' |
| | | import { getAction, postAction, requestPut } from '@/api/manage' |
| | | import { duplicateCheck } from '@/api/api' |
| | | |
| | | export default { |
| | |
| | | getNum: '/eam/sysIdentity/getNumNew', |
| | | }, |
| | | disableSubmit: false, |
| | | codeDisable: false, |
| | | //æ°å¢ãç¼è¾ãå é¤ãæ¹éå 餿使¹åæ°æ®åå·æ°å
³èçç»ä»¶ççå¬å±æ§ |
| | | alterFlag: "" |
| | | } |
| | |
| | | } |
| | | }) |
| | | }); |
| | | this.codeDisable = false; |
| | | } else { |
| | | this.codeDisable = true; |
| | | } |
| | | }, |
| | | close() { |
| | |
| | | :wrapperCol="{span:18}" |
| | | > |
| | | <a-input |
| | | :readOnly="true" |
| | | :readOnly="codeDisable" |
| | | allow-clear |
| | | placeholder="å°ç±ç³»ç»èªå¨çæ" |
| | | v-decorator="['num', validatorRules.num ]" |
| | |
| | | |
| | | <script> |
| | | import pick from 'lodash.pick' |
| | | import { getAction,postAction, requestPut } from '@/api/manage' |
| | | import { getAction, postAction, requestPut } from '@/api/manage' |
| | | import { duplicateCheck } from '@/api/api' |
| | | |
| | | export default { |
| | |
| | | getNum: '/eam/sysIdentity/getNumNew', |
| | | }, |
| | | disableSubmit: false, |
| | | codeDisable: false, |
| | | //æ°å¢ãç¼è¾ãå é¤ãæ¹éå 餿使¹åæ°æ®åå·æ°å
³èçç»ä»¶ççå¬å±æ§ |
| | | alterFlag: "" |
| | | } |
| | |
| | | } |
| | | }) |
| | | }); |
| | | this.codeDisable = false; |
| | | } else { |
| | | this.codeDisable = true; |
| | | } |
| | | }, |
| | | close() { |
| | |
| | | :wrapperCol="{span:18}" |
| | | > |
| | | <a-input |
| | | :readOnly="true" |
| | | :readOnly="codeDisable" |
| | | allow-clear |
| | | placeholder="å°ç±ç³»ç»èªå¨çæ" |
| | | v-decorator="['num', validatorRules.num ]" |
| | |
| | | |
| | | <script> |
| | | import pick from 'lodash.pick' |
| | | import { getAction,postAction, requestPut } from '@/api/manage' |
| | | import { getAction, postAction, requestPut } from '@/api/manage' |
| | | import { duplicateCheck } from '@/api/api' |
| | | |
| | | export default { |
| | |
| | | getNum: '/eam/sysIdentity/getNumNew', |
| | | }, |
| | | disableSubmit: false, |
| | | codeDisable: false, |
| | | //æ°å¢ãç¼è¾ãå é¤ãæ¹éå 餿使¹åæ°æ®åå·æ°å
³èçç»ä»¶ççå¬å±æ§ |
| | | alterFlag: "" |
| | | } |
| | |
| | | this.model = Object.assign({}, record); |
| | | this.visible = true; |
| | | this.disableSubmit = false; |
| | | |
| | | this.$nextTick(() => { |
| | | this.form.setFieldsValue(pick(this.model, 'num', 'name', 'remark')) |
| | | }); |
| | |
| | | } |
| | | }) |
| | | }); |
| | | } |
| | | this.codeDisable = false; |
| | | } else { |
| | | this.codeDisable = true; |
| | | } 4 |
| | | }, |
| | | close() { |
| | | this.$emit('close'); |
¶Ô±ÈÐÂÎļþ |
| | |
| | | <template> |
| | | <a-card |
| | | :bordered="false" |
| | | class="card-area" |
| | | > |
| | | <template slot="title"> |
| | | <i |
| | | class="action-jeecg actionsite2" |
| | | style="font-size: 18px;" |
| | | /> |
| | | ä¸å¿/å·¥åº/工段æç» |
| | | </template> |
| | | <!-- æ¥è¯¢åºå --> |
| | | <div class="table-page-search-wrapper"> |
| | | <!-- æç´¢åºå --> |
| | | <a-form |
| | | layout="inline" |
| | | @keyup.enter.native="searchQuery" |
| | | > |
| | | <a-row :gutter="24"> |
| | | <a-col |
| | | :md="8" |
| | | :sm="8" |
| | | > |
| | | <a-form-item label="ç¼å·"> |
| | | <a-input |
| | | placeholder="请è¾å
¥ç¼å·æ¥è¯¢" |
| | | v-model="queryParam.num" |
| | | ></a-input> |
| | | </a-form-item> |
| | | </a-col> |
| | | <a-col |
| | | :md="8" |
| | | :sm="8" |
| | | > |
| | | <a-form-item label="åç§°"> |
| | | <a-input |
| | | placeholder="请è¾å
¥åç§°æ¥è¯¢" |
| | | v-model="queryParam.name" |
| | | ></a-input> |
| | | </a-form-item> |
| | | </a-col> |
| | | </a-row> |
| | | </a-form> |
| | | </div> |
| | | |
| | | <!-- æä½æé®åºå --> |
| | | <div |
| | | class="table-operator" |
| | | style="margin-top: 5px" |
| | | > |
| | | <a-button |
| | | type="primary" |
| | | @click="searchQuery" |
| | | icon="search" |
| | | >æ¥è¯¢</a-button> |
| | | <a-button |
| | | @click="searchReset" |
| | | icon="reload" |
| | | >éç½®</a-button> |
| | | <a-button |
| | | @click="handleAdd" |
| | | type="primary" |
| | | icon="plus" |
| | | >æ°å¢</a-button> |
| | | <!-- <a-button |
| | | type="primary" |
| | | icon="download" |
| | | @click="handleExportXls('åå ')" |
| | | >导åº</a-button> --> |
| | | <a-dropdown v-if="selectedRowKeys.length > 0"> |
| | | <a-button style="margin-left: 8px"> |
| | | æ¹éæä½ |
| | | <a-icon type="down" /> |
| | | </a-button> |
| | | <a-menu slot="overlay"> |
| | | <a-menu-item @click="batchDel"> |
| | | <a-icon type="delete" />å é¤ |
| | | </a-menu-item> |
| | | </a-menu> |
| | | </a-dropdown> |
| | | </div> |
| | | |
| | | <a-table |
| | | ref="table" |
| | | bordered |
| | | size="middle" |
| | | rowKey="id" |
| | | :columns="columns" |
| | | :dataSource="dataSource" |
| | | :pagination="ipagination" |
| | | :loading="loading" |
| | | :rowSelection="{selectedRowKeys: selectedRowKeys, onChange: onSelectChange, getCheckboxProps:getCheckboxProps}" |
| | | @change="handleTableChange" |
| | | :scroll="{ x: true}" |
| | | > |
| | | <template |
| | | slot="num" |
| | | slot-scope="text" |
| | | > |
| | | <a-tooltip |
| | | placement="top" |
| | | :title="text" |
| | | trigger="hover" |
| | | > |
| | | <div> |
| | | <template slot="title"> </template> |
| | | <p style="cusor:pointer; overflow: hidden; white-space: nowrap; text-overflow: ellipsis; width: 130px;">{{ text }}</p> |
| | | </div> |
| | | </a-tooltip> |
| | | </template> |
| | | <template |
| | | slot="name" |
| | | slot-scope="text" |
| | | > |
| | | <a-tooltip |
| | | placement="top" |
| | | :title="text" |
| | | trigger="hover" |
| | | > |
| | | <div> |
| | | <template slot="title"> </template> |
| | | <p style="cusor:pointer; overflow: hidden; white-space: nowrap; text-overflow: ellipsis; width: 130px;">{{ text }}</p> |
| | | </div> |
| | | </a-tooltip> |
| | | </template> |
| | | <span |
| | | slot="action" |
| | | slot-scope="text, record" |
| | | > |
| | | <a |
| | | href="javascript:;" |
| | | @click="handleDetail(record)" |
| | | >详æ
</a> |
| | | <a-divider type="vertical" /> |
| | | <a-dropdown> |
| | | <a class="ant-dropdown-link"> |
| | | æ´å¤ |
| | | <a-icon type="down" /> |
| | | </a> |
| | | <a-menu slot="overlay"> |
| | | <a-menu-item> |
| | | <a @click="handleEdit(record)">ç¼è¾</a> |
| | | </a-menu-item> |
| | | |
| | | <a-menu-item v-if="record.nextAreas.length==0"> |
| | | <a-popconfirm |
| | | title="ç¡®å®å é¤å?" |
| | | @confirm="() => handleDelete(record.id)" |
| | | > |
| | | <a>å é¤</a> |
| | | </a-popconfirm> |
| | | </a-menu-item> |
| | | <a-menu-item v-else> |
| | | <a-popconfirm title="å½åä¿¡æ¯å·²è¢«å¼ç¨ï¼è¯·å
å é¤å
³èä¿¡æ¯ååæ§è¡å 餿ä½"> |
| | | <a class="frozenRowClass">å é¤</a> |
| | | </a-popconfirm> |
| | | </a-menu-item> |
| | | </a-menu> |
| | | </a-dropdown> |
| | | </span> |
| | | |
| | | </a-table> |
| | | <site-area-line-model |
| | | ref="modalForm" |
| | | @ok="modalFormOk" |
| | | ></site-area-line-model> |
| | | </a-card> |
| | | </template> |
| | | |
| | | <script> |
| | | import { requestPut, deleteAction, getAction } from '@/api/manage' |
| | | import { JeecgListMixin } from '@/mixins/JeecgListMixin' |
| | | import SiteAreaLineModel from './SiteAreaLineModel' |
| | | import JInput from '@/components/jeecg/JInput' |
| | | import JEllipsis from '@/components/jeecg/JEllipsis' |
| | | |
| | | export default { |
| | | name: 'SiteAreaLine2List', |
| | | mixins: [JeecgListMixin], |
| | | components: { |
| | | SiteAreaLineModel, |
| | | JInput, |
| | | JEllipsis, |
| | | }, |
| | | props: { |
| | | nodeSelected: { |
| | | type: Object, |
| | | default: {} |
| | | } |
| | | }, |
| | | data() { |
| | | return { |
| | | dataSource: [], |
| | | //é»è®¤æåº |
| | | isorter: { |
| | | column: 'num', |
| | | order: 'asc', |
| | | }, |
| | | |
| | | columns: [ |
| | | { |
| | | title: '#', |
| | | dataIndex: '', |
| | | key: 'rowIndex', |
| | | align: 'center', |
| | | customRender: function (t, r, index) { |
| | | return parseInt(index) + 1 |
| | | }, |
| | | width: 50, |
| | | }, |
| | | { |
| | | title: 'ç¼ç ', |
| | | align: "center", |
| | | dataIndex: 'num', |
| | | }, |
| | | { |
| | | title: 'åç§°', |
| | | align: "center", |
| | | dataIndex: 'name', |
| | | }, |
| | | { |
| | | title: 'å建人', |
| | | align: "center", |
| | | dataIndex: 'createBy', |
| | | }, |
| | | { |
| | | title: 'å建æ¶é´', |
| | | align: "center", |
| | | dataIndex: 'createTime', |
| | | }, |
| | | { |
| | | title: 'æä½', |
| | | align: "center", |
| | | dataIndex: 'action', |
| | | scopedSlots: { |
| | | customRender: 'action', |
| | | }, |
| | | width: 150, |
| | | fixed: 'right', |
| | | }, |
| | | ], |
| | | url: { |
| | | list: "/base/area/getAlllist", |
| | | delete: "/base/area/delete", |
| | | deleteBatch: "/base/area/deleteBatch", |
| | | exportXlsUrl: '/eam/faultCause/exportXls', |
| | | // importExcelUrl: 'base/site/importExcel', |
| | | }, |
| | | //æ°å¢ãç¼è¾ãå é¤ãæ¹éå 餿使¹åæ°æ®åå·æ°å
³èçç»ä»¶ççå¬å±æ§ |
| | | alterFlag: "", |
| | | parentNum: "-1", |
| | | parentName: "ä¸å¿/å·¥åº/工段", |
| | | }; |
| | | }, |
| | | methods: { |
| | | |
| | | getCheckboxProps(record) { |
| | | return ({ |
| | | props: { |
| | | disabled: !(record.nextAreas.length == 0), |
| | | } |
| | | }) |
| | | }, |
| | | |
| | | //ç¦ç¨ç¶ææ ·å¼ |
| | | tableRowClass(record, index) { |
| | | if (record.status != "1") { |
| | | return "frozenRowClass"; |
| | | } |
| | | return ""; |
| | | }, |
| | | |
| | | handleActive(id) { |
| | | let that = this; |
| | | requestPut(that.url.active, {}, { id: id }).then((res) => { |
| | | if (res.success) { |
| | | that.$message.success(res.message); |
| | | that.loadData(); |
| | | } else { |
| | | that.$message.warning(res.message); |
| | | } |
| | | }); |
| | | }, |
| | | handleAdd: function () { |
| | | this.$refs.modalForm.add({ parentNum: this.parentNum, parentName: this.parentName }); |
| | | this.$refs.modalForm.title = "æ°å¢"; |
| | | this.$refs.modalForm.disableSubmit = false; |
| | | // this.$refs.modalForm.parentId = this.nodeSelected.key; |
| | | this.$refs.modalForm.parentId = !this.nodeSelected.key ? '-1' : this.nodeSelected.key; |
| | | }, |
| | | handleDelete: function (id) { |
| | | if (!this.url.delete) { |
| | | this.$message.error("请设置url.delete屿§!") |
| | | return |
| | | } |
| | | var that = this; |
| | | deleteAction(that.url.delete, { id: id }).then((res) => { |
| | | if (res.success) { |
| | | //éæ°è®¡ç®å页é®é¢ |
| | | that.reCalculatePage(1) |
| | | that.$message.success(res.message); |
| | | that.loadData(); |
| | | that.alterFlag = new Date(); |
| | | } else { |
| | | that.$message.warning(res.message); |
| | | } |
| | | }); |
| | | }, |
| | | |
| | | batchDel: function () { |
| | | if (!this.url.deleteBatch) { |
| | | this.$message.error("请设置url.deleteBatch屿§!") |
| | | return |
| | | } |
| | | if (this.selectedRowKeys.length <= 0) { |
| | | this.$message.warning('è¯·éæ©ä¸æ¡è®°å½ï¼'); |
| | | 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.loadData(); |
| | | that.onClearSelected(); |
| | | that.alterFlag = new Date(); |
| | | } else { |
| | | that.$message.warning(res.message); |
| | | } |
| | | }).finally(() => { |
| | | that.loading = false; |
| | | }); |
| | | } |
| | | }); |
| | | } |
| | | }, |
| | | |
| | | searchReset() { |
| | | this.queryParam = {}; |
| | | this.queryParam.parentId = this.nodeSelected.key; |
| | | this.loadData(1); |
| | | }, |
| | | }, |
| | | watch: { |
| | | alterFlag() { |
| | | this.$bus.$emit('queryTreeData'); |
| | | }, |
| | | nodeSelected() { |
| | | this.queryParam = {}; |
| | | this.queryParam.parentId = this.nodeSelected.key; |
| | | this.parentNum = !this.nodeSelected.rfield1 ? '-1' : this.nodeSelected.rfield1; |
| | | this.parentName = !this.nodeSelected.rfield2 ? 'ä¸å½èªå' : this.nodeSelected.rfield2; |
| | | this.loadData(1); |
| | | }, |
| | | }, |
| | | created() { |
| | | this.queryParam = {}; |
| | | this.queryParam.parentId = this.nodeSelected.key; |
| | | this.loadData(1); |
| | | } |
| | | |
| | | |
| | | } |
| | | </script> |
| | | <style> |
| | | @import '~@assets/less/common.less'; |
| | | |
| | | .frozenRowClass { |
| | | color: #c9c9c9; |
| | | } |
| | | .success { |
| | | color: green; |
| | | } |
| | | .error { |
| | | color: red; |
| | | } |
| | | .fontweight { |
| | | font-weight: bold; |
| | | } |
| | | </style> |
¶Ô±ÈÐÂÎļþ |
| | |
| | | <template> |
| | | <a-card |
| | | :loading="cardLoading" |
| | | :bordered="false" |
| | | title="ä¸å¿/å·¥åº/工段" |
| | | style="height: 100%;" |
| | | > |
| | | <a-spin :spinning="loading"> |
| | | <a-alert |
| | | type="info" |
| | | :showIcon="true" |
| | | style="margin-right: 54px;" |
| | | > |
| | | <div slot="message"> |
| | | å½åï¼<span v-if="this.currSelected.title">{{ getCurrSelectedTitle() }}</span> |
| | | <a |
| | | v-if="this.currSelected.title" |
| | | style="margin-left: 10px" |
| | | @click="onClearSelected" |
| | | >åæ¶</a> |
| | | </div> |
| | | </a-alert> |
| | | <div class="drawer-bootom-button"> |
| | | <a-dropdown |
| | | :trigger="['click']" |
| | | placement="bottomCenter" |
| | | > |
| | | <a-menu slot="overlay"> |
| | | <a-menu-item |
| | | key="1" |
| | | @click="expandAll" |
| | | >å±å¼ææ</a-menu-item> |
| | | <a-menu-item |
| | | key="2" |
| | | @click="closeAll" |
| | | >åå¹¶ææ</a-menu-item> |
| | | <a-menu-item |
| | | key="3" |
| | | @click="refreshTree" |
| | | >å·æ°</a-menu-item> |
| | | </a-menu> |
| | | <a-button> |
| | | <a-icon type="bars" /> |
| | | </a-button> |
| | | </a-dropdown> |
| | | </div> |
| | | |
| | | <a-input-search |
| | | @search="handleSearch" |
| | | style="width:100%;margin-top: 10px" |
| | | placeholder="ä¸å¿/å·¥åº/工段" |
| | | allowClear |
| | | v-model="searchInput" |
| | | @change="handleChange" |
| | | /> |
| | | |
| | | <a-tree |
| | | showLine |
| | | ref="tree" |
| | | :checkStrictly="checkStrictly" |
| | | :expandedKeys.sync="expandedKeys" |
| | | :selectedKeys="selectedKeys" |
| | | :dropdownStyle="{maxHeight:'200px',overflow:'auto'}" |
| | | :treeData="treeDataSource" |
| | | :autoExpandParent="autoExpandParent" |
| | | @select="onSelect" |
| | | @expand="onExpand" |
| | | > |
| | | </a-tree> |
| | | </a-spin> |
| | | </a-card> |
| | | </template> |
| | | |
| | | <script> |
| | | import { getAction } from '@/api/manage' |
| | | import Tooltip from 'ant-design-vue/es/tooltip' |
| | | import JEllipsis from "@/components/jeecg/JEllipsis" |
| | | |
| | | export default { |
| | | name: 'SiteAreaLineLeft', |
| | | components: { |
| | | Tooltip, |
| | | JEllipsis |
| | | }, |
| | | props: ['value'], |
| | | data() { |
| | | return { |
| | | searchInput: '', |
| | | cardLoading: false, |
| | | loading: false, |
| | | treeDataSource: [], |
| | | selectedKeys: [], |
| | | expandedKeys: [], |
| | | url: { |
| | | treeList: '/base/area/loadTree' |
| | | }, |
| | | searchValue: '', |
| | | dataList: [], |
| | | autoExpandParent: true, |
| | | checkStrictly: true, |
| | | allTreeKeys: [], |
| | | currSelected: {}, |
| | | hiding: false, |
| | | } |
| | | }, |
| | | created() { |
| | | this.queryTreeData(); |
| | | this.closeAll(); |
| | | }, |
| | | methods: { |
| | | getCurrSelectedTitle() { |
| | | return !this.currSelected.title ? '' : this.currSelected.title; |
| | | }, |
| | | onClearSelected() { |
| | | this.hiding = true; |
| | | this.currSelected = {}; |
| | | this.selectedKeys = []; |
| | | }, |
| | | onSelect(selectedKeys, e) { |
| | | this.hiding = false; |
| | | let record = e.node.dataRef; |
| | | this.currSelected = Object.assign({}, record); |
| | | this.selectedKeys = [record.key]; |
| | | }, |
| | | onExpand(expandedKeys) { |
| | | this.expandedKeys = expandedKeys; |
| | | this.autoExpandParent = false; |
| | | }, |
| | | queryTreeData() { |
| | | this.loading = true; |
| | | this.cardLoading = true; |
| | | getAction(this.url.treeList).then((res) => { |
| | | if (res.success) { |
| | | this.dataList = []; |
| | | this.allTreeKeys = []; |
| | | this.treeDataSource = res.result; |
| | | this.generateList(res.result); |
| | | } else { |
| | | this.$message.warn(res.message); |
| | | } |
| | | }).finally(() => { |
| | | this.loading = false; |
| | | this.cardLoading = false; |
| | | }) |
| | | }, |
| | | handleChange() { |
| | | let search = this.searchInput; |
| | | let expandedKeys = this.dataList |
| | | .map(item => { |
| | | if (item.title.indexOf(search) > -1) { |
| | | return this.getParentKey(item.key, this.treeDataSource); |
| | | } |
| | | return null; |
| | | }) |
| | | .filter((item, i, self) => item && self.indexOf(item) === i); |
| | | Object.assign(this, { |
| | | expandedKeys, |
| | | searchValue: search, |
| | | autoExpandParent: true, |
| | | }); |
| | | }, |
| | | handleSearch(value) { |
| | | let search = value; |
| | | let expandedKeys = this.dataList |
| | | .map(item => { |
| | | if (item.title.indexOf(search) > -1) { |
| | | return this.getParentKey(item.key, this.treeDataSource); |
| | | } |
| | | return null; |
| | | }) |
| | | .filter((item, i, self) => item && self.indexOf(item) === i); |
| | | Object.assign(this, { |
| | | expandedKeys, |
| | | searchValue: search, |
| | | autoExpandParent: true, |
| | | }); |
| | | }, |
| | | getParentKey(key, tree) { |
| | | let parentKey; |
| | | for (let i = 0; i < tree.length; i++) { |
| | | const node = tree[i]; |
| | | if (node.children) { |
| | | if (node.children.some(item => item.key === key)) { |
| | | parentKey = node.key; |
| | | } else if ( |
| | | this.getParentKey(key, node.children)) { |
| | | parentKey = this.getParentKey(key, node.children); |
| | | } |
| | | } |
| | | } |
| | | return parentKey; |
| | | }, |
| | | |
| | | generateList(data) { |
| | | for (let i = 0; i < data.length; i++) { |
| | | const node = data[i]; |
| | | const key = node.key; |
| | | const title = node.title; |
| | | // const type = node.type; |
| | | |
| | | this.dataList.push({ key, title: title }); |
| | | this.allTreeKeys.push(key); |
| | | if (node.children) { |
| | | this.generateList(node.children); |
| | | } |
| | | } |
| | | }, |
| | | expandAll() { |
| | | this.expandedKeys = this.allTreeKeys; |
| | | }, |
| | | closeAll() { |
| | | this.expandedKeys = ['-1']; |
| | | }, |
| | | refreshTree() { |
| | | this.queryTreeData(); |
| | | } |
| | | }, |
| | | mounted() { |
| | | this.$bus.$on('queryTreeData', this.queryTreeData); |
| | | }, |
| | | //çå¬ |
| | | watch: { |
| | | currSelected(val) {//çå¬currSelected ååï¼å°åååçæ°å¼ä¼ éç» getCurrSelected äºä»¶ |
| | | this.$bus.$emit('getCurrSelected', val); |
| | | }, |
| | | } |
| | | } |
| | | </script> |
| | | |
| | | <style> |
| | | .replaceSearch { |
| | | color: #00090f; |
| | | font-weight: bold; |
| | | background-color: rgb(204, 204, 204); |
| | | } |
| | | /* .ant-select-disabled { |
| | | color: rgba(241, 16, 16, 0.25); |
| | | } |
| | | .ant-select-disabled .ant-select-selection { |
| | | background: #a76b6b; |
| | | } */ |
| | | /*éèæ çé»è®¤icon*/ |
| | | .ant-tree-switcher-noop { |
| | | display: none !important; |
| | | } |
| | | /*éèæ çé»è®¤ç«çº¿*/ |
| | | .ant-tree.ant-tree-show-line li:not(:last-child):before { |
| | | border-left: 0px; |
| | | } |
| | | |
| | | .ant-card-body .table-operator { |
| | | margin: 15px; |
| | | } |
| | | |
| | | .anty-form-btn { |
| | | width: 100%; |
| | | text-align: center; |
| | | } |
| | | |
| | | .anty-form-btn button { |
| | | margin: 0 5px; |
| | | } |
| | | |
| | | .anty-node-layout .ant-layout-header { |
| | | padding-right: 0; |
| | | } |
| | | |
| | | .header { |
| | | padding: 0 8px; |
| | | } |
| | | |
| | | .header button { |
| | | margin: 0 3px; |
| | | } |
| | | |
| | | .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-content { |
| | | height: 90% !important; |
| | | overflow-y: hidden; |
| | | } |
| | | |
| | | #app .desktop { |
| | | height: auto !important; |
| | | } |
| | | |
| | | /** Buttonæé®é´è· */ |
| | | .ant-btn { |
| | | margin-left: 3px; |
| | | } |
| | | .ant-alert { |
| | | padding: 5px 15px 5px 37px; |
| | | } |
| | | .drawer-bootom-button { |
| | | position: absolute; |
| | | top: 1px; |
| | | /* padding: 10px 16px; */ |
| | | text-align: left; |
| | | right: 0; |
| | | background: #fff; |
| | | border-radius: 0 0 2px 2px; |
| | | } |
| | | </style> |
¶Ô±ÈÐÂÎļþ |
| | |
| | | <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 |
| | | hidden |
| | | :gutter="24" |
| | | > |
| | | <a-col :span="24"> |
| | | <a-form-item |
| | | label="ä¸çº§æ
éåå ç¼å·ï¼" |
| | | :labelCol="labelCol" |
| | | :wrapperCol="wrapperCol" |
| | | > |
| | | <a-input |
| | | allow-clear |
| | | :disabled="true" |
| | | :placeholder="disableSubmit?'':'请è¾å
¥ä¸çº§æ
éåå ç¼å·'" |
| | | v-decorator="['parentNum', validatorRules.parentNum ]" |
| | | /> |
| | | </a-form-item> |
| | | </a-col> |
| | | </a-row> |
| | | <a-row |
| | | hidden |
| | | :gutter="24" |
| | | > |
| | | <a-col :span="24"> |
| | | <a-form-item |
| | | label="ä¸çº§æ
éåå åç§°ï¼" |
| | | :labelCol="labelCol" |
| | | :wrapperCol="wrapperCol" |
| | | > |
| | | <a-input |
| | | allow-clear |
| | | :disabled="true" |
| | | :placeholder="disableSubmit?'':'请è¾å
¥ä¸çº§æ
éåå åç§°'" |
| | | v-decorator="['parentName', validatorRules.parentName ]" |
| | | /> |
| | | </a-form-item> |
| | | </a-col> |
| | | </a-row> |
| | | |
| | | <a-row :gutter="24"> |
| | | <a-col :span="24"> |
| | | <a-form-item |
| | | label="ç¼å·ï¼" |
| | | :labelCol="labelCol" |
| | | :wrapperCol="wrapperCol" |
| | | > |
| | | <a-input |
| | | :disabled="disableSubmit" |
| | | allow-clear |
| | | :placeholder="disableSubmit?'':'请è¾å
¥ç¼ç '" |
| | | 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="labelCol" |
| | | :wrapperCol="wrapperCol" |
| | | > |
| | | <a-input |
| | | allow-clear |
| | | :disabled="disableSubmit" |
| | | :placeholder="disableSubmit?'':'请è¾å
¥åç§°'" |
| | | v-decorator="['name', validatorRules.name ]" |
| | | /> |
| | | </a-form-item> |
| | | </a-col> |
| | | </a-row> |
| | | |
| | | <a-row :gutter="24"> |
| | | <a-col :span="24"> |
| | | <a-form-item |
| | | :labelCol="labelCol" |
| | | :wrapperCol="wrapperCol" |
| | | label="夿³¨" |
| | | > |
| | | <a-textarea |
| | | allow-clear |
| | | :disabled="disableSubmit" |
| | | :placeholder="disableSubmit?'':'请è¾å
¥å¤æ³¨'" |
| | | v-decorator="['remark', validatorRules.remark]" |
| | | /> |
| | | </a-form-item> |
| | | </a-col> |
| | | </a-row> |
| | | |
| | | </a-form> |
| | | </a-spin> |
| | | |
| | | <template slot="footer"> |
| | | <a-button |
| | | :style="{marginRight: '8px'}" |
| | | @click="handleCancel" |
| | | > |
| | | å
³é |
| | | </a-button> |
| | | <!-- <a-button |
| | | v-if="!this.model.id" |
| | | :disabled="disableSubmit || confirmLoading" |
| | | :loading="confirmLoading" |
| | | @click="handleOk" |
| | | type="primary" |
| | | >ä¿åå¹¶ç»§ç»æ°å¢</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 { getAction, postAction, requestPut } from '@/api/manage' |
| | | import { duplicateCheck } from '@/api/api' |
| | | |
| | | export default { |
| | | name: 'SiteAreaLineModel', |
| | | data() { |
| | | return { |
| | | title: "æä½", |
| | | visible: false, |
| | | codeDisable: true, |
| | | disableSubmit: false, |
| | | parentId: '', |
| | | model: {}, |
| | | 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: 2, max: 30, message: 'é¿åº¦å¨ 2 å° 30 个å符', trigger: 'blur' }, |
| | | // { validator: this.validateNum }, |
| | | ] |
| | | }, |
| | | name: { |
| | | rules: [ |
| | | { required: true, message: '请è¾å
¥åç§°!' }, |
| | | // { min: 2, max: 30, message: 'é¿åº¦å¨ 2 å° 30 个å符', trigger: 'blur' }, |
| | | // { validator: this.validateName }, |
| | | ] |
| | | }, |
| | | remark: { |
| | | rules: [ |
| | | { min: 0, max: 100, message: 'é¿åº¦ä¸è¶
è¿ 100 个å符', trigger: 'blur' }, |
| | | ] |
| | | } |
| | | }, |
| | | url: { |
| | | add: "/base/area/add", |
| | | edit: "/base/area/edit", |
| | | }, |
| | | //æ°å¢ãç¼è¾ãå é¤ãæ¹éå 餿使¹åæ°æ®åå·æ°å
³èçç»ä»¶ççå¬å±æ§ |
| | | alterFlag: "" |
| | | } |
| | | }, |
| | | created() { |
| | | }, |
| | | methods: { |
| | | |
| | | add(record) { |
| | | this.edit(record); |
| | | }, |
| | | |
| | | edit(record) { |
| | | this.form.resetFields(); |
| | | this.model = Object.assign({}, record); |
| | | this.visible = true; |
| | | this.disableSubmit = false; |
| | | this.$nextTick(() => { |
| | | this.form.setFieldsValue(pick(this.model, 'parentNum', 'parentName', 'num', 'name', 'remark')) |
| | | }); |
| | | 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) { |
| | | formData.parentId = this.parentId |
| | | 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(); |
| | | }) |
| | | } |
| | | }) |
| | | }, |
| | | |
| | | handleCancel() { |
| | | this.close() |
| | | }, |
| | | }, |
| | | 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> |
¶Ô±ÈÐÂÎļþ |
| | |
| | | <template> |
| | | <keep-alive> |
| | | <site-area-line-2-list |
| | | v-if="nodeType === 0" |
| | | :nodeSelected="nodeSelected" |
| | | ></site-area-line-2-list> |
| | | </keep-alive> |
| | | </template> |
| | | |
| | | <script> |
| | | import SiteAreaLine2List from "./SiteAreaLine2List"; |
| | | export default { |
| | | name: 'FaultCauseRight', |
| | | components: { |
| | | SiteAreaLine2List, |
| | | }, |
| | | data() { |
| | | return { |
| | | description: 'ä¸å¿/å·¥åº/工段', |
| | | currentOrgCode: '', |
| | | nodeType: 0, |
| | | nodeSelected: {} |
| | | } |
| | | }, |
| | | methods: {}, |
| | | mounted() { |
| | | this.$bus.$on('getCurrSelected', (data) => { //getCurrSelected äºä»¶ æ¥æ¶ç»ä»¶ä¼ éçåæ° |
| | | this.nodeType = (data.type == undefined ? 0 : data.type); |
| | | this.nodeSelected = data; |
| | | }) |
| | | }, |
| | | } |
| | | </script> |
| | | |
| | | <style scoped> |
| | | </style> |