保安服务单位许可和备案申请系统
lin
2024-05-08 5455230326af3e930771fbb688536b3483f076b7
src/components/cardPopup/cardPopuponce.vue
@@ -1,89 +1,230 @@
<template>
  <basic-container class="openOnceMain">
    <el-collapse v-model="activeNames" @change="handleChange">
      <el-collapse-item title="公司基本信息" name="1">
        <avue-form
          ref="form1"
          v-model="obj0"
          :option="option"
          class="cardButs"
        ></avue-form>
    <!-- <el-collapse v-model="activeNames" @change="handleChange">
      <el-collapse-item title="基本信息" name="1">
        <avue-form ref="form1" v-model="obj0" :option="option" class="cardButs"></avue-form>
      </el-collapse-item>
      <el-collapse-item title="附件上传/查询" name="2">
        <attach
          v-if="openattach"
          :type="imgType"
          :ptype="type"
          :opens="opens"
          :enclosure="enclosure"
        ></attach>
      <el-collapse-item title="附件上传" name="2">
        <attach v-if="openattach" :type="imgType" :ptype="type" :opens="opens" :enclosure="enclosure"></attach>
      </el-collapse-item>
    </el-collapse> -->
    <el-collapse v-model="activeNames" @change="handleChange">
      <el-collapse-item title="基本信息" name="1">
        <avue-form ref="form1" v-model="obj0" :option="option" @submit="submit" class="cardButs"></avue-form>
      </el-collapse-item>
      <el-collapse-item title="附件上传" name="2">
        <div v-for="(item,index) in  this.obj0.taskPlaceRecordVOList">
          <div style="font-weight: bold;font-size: 20px;">
            {{item.title}}
          </div>
          <div v-for="(item1,index1) in item.children">
            <div>
              {{index1+1}} {{item1.title}}
            </div>
            <div style="margin: 10px;">
              <!--  <el-upload class="upload-demo" :limit="1" :data="item1" :on-change="handleChange"
                :http-request="uploadFile">
                <el-button size="small" type="primary">点击上传</el-button>
              </el-upload> -->
            </div>
          </div>
        </div>
        <!-- <attach :type="imgType" :ptype="type" :opens="opens" :enclosure="enclosure"></attach> -->
        <!-- <avue-form :option="optionFile" v-model="obj0"></avue-form> -->
      </el-collapse-item>
    </el-collapse>
  </basic-container>
