| | |
| | | <!-- 按钮操作区域 --> |
| | | <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="handleAdd(2)" type="primary" v-if="currSelected.factoryCategory!=3">添加下级</a-button> |
| | | <a-button @click="handleDelete" v-if="selectedKeys.length>0">删除</a-button> |
| | | <a-button title="删除多条数据" @click="batchDel" v-if="checkedKeys.length>0">批量删除</a-button> |
| | | </a-row> |
| | |
| | | sm: { span: 16 } |
| | | }, |
| | | validatorRules: { |
| | | factoryName: [{ required: true, message: '请输入机构名称!' }] |
| | | factoryName: [{ required: true, message: '请输入机构名称!', trigger: 'change' }] |
| | | }, |
| | | url: { |
| | | getProductionTreeList: '/eam/BaseFactory/queryTreeList', |
| | | delete: '/eam/BaseFactory/delete', |
| | | edit: '/eam/BaseFactory/edit', |
| | | deleteBatch: '/eam/BaseFactory/deleteBatch', |
| | | exportXlsUrl: '/eam/BaseFactory/exportXls', |
| | | importExcelUrl: '/eam/BaseFactory/importExcel' |
| | | deleteBatch: '/eam/BaseFactory/deleteBatch' |
| | | }, |
| | | isIncludesNotLeaf: false, |
| | | confirmLoading: false |
| | |
| | | this.model = this.currSelected |
| | | this.selectedKeys = [record.key] |
| | | this.$refs.userList.show(record.id) |
| | | if (this.$refs.form) this.$refs.form.clearValidate() |
| | | }, |
| | | |
| | | onClearSelected() { |
| | |
| | | }, |
| | | |
| | | emptyCurrForm() { |
| | | this.$refs.form.resetFields() |
| | | this.model = {} |
| | | this.model = { parentId: this.model.parentId } |
| | | }, |
| | | |
| | | handleAdd(num) { |