luobisheng
2022-11-28 fa5fd9d4f9c1ba33f26a343942a7941003cc601c
src/views/operate/fivepack/threepack/components/updateUser/index.vue
@@ -82,6 +82,27 @@
              ></el-option>
            </el-select>
          </el-form-item>
          <!-- 店铺状态 -->
          <el-form-item
            v-if="isStorePage"
            class="optionItem"
            label="店铺状态:"
            prop="status"
          >
            <el-select
              v-model="store.status"
              placeholder="请选择店铺状态"
              :disabled="isView()"
            >
              <el-option
                v-for="item in statusList"
                :key="item.id"
                :value="item.id"
                :label="item.name"
              ></el-option>
            </el-select>
          </el-form-item>
          <el-form-item
            v-if="!isStorePage"
            class="optionItem"
@@ -147,6 +168,7 @@
        relationVideo: "",
        type: null,
        storeScore: null,
        status: null,
      },
      rules: {
        type: [{ required: true, validator: validateStoreType }],
@@ -168,9 +190,16 @@
        relationVideo: [
          { required: true, trigger: "blur", message: "请输入关联摄像机" },
        ],
        status: [
          { required: true, trigger: "blur", message: "请选择店铺状态" },
        ],
      },
      shopTypeList: [],
      relationVideoList: [],
      statusList: [
        { id: 1, name: "经营" },
        { id: 2, name: "倒闭" },
      ],
    };
  },
  async created() {
@@ -183,7 +212,7 @@
        this.store.relationVideo = this.store.videoPoint.name;
      }
    }
    if (!this.isView()) {
      await this.getShopTypeList();
    }
@@ -193,7 +222,7 @@
    onSubmit() {
      this.$refs.store.validate((valid) => {
        if (valid) {
          debugger
          debugger;
          this.store.type = this.store.type[1];
          if (this.isCreated()) {
            addStoreInfo(this.store)
@@ -242,7 +271,7 @@
    async getShopTypeList() {
      let arr = await getCodeList("16");
      this.shopTypeList = this.createShopTypeTree(arr);
      if (this.dialogType === "update") {
        const selectedStoreType = arr.find(
          (item) => item.name === this.store.typeName