Administrator
2021-09-03 ee2dd46769eb0949441b151aa57dd18ec148c015
Merge branch 'master' of http://192.168.0.105:10010/r/zhba_enterprises
5 files modified
150 ■■■■■ changed files
src/page/login/codelogin.vue 65 ●●●● patch | view | raw | blame | history
src/views/securityUnitChild/businessLicense.vue 27 ●●●●● patch | view | raw | blame | history
src/views/securityUnitChild/licence.vue 27 ●●●●● patch | view | raw | blame | history
src/views/securityUnitChild/social.vue 10 ●●●●● patch | view | raw | blame | history
src/views/zc/zc.vue 21 ●●●●● patch | view | raw | blame | history
src/page/login/codelogin.vue
@@ -51,7 +51,7 @@
        <i slot="prefix" class="icon-shouji"/>
      </el-input>
    </el-form-item>
    <avue-input-tree style="width:580px !important" :defaultExpandAll="loginForm.defaultFlag" v-model="loginForm.deptid" placeholder="请选择部门"
    <avue-input-tree style="width:580px !important" :defaultExpandAll="false" v-model="loginForm.deptid" placeholder="请选择部门"
                     type="tree"
                     :dic="dic"></avue-input-tree>
    <el-form-item class="z-login-submit-prv">
