保安服务单位许可和备案申请系统
linwe
2024-07-09 7b7ebd1b9cb1f582b78981485780cad7d957f3f0
无诈代码优化
6 files modified
437 ■■■■ changed files
src/api/recordOur/outCardPopup.js 9 ●●●● patch | view | raw | blame | history
src/components/Approval/Approval.vue 28 ●●●● patch | view | raw | blame | history
src/components/cardPopup/cardPopup.vue 83 ●●●●● patch | view | raw | blame | history
src/components/cardPopup/cardPopuponce.vue 297 ●●●●● patch | view | raw | blame | history
src/views/home/index.vue 2 ●●● patch | view | raw | blame | history
vue.config.js 18 ●●●●● patch | view | raw | blame | history
src/api/recordOur/outCardPopup.js
@@ -8,6 +8,13 @@
    data: row
  })
}
export const update = (row) => {
  return request({
    url: '/api/blade-taskNoFraudReporting/taskNoFraudReporting/updateTwo',
    method: 'post',
    data: row
  })
}
export const uploadFile = (row) => {
  return request({
@@ -35,4 +42,4 @@
      type
    }
  })
}
}
src/components/Approval/Approval.vue
@@ -19,17 +19,23 @@
        </template> -->
        <template slot-scope="{ type, size, row }" slot="menu">
          <el-button icon="icon-zhengjian" :size="size" :type="type" class="zhengJian-icon"
            @click.stop="handleCredentials(row)">查看</el-button>
            @click.stop="handleCredentials(row,true)">查看</el-button>
          <el-button icon="icon-zhengjian" :size="size" :type="type" class="zhengJian-icon"
            @click.stop="handleCredentials(row,false)">重新提交</el-button>
        </template>
      </avue-crud>
    </basic-container>
    <div class="seeOnces" v-if="openOnceShow">
      <i class="el-icon-close openOnceCLoce" style="color: #000 !important" @click="openClose">
      </i>
      <div class="seeOncesMain">
        <cardPopuponce class="openOnce" :paredData="paredData"></cardPopuponce>
        <cardPopuponce class="openOnce" @child-event="parentMethod" :paredData="paredData" :status="status">
        </cardPopuponce>
      </div>
    </div>
  </div>
