|
@@ -26,7 +26,7 @@
|
|
|
</el-form-item>
|
|
|
</el-col>
|
|
|
<el-col>
|
|
|
- <el-form-item label="上级公司" size="default">
|
|
|
+ <el-form-item label="上级公司" :rules="formRules.isNotNull" prop="parentID" size="default">
|
|
|
<el-select style="width: 100%" v-model="tableForm.parentID" class="input-shadow" filterable default-first-option clearable placeholder="请选择">
|
|
|
<el-option v-for="item in tableOptionser" :key="item.v" :label="item.k" :value="item.v">
|
|
|
</el-option>
|
|
@@ -34,8 +34,8 @@
|
|
|
</el-form-item>
|
|
|
</el-col>
|
|
|
<el-col>
|
|
|
- <el-form-item label="上级公司ID" size="default" prop="parentID">
|
|
|
- <el-input v-model="tableForm.parentID" placeholder="请输入上级公司ID" />
|
|
|
+ <el-form-item label="上级公司ID" :rules="tableForm.parentID?formRules.isNotNull:''" size="default" prop="parentID">
|
|
|
+ <el-input :disabled="!tableForm.parentID" v-model="tableForm.parentID" placeholder="请输入上级公司ID" />
|
|
|
</el-form-item>
|
|
|
</el-col>
|
|
|
<el-col>
|
|
@@ -169,7 +169,11 @@ const getSelectData = async (id?, name?) => {
|
|
|
id,
|
|
|
dataContent: name ? [name] : name === null ? [null] : [],
|
|
|
});
|
|
|
- if (code == 0) {
|
|
|
+ if (code == 0 && returnData.listValues.length) {
|
|
|
+ const nomarlObj = _.cloneDeep(returnData.listValues[0]);
|
|
|
+ nomarlObj.k = "无";
|
|
|
+ nomarlObj.v = null;
|
|
|
+ returnData.listValues.push(nomarlObj);
|
|
|
tableOptionser.value = returnData.listValues;
|
|
|
tableOptionCopys.value = _.cloneDeep(returnData.listValues);
|
|
|
} else {
|
|
@@ -225,7 +229,12 @@ const resetTable = () => {
|
|
|
tableData.value = [];
|
|
|
};
|
|
|
|
|
|
-const btnAuthMap = [, 'new_airport_companies_button', 'airport_company_editor_button', 'airport_company_deletion_button']
|
|
|
+const btnAuthMap = [
|
|
|
+ ,
|
|
|
+ "new_airport_companies_button",
|
|
|
+ "airport_company_editor_button",
|
|
|
+ "airport_company_deletion_button",
|
|
|
+];
|
|
|
//新增-编辑-删除
|
|
|
const generalDataReception = async (data) => {
|
|
|
try {
|
|
@@ -235,7 +244,7 @@ const generalDataReception = async (data) => {
|
|
|
const { code } = await GeneralDataReception({
|
|
|
serviceId: serviceId.value,
|
|
|
dataContent: JSON.stringify(data),
|
|
|
- btnAuth: btnAuthMap[data.event]
|
|
|
+ btnAuth: btnAuthMap[data.event],
|
|
|
});
|
|
|
if (code == 0) {
|
|
|
ElMessage.success(`操作成功`);
|