|  |  |  | 
|---|
|  |  |  | <template> | 
|---|
|  |  |  | <GlobalWindow :title="title" :visible.sync="visible" :confirm-working="isWorking" @confirm="confirm"> | 
|---|
|  |  |  | <GlobalWindow width="600px" :title="title" :visible.sync="visible" :confirm-working="isWorking" @confirm="confirm"> | 
|---|
|  |  |  | <el-form :model="form" ref="form" :rules="rules"> | 
|---|
|  |  |  |  | 
|---|
|  |  |  | <el-form-item label="项目名称" prop="name"> | 
|---|
|  |  |  | <el-input v-model="form.name" placeholder="请输入名称" v-trim /> | 
|---|
|  |  |  | </el-form-item> | 
|---|
|  |  |  | <el-form-item label="所属地区" prop="addr"> | 
|---|
|  |  |  | <el-form-item label="所属地区" prop="areaId"> | 
|---|
|  |  |  | <el-cascader v-model="form.areaIdT" :props="{ | 
|---|
|  |  |  | label: 'name', | 
|---|
|  |  |  | value: 'id', | 
|---|
|  |  |  | 
|---|
|  |  |  | return { | 
|---|
|  |  |  | // 表单数据 | 
|---|
|  |  |  | form: { | 
|---|
|  |  |  | id: null, | 
|---|
|  |  |  | id: '', | 
|---|
|  |  |  | creator: '', | 
|---|
|  |  |  | createDate: '', | 
|---|
|  |  |  | editor: '', | 
|---|
|  |  |  | 
|---|
|  |  |  | this.title = title | 
|---|
|  |  |  | this.visible = true | 
|---|
|  |  |  | this.initData() | 
|---|
|  |  |  | if (target == null) { | 
|---|
|  |  |  | this.$nextTick(() => { | 
|---|
|  |  |  | this.form = { | 
|---|
|  |  |  | id: '', | 
|---|
|  |  |  | creator: '', | 
|---|
|  |  |  | createDate: '', | 
|---|
|  |  |  | editor: '', | 
|---|
|  |  |  | editDate: '', | 
|---|
|  |  |  | isdeleted: '', | 
|---|
|  |  |  | name: '', | 
|---|
|  |  |  | remark: '', | 
|---|
|  |  |  | status: '', | 
|---|
|  |  |  | sortnum: '', | 
|---|
|  |  |  | imgurl: '', | 
|---|
|  |  |  | areaIdT: '', | 
|---|
|  |  |  | cityId: '', | 
|---|
|  |  |  | areaId: '', | 
|---|
|  |  |  | provinceId: '', | 
|---|
|  |  |  | addr: '' | 
|---|
|  |  |  | } | 
|---|
|  |  |  | this.$refs.form.resetFields() | 
|---|
|  |  |  | }) | 
|---|
|  |  |  | } | 
|---|
|  |  |  | this.$nextTick(() => { | 
|---|
|  |  |  | for (const key in this.form) { | 
|---|
|  |  |  | this.form[key] = target[key] | 
|---|