|
@@ -137,12 +137,13 @@
|
|
|
</template>
|
|
</template>
|
|
|
|
|
|
|
|
<script>
|
|
<script>
|
|
|
-import { cityDataLabel } from 'ele-admin/packages/utils/regions';
|
|
|
|
|
-import { listOrganizations } from '@/api/system/organization';
|
|
|
|
|
-import { saveOrUpdate } from '@/api/factoryModel';
|
|
|
|
|
-import { getUserPage } from '@/api/system/organization';
|
|
|
|
|
|
|
+import {cityDataLabel} from 'ele-admin/packages/utils/regions';
|
|
|
|
|
+import {listOrganizations} from '@/api/system/organization';
|
|
|
|
|
+import {saveOrUpdate} from '@/api/factoryModel';
|
|
|
|
|
+import {getUserPage} from '@/api/system/organization';
|
|
|
import AreaSelect from "@/views/enterpriseModel/regionalManage/components/area-cascader.vue";
|
|
import AreaSelect from "@/views/enterpriseModel/regionalManage/components/area-cascader.vue";
|
|
|
import {basicAreaPageAPI} from "@/api/regionalManage";
|
|
import {basicAreaPageAPI} from "@/api/regionalManage";
|
|
|
|
|
+
|
|
|
export default {
|
|
export default {
|
|
|
components: {AreaSelect},
|
|
components: {AreaSelect},
|
|
|
props: {
|
|
props: {
|
|
@@ -172,7 +173,7 @@ export default {
|
|
|
location: [],
|
|
location: [],
|
|
|
locationDetail: ''
|
|
locationDetail: ''
|
|
|
},
|
|
},
|
|
|
- areaIdList:[],
|
|
|
|
|
|
|
+ areaIdList: [],
|
|
|
enabled: 1,
|
|
enabled: 1,
|
|
|
parentId: 0,
|
|
parentId: 0,
|
|
|
leaderId: '',
|
|
leaderId: '',
|
|
@@ -182,19 +183,19 @@ export default {
|
|
|
return {
|
|
return {
|
|
|
defaultForm,
|
|
defaultForm,
|
|
|
// 表单数据
|
|
// 表单数据
|
|
|
- form: { ...defaultForm() },
|
|
|
|
|
|
|
+ form: {...defaultForm()},
|
|
|
// 表单验证规则
|
|
// 表单验证规则
|
|
|
rules: {
|
|
rules: {
|
|
|
- code: [{ required: true, message: '请输入', trigger: 'blur' }],
|
|
|
|
|
- name: [{ required: true, message: '请输入', trigger: 'blur' }],
|
|
|
|
|
- groupId: [{ required: true, message: '请输入', trigger: 'blur' }],
|
|
|
|
|
|
|
+ code: [{required: true, message: '请输入', trigger: 'blur'}],
|
|
|
|
|
+ name: [{required: true, message: '请输入', trigger: 'blur'}],
|
|
|
|
|
+ groupId: [{required: true, message: '请输入', trigger: 'blur'}],
|
|
|
leaderId: {
|
|
leaderId: {
|
|
|
required: true,
|
|
required: true,
|
|
|
message: '请输入',
|
|
message: '请输入',
|
|
|
trigger: 'change'
|
|
trigger: 'change'
|
|
|
},
|
|
},
|
|
|
'extInfo.principalDep': [
|
|
'extInfo.principalDep': [
|
|
|
- { required: true, message: '请输入', trigger: 'change' }
|
|
|
|
|
|
|
+ {required: true, message: '请输入', trigger: 'change'}
|
|
|
]
|
|
]
|
|
|
},
|
|
},
|
|
|
visible: false,
|
|
visible: false,
|
|
@@ -287,7 +288,7 @@ export default {
|
|
|
});
|
|
});
|
|
|
},
|
|
},
|
|
|
restForm() {
|
|
restForm() {
|
|
|
- this.form = { ...this.defaultForm() };
|
|
|
|
|
|
|
+ this.form = {...this.defaultForm()};
|
|
|
this.$nextTick(() => {
|
|
this.$nextTick(() => {
|
|
|
this.$refs.form.clearValidate();
|
|
this.$refs.form.clearValidate();
|
|
|
});
|
|
});
|
|
@@ -312,7 +313,8 @@ export default {
|
|
|
|
|
|
|
|
},
|
|
},
|
|
|
getAreaInfo(nodeInfo) {
|
|
getAreaInfo(nodeInfo) {
|
|
|
- this.form.areaName = nodeInfo[0].pathLabels.join('/')
|
|
|
|
|
|
|
+ this.form.areaName = nodeInfo[0]?.pathLabels.join('/') || ''
|
|
|
|
|
+ this.form.areaId = this.form.areaId || ''
|
|
|
},
|
|
},
|
|
|
// 获取公司数据
|
|
// 获取公司数据
|
|
|
getGs() {
|
|
getGs() {
|
|
@@ -331,6 +333,7 @@ export default {
|
|
|
},
|
|
},
|
|
|
// 获取人员
|
|
// 获取人员
|
|
|
getUserPage() {
|
|
getUserPage() {
|
|
|
|
|
+ if (!this.form.extInfo.principalDep) return this.options.leaderId = []
|
|
|
let par = {
|
|
let par = {
|
|
|
groupId: this.form.extInfo.principalDep,
|
|
groupId: this.form.extInfo.principalDep,
|
|
|
size: 999
|
|
size: 999
|
|
@@ -345,10 +348,12 @@ export default {
|
|
|
<style lang="scss" scoped>
|
|
<style lang="scss" scoped>
|
|
|
.location-warp {
|
|
.location-warp {
|
|
|
display: flex;
|
|
display: flex;
|
|
|
|
|
+
|
|
|
.detail {
|
|
.detail {
|
|
|
margin-left: 10px;
|
|
margin-left: 10px;
|
|
|
}
|
|
}
|
|
|
}
|
|
}
|
|
|
|
|
+
|
|
|
:deep(
|
|
:deep(
|
|
|
.el-dialog:not(.ele-dialog-form)
|
|
.el-dialog:not(.ele-dialog-form)
|
|
|
.el-dialog__body
|
|
.el-dialog__body
|