| | |
| | | <a-form-model-item prop="orgId" label="使用车间"> |
| | | <a-tree-select v-model="model.orgId" |
| | | style="width: 100%" |
| | | :tree-data="treeData" |
| | | :tree-data="treeDataAlias" |
| | | :dropdown-style="{ maxHeight: '400px', overflow: 'auto' }" |
| | | placeholder="请选择使用车间" |
| | | allow-clear |
| | | tree-default-expand-all |
| | | :disabled="editable || disableSubmit" |
| | | :disabled="disableSubmit" |
| | | > |
| | | </a-tree-select> |
| | | </a-form-model-item> |
| | |
| | | loadProductionOptions:'/mdc/mdcProduction/loadProductionTreeOptions' |
| | | }, |
| | | treeData: [], |
| | | treeDataAlias: [], |
| | | } |
| | | }, |
| | | created() { |
| | |
| | | getAction(this.url.loadProductionOptions).then(res => { |
| | | if (res.success) { |
| | | this.treeData = [...res.result] |
| | | this.treeDataAlias = this.deepCopyAndModify(res.result) |
| | | }else { |
| | | that.$message.warning(res.message) |
| | | } |
| | | }) |
| | | }, |
| | | deepCopyAndModify(arr) { |
| | | // 如果当前元素不是数组或对象,直接返回 |
| | | if (!Array.isArray(arr) && typeof arr !== 'object' || arr === null || arr.length === 0) { |
| | | return arr; |
| | | } |
| | | |
| | | // 如果是数组,创建一个新数组并递归处理每个元素 |
| | | if (Array.isArray(arr)) { |
| | | const newArray = []; |
| | | for (let i = 0; i < arr.length; i++) { |
| | | newArray.push(this.deepCopyAndModify(arr[i])); |
| | | } |
| | | return newArray; |
| | | } |
| | | |
| | | // 如果是对象,创建一个新对象并递归处理每个属性 |
| | | const newObj = {}; |
| | | for (const key in arr) { |
| | | if (arr.hasOwnProperty(key)) { |
| | | if(key === 'selectable') { |
| | | newObj[key] = true; |
| | | } else if(key === 'children') { |
| | | newObj[key] = this.deepCopyAndModify(arr[key]); |
| | | }else { |
| | | newObj[key] = arr[key]; |
| | | } |
| | | |
| | | } |
| | | } |
| | | return newObj; |
| | | }, |
| | | } |
| | | } |
| | | </script> |
| | |
| | | <div class="table-operator" v-if="isDisplayOperation"> |
| | | <a-button @click="handleOpenReceiveFaultModal" type="primary" icon="plus" v-if="isShowAuth('eam:repair:collect')">领取</a-button> |
| | | <!--<a-button type="primary" icon="download" @click="handleExportXls('维修工单')">导出</a-button>--> |
| | | <a-dropdown v-if="selectedRowKeys.length > 0"> |
| | | <a-menu slot="overlay"> |
| | | <a-menu-item key="1" @click="batchDel"> |
| | | <a-icon type="delete"/> |
| | | 删除 |
| | | </a-menu-item> |
| | | </a-menu> |
| | | <a-button style="margin-left: 8px"> 批量操作 |
| | | <a-icon type="down"/> |
| | | </a-button> |
| | | </a-dropdown> |
| | | <!-- <a-dropdown v-if="selectedRowKeys.length > 0">--> |
| | | <!-- <a-menu slot="overlay">--> |
| | | <!-- <a-menu-item key="1" @click="batchDel">--> |
| | | <!-- <a-icon type="delete"/>--> |
| | | <!-- 删除--> |
| | | <!-- </a-menu-item>--> |
| | | <!-- </a-menu>--> |
| | | <!-- <a-button style="margin-left: 8px"> 批量操作--> |
| | | <!-- <a-icon type="down"/>--> |
| | | <!-- </a-button>--> |
| | | <!-- </a-dropdown>--> |
| | | </div> |
| | | |
| | | <!-- table区域-begin --> |
| | |
| | | <a-row :gutter="24"> |
| | | <a-col :span="24"> |
| | | <a-form-model-item label="停机时长(min)" prop="downLong"> |
| | | <a-input-number v-model="model.downLong" :min="1" :step="1" :precision="0" |
| | | <a-input-number v-model="model.downLong" :min="1" :max="1440" :step="1" :precision="0" |
| | | placeholder="请输入停机时长(min)" |
| | | style="width: 100%" /> |
| | | </a-form-model-item> |
| | | </a-col> |
| | | </a-row> |
| | | |
| | | <!--<a-row :gutter="24">--> |
| | | <!--<a-col :span="12">--> |
| | | <!--<a-form-model-item label="开始时间" prop="startTime">--> |
| | | <!--<a-time-picker v-model="model.startTime" value-format="HH:mm:ss" style="width: 100%"/>--> |
| | | <!--</a-form-model-item>--> |
| | | <!--</a-col>--> |
| | | <!--<a-col :span="12">--> |
| | | <!--<a-form-model-item label="结束时间" prop="endTime">--> |
| | | <!--<a-time-picker v-model="model.endTime" value-format="HH:mm:ss" style="width: 100%"/>--> |
| | | <!--</a-form-model-item>--> |
| | | <!--</a-col>--> |
| | | <!--</a-row>--> |
| | | |
| | | <a-row :gutter="24"> |
| | | <a-col :span="24"> |