update 项目管理
This commit is contained in:
@@ -14,7 +14,7 @@
|
||||
<a-alert message="tips:选择所属区域和类型之后,项目名称、项目序号自动生成,无需手动填写。项目备注请填写房屋所属单位的名称、道路的名称或大厦的名称,比如XX中学、XX大厦、XX小区等。登记项目时,应在项目备注中明确项目所指对象。" />
|
||||
</div>
|
||||
<a-form-model-item label="类型" prop="type">
|
||||
<a-radio-group button-style="solid" v-model="form.type">
|
||||
<a-radio-group button-style="solid" v-model="form.type" :disabled="exist">
|
||||
<a-radio-button :value="1"> 住宅 </a-radio-button>
|
||||
<a-radio-button :value="2"> 非住宅 </a-radio-button>
|
||||
</a-radio-group>
|
||||
@@ -23,10 +23,10 @@
|
||||
<a-cascader :field-names="{ label: 'name', value: 'code', children: 'children' }" :options="areaData" expand-trigger="hover" placeholder="请选择所属区域" v-model="form.areaCode" :display-render="displayRender" @change="formAreaCodeChange" />
|
||||
</a-form-model-item>
|
||||
<a-form-model-item label="项目名称" prop="name">
|
||||
<a-input placeholder="选择所属区域和类型之后自动生成" v-model="form.name" :disabled="true" />
|
||||
<a-input placeholder="选择所属区域和类型之后自动生成" v-model="form.name" :disabled="true"><a-icon slot="suffix" type="lock" /></a-input>
|
||||
</a-form-model-item>
|
||||
<a-form-model-item label="序号" prop="sort">
|
||||
<a-input placeholder="选择所属区域和类型之后自动生成" v-model="form.sort" :disabled="true"> </a-input>
|
||||
<a-input placeholder="选择所属区域和类型之后自动生成" v-model="form.sort" :disabled="true"><a-icon slot="suffix" type="lock" /> </a-input>
|
||||
</a-form-model-item>
|
||||
<a-form-model-item label="备注" prop="note">
|
||||
<a-textarea :rows="4" placeholder="请输入备注,填写房屋所属单位的名称、道路的名称或大厦的名称,比如XX中学、XX大厦、XX小区等。登记项目时,应在项目备注中明确项目所指对象。" v-model="form.note"></a-textarea>
|
||||
@@ -61,6 +61,7 @@ export default {
|
||||
/** 其他成员属性 */
|
||||
areaData: [],
|
||||
intEntity: {},
|
||||
exist: false,
|
||||
/* ... */
|
||||
};
|
||||
},
|
||||
@@ -74,7 +75,7 @@ export default {
|
||||
(newVal, oldVal) => {
|
||||
// 做点什么
|
||||
if (this.form.areaCode.length == 4 && this.form.type) {
|
||||
if (this.intEntity.id && this.intEntity.type == this.form.type) {
|
||||
if (this.intEntity.id && this.intEntity.type == this.form.type && this.intEntity.areaCode[this.intEntity.areaCode.length - 1] == this.form.areaCode[this.form.areaCode.length - 1]) {
|
||||
this.$set(this.form, 'sort', this.intEntity.sort);
|
||||
this.$set(this.form, 'name', this.intEntity.name);
|
||||
} else {
|
||||
@@ -143,6 +144,8 @@ export default {
|
||||
areaCode: areaCode.length == 4 ? areaCode : [],
|
||||
/* ... */
|
||||
});
|
||||
// 住宅/非住宅不可更改
|
||||
this.exist = !!params.record;
|
||||
},
|
||||
|
||||
/**
|
||||
|
||||
Reference in New Issue
Block a user