| | |
| | | <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-upload> |
| | | <a-button @click="handleDelete" v-if="selectedKeys.length>0">删除</a-button> |
| | | <a-button title="删除多条数据" @click="batchDel" v-if="checkedKeys.length>0">批量删除</a-button> |
| | | <!--<a-button @click="refresh" type="default" icon="reload" :loading="loading">刷新</a-button>--> |
| | |
| | | <a-input-search @search="onSearch" style="width:100%;margin-top: 10px" placeholder="请输入维修部门名称"/> |
| | | <!-- 树--> |
| | | <a-col :md="10" :sm="24"> |
| | | <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-tree checkable multiple @select="onSelect" @check="onCheck" @rightClick="rightHandle" |
| | | :selectedKeys="selectedKeys" :checkedKeys="checkedKeys" :treeData="departTree" |
| | | :checkStrictly="checkStrictly" :expandedKeys="iExpandedKeys" :autoExpandParent="autoExpandParent" |
| | | @expand="onExpand"/> |
| | | </a-col> |
| | | </div> |
| | | </a-card> |
| | |
| | | <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="departCode" label="维修部门编号"> |
| | | <a-input placeholder="请输入产线/维修部门编号" v-model="model.departCode"/> |
| | | <a-input placeholder="请输入维修部门/班组编号" v-model="model.departCode"/> |
| | | </a-form-model-item> |
| | | <a-form-model-item :labelCol="labelCol" :wrapperCol="wrapperCol" prop="departName" label="维修部门名称"> |
| | | <a-input placeholder="请输入产线/维修部门名称" v-model="model.departName"/> |
| | | <a-input placeholder="请输入维修部门/班组名称" v-model="model.departName"/> |
| | | </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="无"> |
| | | </a-tree-select> |
| | | <a-tree-select style="width:100%" :dropdownStyle="{maxHeight:'200px',overflow:'auto'}" |
| | | :treeData="treeData" :disabled="disable" v-model="model.parentId" |
| | | placeholder="无"/> |
| | | </a-form-model-item> |
| | | <a-form-model-item :labelCol="labelCol" :wrapperCol="wrapperCol" label="排序"> |
| | | <a-input-number v-model="model.departOrder"/> |
| | |
| | | </a-row> |
| | | </template> |
| | | <script> |
| | | import { queryRepairDepartTreeList, queryRepDepIdTree, deleteByRepairDepartId } from '@api/api' |
| | | import { httpAction, deleteAction } from '@api/manage' |
| | | import { JeecgListMixin } from '@/mixins/JeecgListMixin' |
| | | import EamRepairDepartModal from './modules/EamRepairDepartModal' |
| | | import { queryRepairDepartTreeList, queryRepDepIdTree, deleteByRepairDepartId } from '@api/api' |
| | | import { httpAction, deleteAction } from '@api/manage' |
| | | import { JeecgListMixin } from '@/mixins/JeecgListMixin' |
| | | import EamRepairDepartModal from './modules/EamRepairDepartModal' |
| | | |
| | | export default { |
| | | name: 'EamRepairDepartList', |
| | |
| | | edges: [] |
| | | }, |
| | | validatorRules: { |
| | | departName: [{ required: true, message: '请输入产线/维修部门名称!' }] |
| | | departCode: [{ required: true, message: '请输入维修部门/班组编号' }], |
| | | departName: [{ required: true, message: '请输入维修部门/班组名称' }] |
| | | }, |
| | | url: { |
| | | delete: '/eam/eamBaseRepairDepart/delete', |