</template>
<script>
import { ourDatas } from "@/views/home/ourDatas";
import attach from "@/components/attach/attach";
import { mapGetters } from "vuex";
export default {
  components: {
    attach,
  },
  props: ["useWhere", "paredData"],
  data() {
    return {
      opens: false,
      openattach: false,
      enclosure: "",
      type: "",
      activeNames: ["1", "2"],
      imgType: "",
      obj0: {},
      option: {
        emptyBtn: false,
        submitBtn: true,
        editDisabled: true,
        gutter: 50,
        column: [],
      },
    };
  },
  computed: {
    ...mapGetters(["userInfo"]),
  },
  mounted() {
    for (let i = 0; i < ourDatas.length; i++) {
      if (ourDatas[i].menuName == this.paredData.$ptype) {
        // console.log(ourDatas[i]);
        this.option.column = ourDatas[i].datas.column;
        this.imgType = ourDatas[i].imgType;
        this.openattach = true;
        this.type = ourDatas[i].type;
        this.enclosure = ourDatas[i].enclosure;
  import {
    ourDatas
  } from "@/views/home/ourDatas";
  import attach from "@/components/attach/attach";
  import {
    mapGetters
  } from "vuex";
  export default {
    components: {
      attach,
    },
    props: ["useWhere", "paredData"],
    data() {
      return {
        patrolGroup: [],
        opens: false,
        openattach: false,
        enclosure: "",
        type: "",
        activeNames: ["1", "2"],
        imgType: "",
        obj0: {},
        option: {
          emptyBtn: false,
          submitBtn: true,
          gutter: 50,
          column: [{
              labelWidth: 100,
              label: "场所名称",
              prop: "placeName",
              // span: 24,
              rules: [{
                required: true,
                message: "请输入场所名称",
                trigger: "blur"
              }]
            }, {
              labelWidth: 100,
              label: "负责人名称",
              prop: "principal",
              // span: 24,
              rules: [{
                required: true,
                message: "请输入场所负责人姓名",
                trigger: "blur"
              }]
            },
            {
              labelWidth: 100,
              label: "负责人电话",
              prop: "principalPhone",
              // span: 24,
              rules: [{
                required: true,
                message: "请输入场所负责人联系方式",
                trigger: "blur"
              }]
            },
            {
              labelWidth: 100,
              // width: 160,
              overHidden: true,
              slot: true,
              label: "位置",
              prop: "location",
              type: "map",
              dataType: "string",
              // labelWidth: 120,
              // span: 24,
              value: [117.96646, 28.431002, ""],
              // cascader: ['houseCodeBinds'],
              mapChange: (params) => {
                console.log('高德回调参数', params)
              },
              //高德初始化参数
              params: {
                zoom: 10,
                zoomEnable: false,
                dragEnable: false,
              },
              rules: [{
                required: true,
                message: "请选择地址",
                trigger: "blur",
              }, ],
            },
            {
              labelWidth: 100,
              label: "派出所名称",
              prop: "pcsName",
              // span: 24,
              rules: [{
                required: true,
                message: "请输入派出所名称",
                trigger: "blur"
              }]
            },
            {
              // width: 156,
              labelWidth: 100,
              overHidden: true,
              label: "社区名称",
              parent: false,
              prop: "communityCode",
              // search: true,
              searchSpan: 4,
              searchType: 'input',
              type: "tree",
              dicUrl: "/api/blade-system/region/treeToCommunity",
              props: {
                label: "name",
                value: "id"
              },
              // change: ({
              //   value,
              //   column
              // }) => {
              //   this.$message.success('change事件查看控制台')
              //   console.log('值改变', value, column)
              // },
              nodeClick: (data, node, nodeComp) => {
                this.obj0.communityName = data.name
                // this.$message.success(JSON.stringify(data))
              },
              rules: [{
                required: true,
                message: "请选择社区名称",
                trigger: "blur",
              }, ],
            },
            {
              labelWidth: 100,
              disabled: true,
              // label: "无诈类型",
              // prop: "noFraudType",
              label: "无诈类别",
              prop: "noFraudType",
              align: 'center',
              dicUrl: "/api/blade-system/dict-biz/tree?code=noExplosionCategory",
              props: {
                label: "title",
                value: "key",
              },
              type: 'select',
              search: true,
              searchSpan: 4,
              searchLabelWidth: 96,
              align: 'center'
            },
          ]
        },
      };
    },
    computed: {
      ...mapGetters(["userInfo"]),
    },
    mounted() {
      for (let i = 0; i < ourDatas.length; i++) {
        if (ourDatas[i].menuName == this.paredData.$ptype) {
          // console.log(ourDatas[i]);
          this.option.column = ourDatas[i].datas.column;
          this.imgType = ourDatas[i].imgType;
          this.openattach = true;
          this.type = ourDatas[i].type;
          this.enclosure = ourDatas[i].enclosure;
        }
      }
    }
    let cloum = this.option.column;
    for (let i in cloum) {
      if (cloum[i].prop == "jurisdiction") {
        cloum[i] = {
          label: "所属辖区",
          prop: "jurisdiction",
          labelWidth: 160,
          span: 12,
        };
      let cloum = this.option.column;
      for (let i in cloum) {
        if (cloum[i].prop == "jurisdiction") {
          cloum[i] = {
            label: "所属辖区",
            prop: "jurisdiction",
            labelWidth: 160,
            span: 12,
          };
        }
        cloum[i]["disabled"] = true;
      }
      cloum[i]["disabled"] = true;
    }
    // console.log(cloum);
    this.paredData.jurisdiction = this.paredData.$jurisdiction;
    this.obj0 = this.paredData;
    // console.log(this.obj0);
  },
};
      // console.log(cloum);
      this.paredData.jurisdiction = this.paredData.$jurisdiction;
      this.obj0 = this.paredData;
      console.log("this.obj0******************" + JSON.stringify(this.obj0));
    },
  };
</script>
<style lang="scss" scoped>
.openOnceMain {
  width: 100%;
  height: 100%;
}
</style>
  .openOnceMain {
    width: 100%;
    height: 100%;
  }
</style>