@@ -110,7 +110,6 @@
      dicr: [],
      msgKey: false,
      loginForm: {
        defaultFlag: false,
        cardid: "",
        username: "",
        sname: "",
@@ -136,13 +135,12 @@
  created() {
    this.msgText = this.config.MSGINIT;
    this.msgTime = this.config.MSGTIME;
    defaultFlag
  },
  mounted() {
    var that = this;
    ss().then(res => {
      console.log(that.ergodicData(res.data.data), 898989)
      that.dic = that.ergodicData(res.data.data)
      console.log(that.processingData(res.data.data), 898989)
      that.dic = that.processingData(res.data.data)
    });
  },
  computed: {
@@ -157,65 +155,26 @@
  },
  props: [],
  methods: {
    ergodicData(val) {
      var arr = []
      val.forEach((item, index) => {
    processingData(val) {
        arr.push({label: item.title, value: item.value, id: item.id, parent_id: item.parent_id})
        for (var i = 0; i < val.length; i++) {
          val[i].label = val[i].title
        if (item.hasChildren == true) {
          if (val[i].hasChildren == true) {
          var arrOne = []
            if (val[i].children && val[i].children.length > 0) {
          if (item.children && item.children.length > 0) {
              this.processingData(val[i].children)
            item.children.forEach((childItem, childIndex) => {
              arrOne.push({
                label: childItem.title,
                value: childItem.value,
                id: childItem.id,
                parent_id: childItem.parent_id
              })
              if (childItem.hasChildren == true) {
                var arrTwo = []
                if (childItem.children && childItem.children.length > 0) {
                  childItem.children.forEach((findItem, findIndex) => {
                    arrTwo.push({
                      label: findItem.title,
                      value: findItem.value,
                      id: findItem.id,
                      parent_id: findItem.parent_id
                    })
                  })
                }
                arrOne[childIndex].children = arrTwo
              }
            })
            }
          }
          arr[index].children = arrOne
        }
      })
      return arr;
        return val
    },
    clearValidate(formName) {
@@ -237,7 +196,6 @@
        this.loginForm.password = ""
        this.loginForm.password2 = ""
        this.loginForm.deptid = ""
        this.loginForm.defaultFlag = false
        this.$notify({
          title: '注册成功,待审核',
          type: 'warning'
@@ -255,7 +213,6 @@
      this.loginForm.password = ""
      this.loginForm.password2 = ""
      this.loginForm.deptid = ""
      this.loginForm.defaultFlag = false
      var zs = document.querySelector('.z');
      zs.style.display = 'none';
      this.clearValidate('loginForm')
src/views/securityUnitChild/businessLicense.vue
@@ -2,7 +2,12 @@
  <div class="businessLicense">
    <el-container>
      <el-main>
        <avue-form :option="option" v-model="form" :upload-after="uploadAfter">
        <avue-form
          :option="option"
          v-model="form"
          :upload-after="uploadAfter"
          :upload-delete="uploadDelete"
        >
        </avue-form
      ></el-main>
    </el-container>
@@ -57,6 +62,24 @@
        this.form.imgUrl = this.row.businessLicense;
      }
    },
    uploadDelete(column, file) {
      this.row.businessLicense = "";
      return update(this.row)
        .then(() => {
          this.$message({
            type: "success",
            message: "删除成功!",
          });
          // done();
        })
        .catch((error) => {
          this.$message({
            type: "warning",
            message: "删除照片失败,再重试!",
          });
          // done();
        });
    },
    uploadAfter(res, done, loading, column) {
      // this.row.businessLicense = "";
      this.row.businessLicense = res.url;
@@ -64,7 +87,7 @@
        () => {
          this.$message({
            type: "success",
            message: "操作成功!",
            message: "添加成功!",
          });
          done();
        },
src/views/securityUnitChild/licence.vue
@@ -2,7 +2,12 @@
  <div class="License">
    <el-container>
      <el-main>
        <avue-form :option="option" v-model="form" :upload-after="uploadAfter">
        <avue-form
          :option="option"
          v-model="form"
          :upload-after="uploadAfter"
          :upload-delete="uploadDelete"
        >
        </avue-form
      ></el-main>
    </el-container>
@@ -57,13 +62,31 @@
        this.form.imgUrl = this.row.licence;
      }
    },
    uploadDelete(column, file) {
      this.row.licence = "";
      return update(this.row)
        .then(() => {
          this.$message({
            type: "success",
            message: "删除成功!",
          });
          // done();
        })
        .catch((error) => {
          this.$message({
            type: "warning",
            message: "删除照片失败,再重试!",
          });
          // done();
        });
    },
    uploadAfter(res, done, loading, column) {
      this.row.licence = res.url;
      update(this.row).then(
        () => {
          this.$message({
            type: "success",
            message: "操作成功!",
            message: "添加成功!",
          });
          done();
        },
src/views/securityUnitChild/social.vue
@@ -76,9 +76,12 @@
  props: ["deptid"],
  data() {
    var deptid = this.deptid;
    if (this.deptid == undefined) {
      // deptid = this.userInfo
      // console.log(this.$store.getters.userInfo.dept_id);
      deptid = this.$store.getters.userInfo.dept_id;
    }
    return {
      do: 0,
      form: { cardid: "" },
      query: {},
@@ -398,8 +401,7 @@
  },
  methods: {
    changes(val) {
      this.do++;
      if (this.do >= 2) {
      if (val.value != "") {
        getuseList(val.value).then((res) => {
          // console.log(res);
          var d = res.data.data;
src/views/zc/zc.vue
@@ -79,6 +79,7 @@
              label: "账号",
              searchSpan:4,
              display: false,
              search: true,
              disabled:true,
              prop: "username",
            },
@@ -92,6 +93,7 @@
            {
              label: "姓名",
              display: false,
              search: true,
              searchSpan:4,
              disabled:true,
              prop: "sname",
@@ -105,7 +107,17 @@
            {
              label: "部门",
              editDisplay: false,
              prop: "deptid",
              prop: "deptName",
            },
            {
              label: "角色",
              prop: "parentId",
              hide: true,
              dicData: [],
              type: "tree",
              props: {
                label: "title"
              },
            },
            {
              label: "审核状态",
@@ -154,7 +166,14 @@
      }
    },
    methods: {
      initData(){
        getRoleTree().then(res => {
          const column = this.findObject(this.option.column, "parentId");
          column.dicData = res.data.data;
        });
      },
      handleEdit (row, index) {
        this.initData();
        this.$refs.crud.rowEdit(row, index);
      },
      rowSave(row, done, loading) {