| | |
| | | <el-form-item label="组织名称" style=" display: flex;"> |
| | | <el-input v-model="form.storg_name" placeholder="请输入" style="width: 200px" /> |
| | | </el-form-item> |
| | | <el-form-item label="组织类型" prop="torgtype_code"> |
| | | <el-select |
| | | v-model="form.torgtype_code" |
| | | filterable |
| | | :popper-append-to-body="false" |
| | | style="width: 200px" |
| | | placeholder="请选择" |
| | | > |
| | | <el-option |
| | | v-for="item in OrgTypeArr" |
| | | :key="item.torgtype_code" |
| | | :label="item.torgtype_name" |
| | | :value="item.torgtype_code" |
| | | /> |
| | | </el-select> |
| | | </el-form-item> |
| | | </div> |
| | | <div |
| | | class="bodySearchReset" |
| | |
| | | sortable="custom" |
| | | /> |
| | | <el-table-column |
| | | prop="torgtype_name" |
| | | label="组织类型" |
| | | sortable="custom" |
| | | /> |
| | | <el-table-column |
| | | prop="status" |
| | | label="状态" |
| | | sortable="custom" |
| | |
| | | </el-table> |
| | | </div> |
| | | <!--分页--> |
| | | <pagination |
| | | :total="total" |
| | | :page.sync="form.page" |
| | | :limit.sync="form.rows" |
| | | align="right" |
| | | layout="total,prev, pager, next,sizes,jumper" |
| | | popper-class="select_bottom" |
| | | @pagination="getSTorgData" |
| | | /> |
| | | <!-- <pagination--> |
| | | <!-- :total="total"--> |
| | | <!-- :page.sync="form.page"--> |
| | | <!-- :limit.sync="form.rows"--> |
| | | <!-- align="right"--> |
| | | <!-- layout="total,prev, pager, next,sizes,jumper"--> |
| | | <!-- popper-class="select_bottom"--> |
| | | <!-- @pagination="getSTorgData"--> |
| | | <!-- />--> |
| | | </div> |
| | | |
| | | <el-dialog |
| | |
| | | @close="handleClose" |
| | | > |
| | | <el-form ref="dialogForm" inline :rules="dialogFormRules" :model="dialogForm" label-width="80px"> |
| | | |
| | | <el-form-item label="组织编码" prop="OrganCode"> |
| | | <el-input v-model="dialogForm.OrganCode" :disabled="operation!=='add'" style="width: 200px" /> |
| | | </el-form-item> |
| | | <el-form-item label="组织名称" prop="OrganName"> |
| | | <el-input v-model="dialogForm.OrganName" style="width: 200px" /> |
| | | </el-form-item> |
| | | <el-form-item label="组织类型" prop="torgtype_code"> |
| | | <el-select |
| | | v-model="dialogForm.torgtype_code" |
| | | filterable |
| | | :popper-append-to-body="false" |
| | | style="width: 200px" |
| | | placeholder="请选择" |
| | | > |
| | | <el-option |
| | | v-for="item in OrgTypeArr" |
| | | :key="item.torgtype_code" |
| | | :label="item.torgtype_name" |
| | | :value="item.torgtype_code" |
| | | /> |
| | | </el-select> |
| | | </el-form-item> |
| | | <el-form-item label="所属组织" prop="storgcode"> |
| | | <el-cascader |
| | |
| | | import elDragDialog from '@/directive/el-drag-dialog' |
| | | import waves from '@/directive/waves' |
| | | import arrayToTree from 'array-to-tree' |
| | | import { PrentOrganization } from '@/api/GeneralBasicData' |
| | | import { PrentOrganization, TOrganTypeDate } from '@/api/GeneralBasicData' |
| | | |
| | | export default { |
| | | name: 'Zzjg', |
| | |
| | | mainHeight: 0, |
| | | tableHeight: 0, |
| | | form: { |
| | | torgtype_code: '', |
| | | storg_code: '', // 组织架构编码 |
| | | storg_name: '', // 组织架构名称 |
| | | prop: 'lm_date', // 排序字段 |
| | | order: 'desc', // 排序字段 |
| | | page: 1, // 第几页 |
| | | rows: 20 // 每页多少条 |
| | | storg_name: '' // 组织架构名称 |
| | | // prop: 'lm_date', // 排序字段 |
| | | // order: 'desc', // 排序字段 |
| | | // page: 1, // 第几页 |
| | | // rows: 20 // 每页多少条 |
| | | }, |
| | | total: 10, |
| | | tableData: [], |
| | | dialogVisible: false, |
| | | dialogForm: { |
| | | torgtype_code: '', // 组织类型 |
| | | OrganCode: '', // 组织编码 |
| | | OrganName: '', // 组织名称 |
| | | leve: 0, // 层级编码 |
| | |
| | | }, |
| | | operation: '', |
| | | dialogFormRules: { |
| | | torgtype_code: [ |
| | | { required: true, message: '请选择组织类型', trigger: ['blur', 'change'] } |
| | | ], |
| | | OrganCode: [ |
| | | { required: true, validator: validateCode, trigger: ['blur', 'change'] } |
| | | ], |
| | |
| | | label: 'torg_name' |
| | | }, |
| | | Options: [], |
| | | cascaderOptions: [] |
| | | cascaderOptions: [], |
| | | OrgTypeArr: [ |
| | | // { label: '工厂', value: 'F' }, |
| | | // { label: '部门', value: 'D' }, |
| | | // { label: '车间', value: 'W' } |
| | | // { label: '科室', value: 'K' }, |
| | | // { label: '生产线', value: 'L' } |
| | | ] |
| | | |
| | | } |
| | | }, |
| | | created() { |
| | | this.getSTorgData() |
| | | this.getTOrganTypeDate() |
| | | }, |
| | | mounted() { |
| | | window.addEventListener('resize', this.getHeight) |
| | | this.getHeight() |
| | | }, |
| | | methods: { |
| | | // 查询组织类型 |
| | | async getTOrganTypeDate() { |
| | | const { data: res } = await TOrganTypeDate() |
| | | this.OrgTypeArr = res |
| | | }, |
| | | // 组织架构大列表查询 |
| | | async getSTorgData() { |
| | | const res = await STorgData(this.form) |
| | |
| | | }, |
| | | // 重置 |
| | | reset() { |
| | | this.form.torgtype_code = '' |
| | | this.form.storg_code = '' |
| | | this.form.storg_name = '' |
| | | this.getSTorgData() |
| | |
| | | await this.getPrentOrganization() |
| | | this.cascaderOptions = this.filterChildren(this.cascaderOptions, row.torg_code) |
| | | this.$nextTick(() => { |
| | | this.dialogForm.torgtype_code = row.torgtype_code |
| | | this.dialogForm.OrganCode = row.torg_code |
| | | this.dialogForm.OrganName = row.torg_name |
| | | this.dialogForm.leve = parseFloat(row.leve) |
| | |
| | | this.dialogForm.OrganName = '' |
| | | this.dialogForm.storgcode = '' |
| | | this.dialogForm.parent_id = '' |
| | | this.dialogForm.torgtype_code = '' |
| | | this.dialogForm.status = 'Y' |
| | | this.dialogForm.leve = 0 |
| | | this.$refs.cascader.checkedValue = '' |
| | |
| | | getHeight() { |
| | | this.$nextTick(() => { |
| | | this.mainHeight = window.innerHeight - 85 |
| | | this.tableHeight = this.mainHeight - 200 |
| | | this.tableHeight = this.mainHeight - 137 |
| | | this.$refs.tableDataRef.doLayout() |
| | | }) |
| | | }, |
| | | changeRadio(val) { |
| | | |
| | | } |
| | | } |
| | | } |