</template>
@@ -67,6 +73,7 @@
    },
    data() {
      return {
        status: false,
        useWhere: "",
        paredData: "",
        openOnceShow: false,
@@ -89,7 +96,7 @@
          searchShow: false,
          // searchMenuSpan: 8,
          labelWidth: 130,
          menuWidth: 100,
          menuWidth: 160,
          headerAlign: "center",
          align: "center",
          border: true,
@@ -232,11 +239,20 @@
                },
              ],
            },
            {
              label: "审核结果",
              prop: "remark",
            },
          ],
        },
      };
    },
    methods: {
      parentMethod() {
        console.log("*************123456******************")
        this.openOnceShow = false
      },
      refreshChange() {
        this.onLoad(this.page);
      },
@@ -248,13 +264,15 @@
        }
        done();
      },
      handleCredentials(val) {
      handleCredentials(val, status) {
        this.openOnceShow = true;
        this.paredData = val;
        this.status = status
        console.log(val);
      },
      openClose() {
        this.paredData = "";
        this.status = false
        this.openOnceShow = false;
      },
      onLoad(page, params = {}) {
@@ -312,4 +330,4 @@
  .openOnceCLoce:hover {
    color: red;
  }
</style>
</style>
src/components/cardPopup/cardPopup.vue
@@ -46,11 +46,7 @@
          </div>
          <div class="hand-next">
            <!-- <el-button type="primary" @click="tip1up1">上一页</el-button> -->
            <!-- <el-button type="primary" @click="tip1" :disabled="!opens">暂存</el-button> -->
            <el-button type="primary" @click="up()" :disabled="!opens">{{
      //canDoIt ? "提交审批" : "已成功提交"
      opens ? "提交审批" : "提交审批"
            <el-button type="primary" @click="up()" :disabled="!opens">{{opens ? "提交审批" : "提交审批"
              }}</el-button>
            <el-button type="info" @click="qx">取消</el-button>
          </div>
@@ -266,46 +262,31 @@
          emptyBtn: false,
          submitBtn: true,
          gutter: 50,
          column: [
            //   {
            //   label: "附件",
            //   prop: "parentCode",
            //   type: 'upload',
            //   span: 24,
            //   dragFile: true,
            //   // action: action,
            //   rules: [{
            //     required: true,
            //     message: "请上传附件",
            //     trigger: "blur"
            //   }]
            // },
            {
              label: '附件',
              prop: 'fileUrls',
              type: 'upload',
              span: 24,
              hide: true,
              labelWidth: 140,
              multiple: true,
              listType: "text",
              // showFileList: true,
              propsHttp: {
                res: 'data',
                name: "originalName",
                url: "link"
              },
              data: {
                suffix: 'pdf,ppt,doc,docx'
              },
              action: '/api/blade-resource/oss/endpoint/put-file-attach-suffix',
              rules: [{
                required: true,
                message: "请上传附件",
                trigger: "blur",
              }, ],
          column: [{
            label: '附件',
            prop: 'fileUrls',
            type: 'upload',
            span: 24,
            hide: true,
            labelWidth: 140,
            multiple: true,
            listType: "text",
            // showFileList: true,
            propsHttp: {
              res: 'data',
              name: "originalName",
              url: "link"
            },
          ],
            data: {
              suffix: 'pdf,ppt,doc,docx'
            },
            action: '/api/blade-resource/oss/endpoint/put-file-attach-suffix',
            rules: [{
              required: true,
              message: "请上传附件",
              trigger: "blur",
            }, ],
          }, ],
        },
        activeNames: ["1", "2"],
@@ -354,7 +335,7 @@
        } else {
          this.see = true;
          // this.openS();
          console.log("********6666********" + JSON.stringify(this.useWhere))
          // console.log("********6666********" + JSON.stringify(this.useWhere))
          this.obj0.noFraudType = this.useWhere
          this.getPatrolGroupTree();
@@ -370,13 +351,13 @@
    },
    methods: {
      onSelectChange(e) {
        console.log("selectChange===>", e);
        // console.log("selectChange===>", e);
        this.obj0.addressName = e.addressName
        this.obj0.houseCode = e.addressCode
        // this.getPlaceAddressListRequest()
      },
      onRemoteMethod(query) {
        console.log("remote===>", query)
        // console.log("remote===>", query)
        this.getPlaceAddressListRequest(query)
      },
      getPlaceAddressListRequest(query) {
@@ -388,7 +369,7 @@
      },
      uploadFile(param) {
        console.log("自定义上传", param);
        // console.log("自定义上传", param);
        const formData = new FormData()
        formData.append('file', param.file)
        formData.append('suffix', "pdf,ppt,doc,docx")
@@ -400,9 +381,9 @@
              imageUrls: res.data.data.link
            })
          }
          console.log('上传图片成功' + JSON.stringify(res))
          // console.log('上传图片成功' + JSON.stringify(res))
          // console.log('上传图片成功2' + JSON.stringify(this.patrolGroup))
          console.log('上传图片成功2' + JSON.stringify(this.taskPlaceRecordVOList))
          // console.log('上传图片成功2' + JSON.stringify(this.taskPlaceRecordVOList))
        }).catch(response => {
          console.log('图片上传失败')
@@ -410,7 +391,7 @@
      },
      handleChange(file, fileList) {
        console.table(fileList)
        // console.table(fileList)
        // this.fileList = fileList.slice(-3);
      },
      tipchose() {
src/components/cardPopup/cardPopuponce.vue
@@ -1,16 +1,22 @@
<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-item>
      <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>
        <avue-form v-if="status" ref="form1" v-model="obj0" :option="option" @submit="submit"
          class="cardButs"></avue-form>
        <avue-form v-else ref="form1" v-model="obj0" :option="optionTwo" @submit="submit" class="cardButs">
          <template slot-scope="{size}" slot="addressName">
            <el-select v-model="obj0.addressName" clearable filterable remote :remote-method="onRemoteMethod"
              @change="onSelectChange" placeholder="请输入与门牌地址二维码地址一致" reserve-keyword>
              <el-option v-for="item in standardAddressList" :key="item.addressCode" :label="item.addressName"
                :value="item">
              </el-option>
            </el-select>
          </template>
        </avue-form>
      </el-collapse-item>
      <el-collapse-item title="附件信息" name="2">
        <div v-for="(item,index) in  patrolGroup">
@@ -22,12 +28,13 @@
              {{index1+1}}. {{item1.title}}
            </div>
            <div style="margin: 10px;" class="attach_row_btn">
              <el-button v-if="item1.images" @click="handleExport(item1.images)" size="small"
              <el-button v-if="item1.images && status" @click="handleExport(item1.images)" size="small"
                type="primary">下载文件</el-button>
              <!--  <el-upload class="upload-demo" :limit="1" :data="item1" :on-change="handleChange"
              <el-upload v-if="!status" class="upload-demo" :limit="1" :data="item1" :on-change="handleChange"
                :http-request="uploadFile">
                <el-button size="small" type="primary">点击上传</el-button>
              </el-upload> -->
              </el-upload>
            </div>
          </div>
        </div>
@@ -35,6 +42,13 @@
        <!-- <avue-form :option="optionFile" v-model="obj0"></avue-form> -->
      </el-collapse-item>
    </el-collapse>
    <div class="hand-next">
      <el-button type="primary" @click="commitFrom()" :disabled="status">{{status ? "提交审批" : "提交审批"
        }}</el-button>
      <el-button type="info" @click="qx">取消</el-button>
    </div>
  </basic-container>
</template>
<script>
@@ -45,9 +59,13 @@
    add,
    patrolGroupTree,
    selectIn,
    uploadFile
    uploadFile,
    update
  } from "@/api/recordOur/outCardPopup";
  import attach from "@/components/attach/attach";
  import {
    getDoorplateAddressList
  } from "@/api/permit/permit";
  import {
    mapGetters
  } from "vuex";
@@ -55,9 +73,10 @@
    components: {
      attach,
    },
    props: ["useWhere", "paredData"],
    props: ["useWhere", "paredData", "status"],
    data() {
      return {
        standardAddressList: [], //标准地址数据
        patrolGroup: [],
        opens: false,
        openattach: false,
@@ -66,6 +85,7 @@
        activeNames: ["1", "2"],
        imgType: "",
        obj0: {},
        taskPlaceRecordVOList: [],
        option: {
          emptyBtn: false,
          submitBtn: true,
@@ -238,6 +258,176 @@
            },
          ]
        },
        optionTwo: {
          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,
              overHidden: true,
              slot: true,
              label: "位置",
              prop: "location",
              type: "map",
              dataType: "string",
              value: [117.96646, 28.431002, ""],
              mapChange: (params) => {
                console.log('高德回调参数', params)
              },
              //高德初始化参数
              params: {
                zoom: 10,
                zoomEnable: false,
                dragEnable: false,
              },
              rules: [{
                required: true,
                message: "请选择地址",
                trigger: "blur",
              }, ],
            },
            {
              labelWidth: 100,
              overHidden: true,
              label: "派出所名称",
              parent: false,
              prop: "pcsCode",
              searchSpan: 4,
              searchType: 'input',
              type: "tree",
              dicUrl: "/api/blade-policeStation/policeStation/tree",
              props: {
                label: "name",
                value: "id"
              },
              nodeClick: (data, node, nodeComp) => {
                this.obj0.pcsName = data.name
              },
              rules: [{
                required: true,
                message: "请输入派出所名称",
                trigger: "blur"
              }]
            },
            {
              labelWidth: 100,
              overHidden: true,
              label: "社区名称",
              parent: false,
              prop: "communityCode",
              // search: true,
              searchSpan: 4,
              searchType: 'input',
              type: "tree",
              dicUrl: "/api/blade-system/region/treeToCommunity?isFiter='1'",
              defaultExpandedKeys: ["361102"],
              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,
              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'
            },
            {
              labelWidth: 110,
              prop: "addressName",
              slot: true,
              label: "场所标准地址",
              rules: [{
                required: true,
                message: "请选择场所标准地址",
                trigger: "blur",
              }, ],
            },
            {
              labelWidth: 110,
              label: '二维码图片',
              type: 'upload',
              listType: 'picture-img',
              propsHttp: {
                res: 'data',
                url: 'link',
              },
              canvasOption: {
                text: ' ',
                ratio: 0.1
              },
              action: '/api/blade-resource/oss/endpoint/put-file',
              tip: '只能上传jpg/png图片',
              span: 12,
              row: true,
              prop: 'qrImg',
              rules: [{
                required: true,
                message: "请上传二维码图片",
                trigger: "blur",
              }, ],
            },
          ]
        },
      };
    },
    computed: {
@@ -269,19 +459,87 @@
      // console.log(cloum);
      this.paredData.jurisdiction = this.paredData.$jurisdiction;
      this.obj0 = this.paredData;
      this.getPatrolGroupTree()
      this.getPatrolGroupTree(this.obj0.noFraudType)
      console.log("this.obj0******************" + JSON.stringify(this.obj0));
    },
    methods: {
      onSelectChange(e) {
        console.log("selectChange===>", e);
        this.obj0.addressName = e.addressName
        this.obj0.houseCode = e.addressCode
        // this.getPlaceAddressListRequest()
      },
      onRemoteMethod(query) {
        console.log("remote===>", query)
        this.getPlaceAddressListRequest(query)
      },
      getPlaceAddressListRequest(query) {
        getDoorplateAddressList(1, 50, {
          addressName: query
        }).then(res => {
          this.standardAddressList = res.data.data.records;
        })
      },
      commitFrom(val = 1) {
        // console.log("************123*************")
        if (this.obj0.fileUrls) {
          this.obj0.fileUrls = JSON.stringify(this.obj0.fileUrls)
        }
        if (this.obj0.location) {
          let arr = this.obj0.location.split(",")
          if (arr.length > 1) {
            this.obj0.lng = arr[0]
            this.obj0.lat = arr[1]
            this.obj0.location = arr[2]
          }
        }
        this.obj0.type = 2
        if (this.taskPlaceRecordVOList.length > 0) {
          this.obj0.taskPlaceRecordVOList = this.taskPlaceRecordVOList
        }
        update(this.obj0).then(() => {
          this.$emit('child-event', '');
          // this.qx();
          this.s
          this.$message({
            message: "重新提交申请成功",
            type: "success"
          });
          this.$store.commit("changecanDoIt", false);
        });
      },
      uploadFile(param) {
        console.log("自定义上传", param);
        const formData = new FormData()
        formData.append('file', param.file)
        formData.append('suffix', "pdf,ppt,doc,docx")
        let data = param.data
        uploadFile(formData).then(res => {
          if (res.data.code == 200) {
            this.taskPlaceRecordVOList.push({
              itemId: data.id,
              imageUrls: res.data.data.link
            })
          }
          console.log('上传图片成功' + JSON.stringify(res))
          // console.log('上传图片成功2' + JSON.stringify(this.patrolGroup))
          console.log('上传图片成功2' + JSON.stringify(this.taskPlaceRecordVOList))
        }).catch(response => {
          console.log('图片上传失败')
        })
      },
      handleExport(url) {
        var elemIF = document.createElement('iframe')
        elemIF.src = url;
        elemIF.style.display = 'none'
        document.body.appendChild(elemIF)
      },
      getPatrolGroupTree() {
      getPatrolGroupTree(noFraudType) {
        let data = {
          childType: 6,
          childType: noFraudType,
          type: 2
        }
        patrolGroupTree(data).then((res) => {
@@ -292,10 +550,11 @@
            item.children.forEach(items => {
              console.log(items)
              this.obj0.taskPlaceRecordVOList.forEach(itemss => {
                console.log("************789**************" + JSON.stringify(itemss))
                // console.log("************789**************" + JSON.stringify(itemss))
                // console.log("************items**************" + JSON.stringify(items))
                if (items.id === itemss.itemId.toString()) {
                  items.images = itemss.imageUrls
                  console.log("************123**************")
                  // console.log("************123**************" + items.images)
                }
              })
            })
src/views/home/index.vue
@@ -355,4 +355,4 @@
    padding: 15px 28px;
    font-size: 14px;
  }
</style>
</style>
vue.config.js
@@ -26,6 +26,22 @@
  devServer: {
    port: 1888,
    proxy: {
      "/api/blade-resource/oss": {
        //本地服务接口地址
        // target: "http://localhost:9528",
        target: "https://srgdjczzxtpt.com:2080/api",
        // target: "https://kt39592615.goho.co",
        // target: "http://z4042833u6.wicp.vip",
        // target: "http://localhost:9528",
        // target: "http://192.168.2.109:9528",
        //远程演示服务地址,可用于直接启动项目
        //target: 'https://saber.bladex.cn/api',
        changeOrigin: true,
        ws: true,
        pathRewrite: {
          "^/api": "/",
        },
      },
      '/api': {
        //本地服务接口地址
        target: 'http://localhost:9528',
@@ -40,4 +56,4 @@
      }
    }
  }
};
};