|
@@ -204,7 +204,9 @@
|
|
|
<!-- </el-col>-->
|
|
|
<el-col :span="12">
|
|
|
<el-form-item :label="$t('cons.nodeType')" prop="type">
|
|
|
- <el-select v-model="form.type" :placeholder="$t('common.select',{
|
|
|
+ <el-select
|
|
|
+ v-model="form.type"
|
|
|
+ :placeholder="$t('common.select',{
|
|
|
name: $t('cons.nodeType')
|
|
|
})">
|
|
|
<el-option
|
|
@@ -216,11 +218,15 @@
|
|
|
</el-select>
|
|
|
</el-form-item>
|
|
|
</el-col>
|
|
|
- <el-col :span="12">
|
|
|
+ <el-col :span="12" v-if="form.type == NodeType.desFile.code">
|
|
|
<el-form-item :label="$t('cons.designFileType')" prop="classifyType">
|
|
|
- <el-select v-model="form.classifyType+''" :placeholder="$t('common.select',{
|
|
|
+ <el-select
|
|
|
+ v-model="form.classifyType"
|
|
|
+ :placeholder="$t('common.select',{
|
|
|
name: $t('cons.designFileType')
|
|
|
- })">
|
|
|
+ })"
|
|
|
+ clearable
|
|
|
+ >
|
|
|
<el-option
|
|
|
v-for="dict in dict.type.classify_type"
|
|
|
:key="dict.value"
|
|
@@ -231,18 +237,8 @@
|
|
|
</el-form-item>
|
|
|
</el-col>
|
|
|
</el-row>
|
|
|
- <!-- <el-row>-->
|
|
|
- <!-- <el-col :span="12">-->
|
|
|
- <!-- <el-form-item label="设计文件类型" prop="classifyType">-->
|
|
|
- <!-- <el-input v-model="form.classifyType" placeholder="请输入设计文件类型"/>-->
|
|
|
- <!-- </el-form-item>-->
|
|
|
- <!-- </el-col>-->
|
|
|
- <!-- <el-col :span="12">-->
|
|
|
-
|
|
|
- <!-- </el-col>-->
|
|
|
- <!-- </el-row>-->
|
|
|
<el-row>
|
|
|
- <el-col :span="24">
|
|
|
+ <el-col :span="24" v-if="form.type == NodeType.desFile.code">
|
|
|
<el-form-item :label="$t('cons.machine')" prop="toMachineId">
|
|
|
<el-select style="width: 100%" v-model="form.machineId" multiple
|
|
|
:placeholder="$t('common.select',{name:$t('cons.machine')})">
|
|
@@ -339,9 +335,15 @@ import {
|
|
|
} from "@/api/cons/consUnitInfo";
|
|
|
import {listAllPileMachineInfo} from "@/api/cons/pileMachineInfo";
|
|
|
import {getToken} from "@/utils/auth";
|
|
|
+import {NodeType} from "@/utils/EnumConst";
|
|
|
|
|
|
export default {
|
|
|
name: "cons-unit",
|
|
|
+ computed: {
|
|
|
+ NodeType() {
|
|
|
+ return NodeType
|
|
|
+ }
|
|
|
+ },
|
|
|
dicts: ['cons_unit_type', 'classify_type'],
|
|
|
components: {Treeselect},
|
|
|
data() {
|
|
@@ -489,7 +491,7 @@ export default {
|
|
|
type: "0",
|
|
|
parentId: null,
|
|
|
createType: 1,
|
|
|
- classifyType: "1",
|
|
|
+ classifyType: null,
|
|
|
name: null,
|
|
|
};
|
|
|
this.resetForm("form");
|
|
@@ -528,6 +530,8 @@ export default {
|
|
|
this.reset();
|
|
|
getConsUnitInfo(row.id).then(response => {
|
|
|
this.form = response.data;
|
|
|
+ const {classifyType} = response.data;
|
|
|
+ this.form.classifyType = classifyType && classifyType + '';
|
|
|
this.open = true;
|
|
|
this.title = this.$t("common.modifyDialog", {name: this.$t("cons.consUnit")});
|
|
|
listAllConsUnitExcludeChild(row.id).then(response => {
|