田源
2023-12-04 fbf4f0990b1f3b4f06a198f47d6513494f690d2c
Source/UBCS-WEB/src/views/ruleBasic/usableCharacter.vue
@@ -116,8 +116,8 @@
      </div>
    </el-footer>
    <el-dialog :visible.sync="editVisble" append-to-body title="修改可用字符" width="40%">
        <el-input v-model="characterValue" size="small"></el-input>
        <span slot="footer" class="dialog-footer">
      <el-input v-model="characterValue" size="small"></el-input>
      <span slot="footer" class="dialog-footer">
        <el-button @click="editVisble = false">取 消</el-button>
        <el-button type="primary" @click="editSaveHandler">确 定</el-button>
  </span>
@@ -163,12 +163,12 @@
    this.getCodeRule();
  },
  methods: {
    editDialog(){
      if(this.editValueList.length > 1){
    editDialog() {
      if (this.editValueList.length > 1) {
        this.$message.warning('只能选择一条数据!');
        return;
      }
      if(this.editValueList.length === 0){
      if (this.editValueList.length === 0) {
        this.$message.warning('请选择一条数据!');
        return;
      }
@@ -186,9 +186,14 @@
      this.characterEditOldValue = row[column.property];
      if (this.editValueList.includes(row[column.property])) {
        this.$message.warning('请检查字符集是否有重复!')
      } else if (row[column.property] === undefined || row[column.property] === null) {
        this.$message.warning('请检查字符集是否有空值!');
      } else {
        this.editValueList.push(row[column.property]);
      }
      // else if (this.editValueList.some(value => value.trim() === '')) {
      //   this.$message.warning('请检查字符集是否有空值!');
      // }
    },
    async getCodeRule() {
      try {
@@ -235,14 +240,17 @@
        this.$message.warning('请填写要添加的值!');
        return; // 判断输入值
      }
      ;
      if (this.editValueList.length != 0) {
        this.$message.warning('请先取消已选择的值!');
        return; // 判断输入值
      }
      ;
      const targetObject = this.characterReleasedList.find(obj => obj.oid === this.select);
      if (!targetObject) {
        return; // 查找对应typeText
      }
      ;
      const codeRuleCharacterVO = {
        codeRuleId: this.select,
        chartType: "charset",