1
MrShi
2025-01-06 d7dca690cedd12e271f0ee0b9050679d73796f5c
admin/src/views/project/components/OperaYwProjectWindow.vue
@@ -1,11 +1,11 @@
<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',
@@ -35,7 +35,7 @@
    return {
      // 表单数据
      form: {
        id: null,
        id: '',
        creator: '',
        createDate: '',
        editor: '',
@@ -71,6 +71,29 @@
      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]