晚上上传组件导入提示、调整默认对话框边距、密码策略查询以及新增修改 密码长度、必填种类、锁定时间等正则校验 完善启动流程默认传参
已修改13个文件
已添加2个文件
837 ■■■■■ 文件已修改
Source/plt-web/plt-web-ui/src/App.vue 2 ●●● 补丁 | 查看 | 原始文档 | blame | 历史
Source/plt-web/plt-web-ui/src/api/system/password/api.js 13 ●●●●● 补丁 | 查看 | 原始文档 | blame | 历史
Source/plt-web/plt-web-ui/src/components/PLT-basic-component/upload-file.vue 18 ●●●● 补丁 | 查看 | 原始文档 | blame | 历史
Source/plt-web/plt-web-ui/src/components/actions/base/StartWorkflowAction.js 50 ●●●● 补丁 | 查看 | 原始文档 | blame | 历史
Source/plt-web/plt-web-ui/src/components/actions/base/downloadFileAction.js 1 ●●●● 补丁 | 查看 | 原始文档 | blame | 历史
Source/plt-web/plt-web-ui/src/components/actions/base/startWorkFlow.vue 12 ●●●●● 补丁 | 查看 | 原始文档 | blame | 历史
Source/plt-web/plt-web-ui/src/components/actions/base/uploadFile.vue 15 ●●●● 补丁 | 查看 | 原始文档 | blame | 历史
Source/plt-web/plt-web-ui/src/components/actions/base/uploadFileAction.js 2 ●●● 补丁 | 查看 | 原始文档 | blame | 历史
Source/plt-web/plt-web-ui/src/components/actions/handlers.js 2 ●●● 补丁 | 查看 | 原始文档 | blame | 历史
Source/plt-web/plt-web-ui/src/views/system/department/index.vue 21 ●●●● 补丁 | 查看 | 原始文档 | blame | 历史
Source/plt-web/plt-web-ui/src/views/system/department/option.js 1 ●●●● 补丁 | 查看 | 原始文档 | blame | 历史
Source/plt-web/plt-web-ui/src/views/system/password/index.vue 440 ●●●●● 补丁 | 查看 | 原始文档 | blame | 历史
Source/plt-web/plt-web-ui/src/views/system/password/option.js 249 ●●●●● 补丁 | 查看 | 原始文档 | blame | 历史
Source/plt-web/plt-web-ui/src/views/system/role/index.vue 4 ●●● 补丁 | 查看 | 原始文档 | blame | 历史
Source/plt-web/plt-web-ui/src/views/system/user/index.vue 7 ●●●●● 补丁 | 查看 | 原始文档 | blame | 历史
Source/plt-web/plt-web-ui/src/App.vue
@@ -39,7 +39,7 @@
  margin-top: 0 !important;
}
.avue-dialog .el-dialog__body{
  padding: 20px;
  padding: 20px 20px 30px 20px; // ä¸Šå³ä¸‹å·¦
  margin-bottom: 20px !important;
}
.avue--detail .el-col{
Source/plt-web/plt-web-ui/src/api/system/password/api.js
¶Ô±ÈÐÂÎļþ
@@ -0,0 +1,13 @@
import request from '@/router/axios';
// åˆ—表查询
export function refDataGrid(page,limit) {
  return request({
    url: "/api/passwordStrategyQueryController/refDataGrid",
    method: "get",
    params:{
      page,
      limit,
    }
  });
}
Source/plt-web/plt-web-ui/src/components/PLT-basic-component/upload-file.vue
@@ -10,11 +10,16 @@
    class="avue-dialog"
    style="margin-top: -20vh !important;"
  >
    <Divider left="30px" text="导入提示"></Divider>
    <ul>
    <Divider left="30px" text="导入提示">
    </Divider>
    <ul v-if="tipList.length === 0" style="color: #f33939">
      <li>
        è¯·ç‚¹å‡»æµè§ˆæ–‡ä»¶è¿›è¡Œä¸Šä¼ 
      </li>
    </ul>
    <ul style="color: #f33939" v-if="tipList.length >=1 ">
      <li v-for="(item, index) in tipList" :key="index">{{ index + 1 }}: {{ item }} ã€‚</li>
    </ul>
    <Divider left="30px" text="选择文件后会自动上传"></Divider>
    <el-upload
@@ -43,21 +48,30 @@
export default {
  name: "upload-file",
  props: {
    // æŽ§åˆ¶ä¸Šä¼ ç±»åž‹ æ ¼å¼ä¸º: ['xls', 'xlsx'],
    fileType: {
      type: Array,
      default: () => []
    },
    // å¯¹è¯æ¡†å¤´éƒ¨åç§°
    title: {
      type: String,
      default: '上传文件'
    },
    // å¿…ä¼  ä¸Šä¼ çš„地址
    fileUrl: {
      type: String,
      default: ''
    },
    // è¯·æ±‚地址 æºå¸¦å‚æ•°
    fileData: {
      type: Array,
      default: () => []
    },
    // å¯¼å…¥æç¤ºæ–‡å­—  tipList:["导入模板中标明红色字体的为必输项","部门列上下级关系必须按照反斜杠隔开(/)"]
    tipList:{
      type:Array,
      default:() => []
    }
  },
  data() {
Source/plt-web/plt-web-ui/src/components/actions/base/StartWorkflowAction.js
@@ -10,33 +10,35 @@
export const doAction = (options,callback) => {
  //multi æ˜¯å¦å¼€å¯å¤šé€‰
  //checknotprocess æ˜¯å¦å…è®¸å‘起流程
  //templateType æµç¨‹æ¨¡æ¿type å¿…å¡«
  //filterTemplate æµç¨‹è¿‡æ»¤æ¨¡æ¿ä¿¡æ¯
  options.sourceData = options.sourceData || {};
  options.dataStore = options.dataStore || [];
  // if (!options.dataStore || options.dataStore.length < 1) {
  //   Vue.prototype.$message.error("请选择需要发起流程的数据");
  //   return false;
  // }
  // if (!options.paramVOS.multi && options.dataStore.length > 1) {
  //   Vue.prototype.$message.error("仅能选择一条数据发起流程");
  //   return false;
  // }
  //
  // //验证不允许启动的条件
  // if(!validatenull(options.paramVOS.checknotprocess)) {
  //   let notprocess = options.paramVOS.checknotprocess.split('&');
  //   let checknotprocess=false;
  //   notprocess.forEach((item,i)=>{
  //     if (options.dataStore[0][item.split('=')[0]] == item.split('=')[1]) {
  //       checknotprocess=true;
  //       return false;
  //     }
  //   })
  //   if (checknotprocess) {
  //     Vue.prototype.$message.error(replaceFreeMarker(options.paramVOS.checknotprocessmsg,options.dataStore,{}) || "当前数据不允许发起流程");
  //     return false;
  //   }
  // }
  if (!options.dataStore || options.dataStore.length < 1) {
    Vue.prototype.$message.error("请选择需要发起流程的数据");
    return false;
  }
  if (!options.paramVOS.multi && options.dataStore.length > 1) {
    Vue.prototype.$message.error("仅能选择一条数据发起流程");
    return false;
  }
  //验证不允许启动的条件
  if(!validatenull(options.paramVOS.checknotprocess)) {
    let notprocess = options.paramVOS.checknotprocess.split('&');
    let checknotprocess=false;
    notprocess.forEach((item,i)=>{
      if (options.dataStore[0][item.split('=')[0]] == item.split('=')[1]) {
        checknotprocess=true;
        return false;
      }
    })
    if (checknotprocess) {
      Vue.prototype.$message.error(replaceFreeMarker(options.paramVOS.checknotprocessmsg,options.dataStore,{}) || "当前数据不允许发起流程");
      return false;
    }
  }
  callPreEvent(options, doBefore, function (options) {
    showStartWindow(options, function () {
Source/plt-web/plt-web-ui/src/components/actions/base/downloadFileAction.js
@@ -39,7 +39,6 @@
  let data = new FormData();
  data.append('fileOid',oids);
  download(data).then(res => {
    console.log(res);
    if (res) {
      func.downloadFileByBlobHandler(res);
      Vue.prototype.$message.success("下载成功");
Source/plt-web/plt-web-ui/src/components/actions/base/startWorkFlow.vue
@@ -162,16 +162,18 @@
  },
  created() {
    // this.modelNameChange();
    this.getWorkByType();
  },
  mounted() {
    this.getWorkByType();
  },
  methods: {
    // èŽ·å–æµç¨‹æ¨¡æ¿ä¿¡æ¯
    getWorkByType() {
      console.log('this.paramVOS',this.paramVOS)
      let params = {
        type: '文档审签流程',
        filterTemplate: "文档审签流程"
        type: this.paramVOS.templatetype,
        filterTemplate: this.paramVOS.filterTemplate || ""
      }
      getTemplateByType(params).then(res => {
        const data = res.data.data;
@@ -179,7 +181,7 @@
        this.processTemplateList = data;
        this.saveParam.processTemplate = data[0].value;
        this.saveParam.processName = this.paramVOS.processName || userInfo.content.userName + '-' + data[0].value; // å¯¹æµç¨‹æ¨¡æ¿ æµç¨‹åç§°èµ‹é»˜è®¤å€¼
        this.saveParam.processName = this.paramVOS.processname || userInfo.content.userName + '-' + data[0].value; // å¯¹æµç¨‹æ¨¡æ¿ æµç¨‹åç§°èµ‹é»˜è®¤å€¼
        this.getProcessNode(data[0].attributes.oid); // é¦–次进入调用第一个模板的所有节点
      }).catch(err => {
@@ -191,7 +193,7 @@
    getProcessNode(oid) {
      let params = {
        processOid: oid,
        maxSecret: -1
        maxSecret: this.paramVOS.maxSecret || -1
      }
      getAllProcessNode(params).then(res => {
        const nodes = res.data.data;
Source/plt-web/plt-web-ui/src/components/actions/base/uploadFile.vue
@@ -11,10 +11,11 @@
    style="margin-top: -20vh !important;"
  >
    <Divider left="30px" text="导入提示"></Divider>
    <ul>
      <li>
    <ul style="color: #e73a3a">
      <li v-if="!paramVOS.tipList">
        è¯·ç‚¹å‡»æµè§ˆæ–‡ä»¶è¿›è¡Œä¸Šä¼ 
      </li>
      <li v-if="paramVOS.tipList && paramVOS.tipList.length >=1 " v-for="(item,index) in paramVOS.tipList" :key="index"> {{index+1}} : {{item}}。</li>
    </ul>
    <Divider left="30px" text="选择文件后会自动上传"></Divider>
    <el-upload
@@ -87,9 +88,9 @@
      return {
        ownbizOid: this.sourceData.oid,
        ownBtmName: this.sourceData.btmname,
        secretGrade: -1,
        fileDocClassify: '',
        updateFileFlag: true,
        secretGrade: this.paramVOS.secretGrade || -1,
        fileDocClassify: this.paramVOS.fileDocClassify || "",
        updateFileFlag: this.paramVOS.updateFileFlag  || true,
      }
    },
    width() {
@@ -140,7 +141,7 @@
    onSuccess(resbonse) {
      if (resbonse.code === 200) {
        this.$message.success("上传成功!");
        this.dialogVisible = false;
        this.visible = false;
      }else {
        this.$message.error(resbonse.msg);
      }
@@ -155,7 +156,7 @@
      if (file.status === "success" || file.status === "error") {
        this.pageLoading.close();
      }
    }
    },
  }
}
</script>
Source/plt-web/plt-web-ui/src/components/actions/base/uploadFileAction.js
@@ -11,7 +11,7 @@
export const doAction = (options,callback) => {
  options.sourceData = options.sourceData || {};
  options.dataStore = options.dataStore || [];
  if (func.isEmptyObject(options.sourceData)) {
  if (!options.dataStore || options.dataStore.length < 1) {
    Vue.prototype.$message.error("请选择要上传的分类!");
    return false;
  }
Source/plt-web/plt-web-ui/src/components/actions/handlers.js
@@ -28,7 +28,7 @@
      module.doAction(options,callback);
    })},
    //启动流程
    launchworkflow: () => {import("@/components/actions/base/StartWorkflowAction").then(module => {
    startwork: () => {import("@/components/actions/base/StartWorkflowAction").then(module => {
      module.doAction(options,callback);
    })},
    //上传文件
Source/plt-web/plt-web-ui/src/views/system/department/index.vue
@@ -25,9 +25,10 @@
      </template>
      <template slot="menuLeft" slot-scope="scope">
        <el-button icon="el-icon-school" plain size="small" type="primary" @click="assignMembersHandler">分配成员</el-button>
        <el-button icon="el-icon-school" plain size="small" type="primary" @click="assignMembersHandler">分配成员
        </el-button>
        <el-button icon="el-icon-user" plain size="small" type="primary" @click="statisticsHandler">统计</el-button>
        <el-button icon="el-icon-upload2" plain size="small" type="primary" @click="statisticsHandler">导入部门</el-button>
        <el-button icon="el-icon-upload2" plain size="small" type="primary" @click="upLoadHandler">导入部门</el-button>
        <el-button icon="el-icon-download" plain size="small" type="primary" @click="downLoadHandler">下载导入模板</el-button>
      </template>
    </avue-crud>
@@ -62,6 +63,10 @@
              :transferTitle="transferTitle" title="部门添加成员"
              @transferSend="departTransferSend">
    </transfer>
    <!-- å¯¼å…¥éƒ¨é—¨   -->
    <upload-file ref="upload" :fileType="upFileType" :fileUrl="fileUrl" :tipList="tipList" title="导入部门"
                 @updata="getTableList"></upload-file>
  </basic-container>
</template>
@@ -131,12 +136,16 @@
            label: '角色',
            prop: 'pkPersonName',
            sortable: true,
            overHidden: true,
          },
        ]
      },
      leftTransferData: [],
      rightTransferData: [],
      transferTitle: ['待选人员', '已选人员'],
      tipList: ['导入模板中标明红色字体的为必输项', '导入结构为树结构时请保证ID列不能重复', '父ID请使用界面上部门的唯一标识ID或者Excel中手动输入的ID', '父ID列为空时,导入的部门即为顶层部门'],
      upFileType: ['xls', 'xlsx'],
      fileUrl: 'api/departmentQueryController/importDept',
    }
  },
  methods: {
@@ -273,7 +282,6 @@
      }
      countSmUserByDeptOid({pkDepartment: this.departCurrenRow.ALLDept === 'ALLDept' ? null : this.departCurrenRow.oid}).then(res => {
        console.log(res);
        if (res.data.code === 200) {
          const data = res.data.data;
          this.countData = data.map(item => {
@@ -339,13 +347,18 @@
    },
    // ä¸‹è½½å¯¼å…¥æ¨¡æ¿
    downLoadHandler(){
    downLoadHandler() {
      download().then(res => {
        func.downloadFileByBlobHandler(res);
        this.$message.success('下载成功')
      }).catch(err => {
        this.$message.error(err);
      })
    },
    // å¯¼å…¥éƒ¨é—¨
    upLoadHandler() {
      this.$refs.upload.visible = true;
    }
  }
}
Source/plt-web/plt-web-ui/src/views/system/department/option.js
@@ -2,6 +2,7 @@
  {
    label: '名称',
    prop: 'name',
    align:'left',
    rules: [
      {
        required: true,
Source/plt-web/plt-web-ui/src/views/system/password/index.vue
@@ -1,13 +1,449 @@
<template>
  <basic-container>
    <avue-crud
      ref="passWordCrud"
      :data="tableData"
      :option="option"
      :page.sync="page"
      :table-loading="tableLoading"
      v-model="form"
      @on-load="getTableList"
      @refresh-change="handleRefresh"
      @size-change="sizeChange"
      @current-change="currentChange"
      @row-save="rowSaveHandler"
      @row-update="rowUpdateHandler"
      @row-del="rowDeleteHandler"
    >
      <template slot="menu" slot-scope="{ row, index }">
        <el-button
          icon="el-icon-edit"
          size="small"
          type="text"
          @click="handleEdit(row, index)"
        >
          ç¼–辑
        </el-button>
        <el-button
          icon="el-icon-delete"
          size="small"
          type="text"
          @click="handleDel(row, index)"
        >
          åˆ é™¤
        </el-button>
      </template>
      <template slot="name" slot-scope="{row}">
        <el-tag>{{row.name}}</el-tag>
      </template>
      <template slot="defaultFlag" slot-scope="{row}">
        <el-tag v-if="row.defaultFlag" type="success">是</el-tag>
        <el-tag v-if="!row.defaultFlag" type="danger">否</el-tag>
      </template>
    </avue-crud>
  </basic-container>
</template>
<script>
import {refDataGrid} from "@/api/system/password/api"
import basicOption from "@/util/basic-option";
import {column} from "@/views/system/password/option";
import Vue from "vue";
export default {
  name: "index"
  name: "index",
  data(){
    return{
      form:{},
      tableData:[],
      option:{
        ...basicOption,
        selection:false,
        calcHeight:-60,
        menuWidth:150,
        column:[
          {
            label: '策略名称',
            prop: 'name',
            sortable: true,
            span: 24,
            labelWidth: "11%",
            rules: [{
              required: true,
              message: "请输入策略名称",
              trigger: "blur"
            }]
          },
          {
            label: '密码最小长度',
            prop: 'minLength',
            sortable: true,
            span: 12,
            labelWidth: "22%",
            rules: [{
              required: true,
              validator: (rule, value, callback) => {
                this.minValue = value * 1
                if (value == "") {
                  callback(new Error('请输入密码最小长度'));
                } else if (/[^\d]/g.test(value)) {
                  callback(new Error('密码最小长度的输入类型只能为数字类型'));
                } else if ( this.minValue >=  this.maxValue &&  this.maxValue != 0) {
                  callback(new Error('密码最小长度不能大于密码最大长度'))
                } else {
                  callback();
                }
              },
              trigger: 'blur'
            }]
          },
          {
            label: '密码最大长度',
            prop: 'maxLength',
            sortable: true,
            span: 12,
            labelWidth: "28%",
            rules: [{
              required: true,
              validator: (rule, value, callback) => {
                this.maxValue = value * 1
                if (value == "") {
                  callback(new Error('请输入密码最大长度'));
                } else if ( this.maxValue <=  this.minValue) {
                  callback(new Error('密码最大长度不能小于密码最大长度'));
                } else if (/[^\d]/g.test(value)) {
                  callback(new Error('密码最大长度的输入类型只能为数字类型'));
                } else {
                  callback();
                }
              },
              trigger: 'change'
            }]
          },
          {
            label: '组合方式',
            prop: 'requireCharTypeText',
            sortable: true,
            display: false,
            overHidden: true,
            labelWidth: "22%",
          },
          {
            label: '组合方式',
            prop: 'requireCharType',
            type: "checkbox",
            hide: true,
            span: 12,
            labelWidth: "22%",
            change: this.handleCheckboxChange,
            rules: [{
              required: true,
              message: "请选择组合方法",
              trigger: "blur"
            }],
            dicData: [
              {
                label: '数字',
                value: "number"
              },
              {
                label: '小写字母',
                value: "lower"
              },
              {
                label: '大写字母',
                value: "upper"
              },
              {
                label: '符号',
                value: "symbol"
              },
            ]
          },
          {
            label: '必填种类',
            prop: 'requireCharCount',
            type: 'select',
            span: 12,
            labelWidth: "28%",
            sortable: true,
            change: this.handleSelectChange,
            dicData: [{
              label: '1种',
              value: 1,
              disabled: false
            },
              {
                label: '2种',
                value: 2,
                disabled: false
              },
              {
                label: '3种',
                value: 3,
                disabled: false
              },
              {
                label: '4种',
                value: 4,
                disabled: false
              }
            ]
          },
          {
            label: '过期时间(天)',
            prop: 'validDay',
            sortable: true,
            span: 12,
            labelWidth: "22%",
            rules: [{
              required: true,
              validator: (rule, value, callback) => {
                if (value == "") {
                  callback(new Error('请输入过期时间'));
                } else if (/[^\d]/g.test(value)) {
                  callback(new Error('过期时间的输入类型只能为数字类型'));
                } else {
                  callback();
                }
              },
              trigger: 'blur'
            }]
          },
          {
            label: '提醒时间(天)',
            prop: 'remindDay',
            sortable: true,
            span: 12,
            labelWidth: "28%",
            width: 140,
            rules: [{
              required: true,
              validator: (rule, value, callback) => {
                if (value == "") {
                  callback(new Error('请输入过期时间'));
                } else if (/[^\d]/g.test(value)) {
                  callback(new Error('过期时间的输入类型只能为数字类型'));
                } else {
                  callback();
                }
              },
              trigger: 'blur'
            }]
          },
          {
            label: '重试次数',
            prop: 'retryTime',
            sortable: true,
            span: 12,
            labelWidth: "22%",
            rules: [{
              required: true,
              validator: (rule, value, callback) => {
                if (value == "") {
                  callback(new Error('重试次数'));
                } else if (/[^\d]/g.test(value)) {
                  callback(new Error('重试次数的输入类型只能为数字类型'));
                } else {
                  callback();
                }
              },
              trigger: 'blur'
            }]
          },
          {
            label: '锁定时间(分钟)',
            prop: 'lockTime',
            sortable: true,
            width: 150,
            span: 12,
            labelWidth: "28%",
            rules: [{
              required: true,
              validator: (rule, value, callback) => {
                if (value == "") {
                  callback(new Error('请输入锁定时间'));
                } else if (/[^\d]/g.test(value)) {
                  callback(new Error('锁定时间的输入类型只能为数字类型'));
                } else {
                  callback();
                }
              },
              trigger: 'blur'
            }]
          },
          {
            label: '描述',
            prop: 'description',
            overHidden: true,
            type: 'textarea',
            span: 12,
            labelWidth: "22%",
            rows: 5,
          },
          {
            label: '是否为默认策略',
            prop: 'defaultFlag',
            type: 'switch',
            labelWidth: "30%",
            dicData: [{
              label: '否',
              value: 0
            }, {
              label: '是',
              value: 1
            }]
          },
        ]
      },
      page: {
        currentPage: 1,
        pageSize: 10,
        total: 0,
        pageSizes: [10, 30, 50, 100],
      },
      tableLoading:false,
      checkboxlength: "", //添加存放多选的变量,用于下拉菜单的禁用效果和必填种类是否大于组合方式然后提示用户重新选择
      selectlength: 0,    //这个是下拉菜单的数据变量
      checkboxlist: "" ,  //这个是用于防止change时间冒泡,出现两次弹窗定义的变量
      checkboxNumber: "", //用于首次点击编辑,判断组合方式是否小于必填种类的变量
      selectNumber: "",   //这个也是存放多选的变量,效果一样,只是用作在编辑模块
      checkboxedit: "",   // ç”¨äºŽåˆ¤æ–­æ˜¯å¦æ˜¯ç¼–辑
      editFlag: false,
      minValue:"", // æœ€å°é•¿åº¦value
      maxValue:""  // æœ€å¤§é•¿åº¦value
    }
  },
  methods:{
    // è¡¨æ ¼åˆå§‹åŒ–请求
    getTableList() {
      this.tableLoading = true;
      refDataGrid(this.page.currentPage, this.page.pageSize).then(res =>{
        console.log(res);
        this.tableData = res.data.data;
        this.page.total = res.data.total;
        this.tableLoading = false;
      })
    },
    // è¡¨æ ¼å¤´éƒ¨åˆ·æ–°
    handleRefresh(){
      this.getTableList();
    },
    //  æ¡æ•°
    sizeChange(val){
      this.page.pageSize = val;
    },
    // é¡µç 
    currentChange(val){
      this.page.currentPage = val;
    },
    // æ·»åŠ 
    rowSaveHandler(){
      console.log(this.form.requireCharCount);
    },
    // ç¼–辑按钮
    handleEdit(row,index){
      this.$refs.passWordCrud.rowEdit(row, index);
      this.editFlag = true;
      this.checkboxNumber = row.requireCharType.split(",");
      this.selectNumber = row.requireCharCount;
    },
    // ä¿®æ”¹
    rowUpdateHandler(){
    },
    // åˆ é™¤æŒ‰é’®
    handleDel(){
    },
    // åˆ é™¤
    rowDeleteHandler(){
    },
    // å¿…填种类changge事件
    handleSelectChange(val){
      this.selectlength = val.value;
    },
    // æ·»åŠ ä¿®æ”¹ ç»„合方式判断逻辑
    handleCheckboxChange(val) {
      const arr = this.option.column.find(item => item.prop === 'requireCharCount'); // æ‰¾åˆ°option里面必填种类的数组
      this.checkboxlength = val.value;
      this.checkboxedit = this.checkboxlength.toString().split(",");
      if (val.value !== undefined && val.value !== null) {
        if (this.checkboxlist === val.value) {
          return;
        } else {
          this.checkboxlist = val.value;
          if (this.selectlength > val.value.length && val.value.length > 0) {
            // åˆ¤æ–­å¦‚果必填种类大于组合方式清空
            this.form.requireCharCount = "";
          } else if (this.selectlength > this.checkboxedit.length && this.checkboxedit.length > 0) {
            // ä¿®æ”¹åŒæ ·é€»è¾‘
            this.form.requireCharCount = "";
          }
        }
      }
      // å¤„理 å¿…填种类选项禁用
      if (val.value !== undefined && val.value !== null) {
        if (val.value.length === 1) {
          this.setDisabled(arr, [0]);
        } else if (val.value.length === 2) {
          this.setDisabled(arr, [0, 1]);
        } else if (val.value.length === 3) {
          this.setDisabled(arr, [0, 1, 2]);
        } else if (val.value.length === 4) {
          this.setDisabled(arr, [0, 1, 2, 3]);
        } else if (val.value.length === 0) {
          this.setDisabled(arr, [-1]);
        }
      } else if (this.checkboxNumber.length !== 0) {
        this.setDisabled(arr, [0, 1, 2, 3]);
      }
      // ä¿®æ”¹åŒç†
      if (this.editFlag) {
        if (this.checkboxedit.length === 1) {
          this.setDisabled(arr, [0]);
        } else if (this.checkboxedit.length === 2) {
          this.setDisabled(arr, [0, 1]);
        } else if (this.checkboxedit.length === 3) {
          this.setDisabled(arr, [0, 1, 2]);
        } else if (this.checkboxedit.length === 4) {
          this.setDisabled(arr, [0, 1, 2, 3]);
        } else if (this.checkboxedit.length === 0) {
          this.setDisabled(arr, [-1]);
        }
      }
    },
    // å¾ªçŽ¯æ‰¾åˆ°å¯¹åº”å¿…å¡«ç§ç±»ç¦ç”¨é€‰é¡¹
    setDisabled(arr, indices) {
      arr.dicData.forEach((item, index) => {
        item.disabled = !indices.includes(index);
      });
    },
  }
}
</script>
<style scoped>
<style scoped lang="scss">
.avue-form__group--flex{
  padding-bottom: 25px !important;
}
</style>
Source/plt-web/plt-web-ui/src/views/system/password/option.js
¶Ô±ÈÐÂÎļþ
@@ -0,0 +1,249 @@
import Vue from "vue";
// æš‚时不用外部js文件写在vue内部文件  å› ä¸ºæ˜¯ä¸¤ä¸ªchange事件联动,new一个vue实例或者构造器实例会导致其它方法声明的变量也会重新恢复默认值
let minValue = ""; // æœ€å°é•¿åº¦value
let maxValue = ""; // æœ€å¤§é•¿åº¦value
import passwordVue from '@/views/system/password/index'
const app = new Vue(passwordVue);
export const column = [
  {
    label: '策略名称',
    prop: 'name',
    sortable: true,
    span: 24,
    labelWidth: "11%",
    rules: [{
      required: true,
      message: "请输入策略名称",
      trigger: "blur"
    }]
  },
  {
    label: '密码最小长度',
    prop: 'minLength',
    sortable: true,
    span: 12,
    labelWidth: "22%",
    rules: [{
      required: true,
      validator: (rule, value, callback) => {
        minValue = value * 1
        if (value == "") {
          callback(new Error('请输入密码最小长度'));
        } else if (/[^\d]/g.test(value)) {
          callback(new Error('密码最小长度的输入类型只能为数字类型'));
        } else if (minValue >= maxValue && maxValue != 0) {
          callback(new Error('密码最小长度不能大于密码最大长度'))
        } else {
          callback();
        }
      },
      trigger: 'blur'
    }]
  },
  {
    label: '密码最大长度',
    prop: 'maxLength',
    sortable: true,
    span: 12,
    labelWidth: "28%",
    rules: [{
      required: true,
      validator: (rule, value, callback) => {
        maxValue = value * 1
        if (value == "") {
          callback(new Error('请输入密码最大长度'));
        } else if (maxValue <= minValue) {
          callback(new Error('密码最大长度不能小于密码最大长度'));
        } else if (/[^\d]/g.test(value)) {
          callback(new Error('密码最大长度的输入类型只能为数字类型'));
        } else {
          callback();
        }
      },
      trigger: 'change'
    }]
  },
  {
    label: '组合方式',
    prop: 'requireCharTypeText',
    sortable: true,
    display: false,
    overHidden: true,
    labelWidth: "22%",
  },
  {
    label: '组合方式',
    prop: 'requireCharType',
    type: "checkbox",
    hide: true,
    span: 12,
    labelWidth: "22%",
    change: function (val){
      const dialogConstructor = Vue.extend(passwordVue);
      let instance = new dialogConstructor();
      instance.handleCheckboxChange(val);
    },
    rules: [{
      required: true,
      message: "请选择组合方法",
      trigger: "blur"
    }],
    dicData: [
      {
        label: '数字',
        value: "number"
      },
      {
        label: '小写字母',
        value: "lower"
      },
      {
        label: '大写字母',
        value: "upper"
      },
      {
        label: '符号',
        value: "symbol"
      },
    ]
  },
  {
    label: '必填种类',
    prop: 'requireCharCount',
    type: 'select',
    span: 12,
    labelWidth: "28%",
    sortable: true,
    change: function (val){
      const dialogConstructor = Vue.extend(passwordVue);
      let instance = new dialogConstructor();
      instance.handleSelectChange(val);
    },
    dicData: [{
      label: '1种',
      value: 1,
      disabled: false
    },
      {
        label: '2种',
        value: 2,
        disabled: false
      },
      {
        label: '3种',
        value: 3,
        disabled: false
      },
      {
        label: '4种',
        value: 4,
        disabled: false
      }
    ]
  },
  {
    label: '过期时间(天)',
    prop: 'validDay',
    sortable: true,
    span: 12,
    labelWidth: "22%",
    rules: [{
      required: true,
      validator: (rule, value, callback) => {
        if (value == "") {
          callback(new Error('请输入过期时间'));
        } else if (/[^\d]/g.test(value)) {
          callback(new Error('过期时间的输入类型只能为数字类型'));
        } else {
          callback();
        }
      },
      trigger: 'blur'
    }]
  },
  {
    label: '提醒时间(天)',
    prop: 'remindDay',
    sortable: true,
    span: 12,
    labelWidth: "28%",
    width: 140,
    rules: [{
      required: true,
      validator: (rule, value, callback) => {
        if (value == "") {
          callback(new Error('请输入过期时间'));
        } else if (/[^\d]/g.test(value)) {
          callback(new Error('过期时间的输入类型只能为数字类型'));
        } else {
          callback();
        }
      },
      trigger: 'blur'
    }]
  },
  {
    label: '重试次数',
    prop: 'retryTime',
    sortable: true,
    span: 12,
    labelWidth: "22%",
    rules: [{
      required: true,
      validator: (rule, value, callback) => {
        if (value == "") {
          callback(new Error('重试次数'));
        } else if (/[^\d]/g.test(value)) {
          callback(new Error('重试次数的输入类型只能为数字类型'));
        } else {
          callback();
        }
      },
      trigger: 'blur'
    }]
  },
  {
    label: '锁定时间(分钟)',
    prop: 'lockTime',
    sortable: true,
    width: 150,
    span: 12,
    labelWidth: "28%",
    rules: [{
      required: true,
      validator: (rule, value, callback) => {
        if (value == "") {
          callback(new Error('请输入锁定时间'));
        } else if (/[^\d]/g.test(value)) {
          callback(new Error('锁定时间的输入类型只能为数字类型'));
        } else {
          callback();
        }
      },
      trigger: 'blur'
    }]
  },
  {
    label: '描述',
    prop: 'description',
    overHidden: true,
    type: 'textarea',
    span: 12,
    labelWidth: "22%",
    rows: 5,
  },
  {
    label: '是否为默认策略',
    prop: 'defaultFlag',
    type: 'switch',
    labelWidth: "30%",
    dicData: [{
      label: '否',
      value: 0
    }, {
      label: '是',
      value: 1
    }]
  },
]
Source/plt-web/plt-web-ui/src/views/system/role/index.vue
@@ -61,7 +61,7 @@
    </el-dialog>
    <!-- å¯¼å…¥è§’色  -->
    <upload-file ref="upload" :fileType="upFileType" :fileUrl="fileUrl" @updata="getTableList" title="导入角色"></upload-file>
    <upload-file ref="upload" :tipList="tipList" :fileType="upFileType" :fileUrl="fileUrl" @updata="getTableList" title="导入角色"></upload-file>
  </basic-container>
</template>
@@ -132,11 +132,13 @@
            label: '角色',
            prop: 'pkPersonName',
            sortable: true,
            overHidden: true,
          },
        ]
      },
      upFileType: ['xls', 'xlsx'],
      fileUrl: 'api/roleQueryController/importRole',
      tipList:["角色导入只有 åç§° å’Œ æè¿° ä¸¤åˆ—,且名称为必输项不能为空"]
    }
  },
  methods: {
Source/plt-web/plt-web-ui/src/views/system/user/index.vue
@@ -100,7 +100,7 @@
    </el-dialog>
    <!-- å¯¼å…¥äººå‘˜   -->
    <upload-file ref="upload" :fileType="upFileType" :fileUrl="fileUrl" title="导入人员" @updata="getTableList"></upload-file>
    <upload-file ref="upload" :tipList="tipList" :fileType="upFileType" :fileUrl="fileUrl" title="导入人员" @updata="getTableList"></upload-file>
    <!-- åˆ†é…éƒ¨é—¨å¯¹è¯æ¡†    -->
    <el-dialog
@@ -213,7 +213,8 @@
      selectList: [],
      leftRoleData: [],  // åˆ†é…è§’色穿梭框左侧初始数据
      rightRoleData: [], // åˆ†é…è§’色穿梭框右侧初始数据
      transferTitle: ['现有角色', '拥有角色']
      transferTitle: ['现有角色', '拥有角色'],
      tipList:["导入模板中标明红色字体的为必输项","部门列上下级关系必须按照反斜杠隔开(/)"]
    }
  },
  created() {
@@ -397,7 +398,7 @@
        if (res.data.code === 200) {
          this.$message.success(res.data.obj);
          this.getTableList();
          done()
          done();
        }
      }).catch(err => {
        loading()