| | |
| | | <dict-tag :options="dict.type.sys_platform" :value="scope.row.platformCode"/> |
| | | </template> |
| | | </el-table-column> |
| | | <el-table-column label="归属部门" align="center" prop="deptName" /> |
| | | <el-table-column label="状态" align="center" prop="status"> |
| | | <template slot-scope="scope"> |
| | | <dict-tag :options="dict.type.sys_normal_disable" :value="scope.row.status"/> |
| | |
| | | :key="dict.value" |
| | | :label="dict.label" |
| | | :value="dict.value" |
| | | /> |
| | | </el-select> |
| | | </el-form-item> |
| | | <el-form-item label="归属部门" prop="deptId"> |
| | | <el-select v-model="form.deptId" placeholder="请选择部门" clearable> |
| | | <el-option |
| | | v-for="dept in deptOptions" |
| | | :key="dept.deptId" |
| | | :label="dept.deptName" |
| | | :value="dept.deptId" |
| | | /> |
| | | </el-select> |
| | | </el-form-item> |
| | |
| | | ], |
| | | platformCode: [ |
| | | { required: true, message: "平台标识不能为空", trigger: "change" } |
| | | ], |
| | | deptId: [ |
| | | { required: true, message: "归属部门不能为空", trigger: "change" } |
| | | ] |
| | | } |
| | | }; |
| | |
| | | this.loading = false; |
| | | }); |
| | | }, |
| | | /** 获取部门列表 */ |
| | | /** 获取部门列表(只显示分公司:parent_id=100) */ |
| | | getDeptList() { |
| | | listDept().then(response => { |
| | | this.deptList = response.data; |
| | | listDept({ parentId: 100 }).then(response => { |
| | | // 过滤出分公司(parent_id=100的部门) |
| | | if (response.data) { |
| | | this.deptList = response.data.filter(dept => dept.parentId === 100); |
| | | } else { |
| | | this.deptList = []; |
| | | } |
| | | }); |
| | | }, |
| | | // 取消按钮 |