ludc
2023-09-11 755afa3eebbc56a2436d5d494fc12e3758663755
组件漏传
已添加4个文件
518 ■■■■■ 文件已修改
Source/UBCS-WEB/src/components/code-dialog-page/cloneOtherBasicSecDialog.vue 247 ●●●●● 补丁 | 查看 | 原始文档 | blame | 历史
Source/UBCS-WEB/src/components/code-dialog-page/cloneRuleDialog.vue 222 ●●●●● 补丁 | 查看 | 原始文档 | blame | 历史
Source/UBCS/ubcs-service/ubcs-code/src/main/java/com/vci/ubcs/code/service/IPasswordFreeLoginService.java 18 ●●●●● 补丁 | 查看 | 原始文档 | blame | 历史
Source/UBCS/ubcs-service/ubcs-code/src/main/java/com/vci/ubcs/code/service/impl/PasswordFreeLoginServiceImpl.java 31 ●●●●● 补丁 | 查看 | 原始文档 | blame | 历史
Source/UBCS-WEB/src/components/code-dialog-page/cloneOtherBasicSecDialog.vue
¶Ô±ÈÐÂÎļþ
@@ -0,0 +1,247 @@
<template>
  <el-dialog
    :visible.sync="cloneOtherCodeRuleSettingBox"
    append-to-body
    class="avue-dialog avue-dialog--top"
    style="height: 100vh"
    @close="closeCloneOtherBasicSecDialog"
    title="克隆编码规则的基础信息"
    top="-3%"
    width="800px">
    <div>
      <el-row>
        <p
          style="margin-top: -20px;
            margin-bottom: 4px;
            font-weight: 570;
            font-size: 19px;
            color: #0e2d5f;">
          ç¼–码规则
        </p>
        <avue-crud
          ref="crudCloneCodeRuleOther"
          :data="codeRuleData"
          :option="cloneCodeRuleOption"
          :page.sync="codeRulePage"
          :table-loading="codeRuleloading"
          class="other-clone-coderule-crud"
          @row-click="codeOtherCloneRuleRowClick"
          @selection-change="selectionOtherCloneCodeRuleChange"
          @search-change="searchOtherCloneChange"
          @search-reset="searchOtherCloneReset"
          @on-load="onLoad">
          <template #radio="{row}">
            <el-radio v-model="selectOtherCodeRuleRowIndex"
                :label="row.$index">&nbsp;</el-radio>
          </template>
        </avue-crud>
      </el-row>
      <el-row style="margin-top: 10px; border-top: 1px solid #ebeef5">
        <p
          style="
            margin-top: 10px;
            margin-bottom: 4px;
            font-weight: 570;
            font-size: 19px;
            color: #0e2d5f;
          "
        >
          ç æ®µä¿¡æ¯
        </p>
        <avue-crud
          ref="crudCloneCodeBasicOther"
          :data="cloneBasicData"
          :option="cloneBasicOption"
          :table-loading="codeBasicloading"
          class="other-clone-codebasic-crud"
          @row-click="codeOtherCloneBasicRowClick"
          @selection-change="selectionOtherCloneCodeBasicChange">
        </avue-crud>
      </el-row>
    </div>
    <div slot="footer" class="dialog-footer" style="height: 50px">
      <el-button type="primary" @click="saveOtherCodeBasic" :loading="cloneSaveLoding">保 å­˜</el-button>
      <el-button @click="cloneOtherCodeRuleSettingBox = false">取 æ¶ˆ</el-button>
    </div>
  </el-dialog>
</template>
<script>
import cloneBasicOption from "@/const/code/cloneBasicDialogOption";
import cloneCodeRuleOption from "@/const/code/cloneCodeRuleDialogOption";
import {gridCodeRule} from "@/api/code/mdmrule";
import {gridCodeBasicSec,cloneCodeBasic} from "@/api/code/codebasic";
export default {
    name: "cloneRuleDialog",
    props: {
        // å¯¹è¯æ¡†æ˜¾ç¤ºéšè—æŽ§åˆ¶
        visible: {
            type: "Boolean",
            default: false,
        },
        // è¢«å…‹éš†çš„规则oid
        quiltCloneCodeRule:{
            type: "Object",
        }
    },
    data() {
        return {
            cloneOtherCodeRuleSettingBox: this.visible,
            /*克隆编码规则对话框控制变量*/
            cloneBasicOption: cloneBasicOption,
            cloneCodeRuleOption: cloneCodeRuleOption,
            selectionOtherCloneCodeBasicList: [], // æ­¤ç•Œé¢å†…当前选中的基础码段
            selectionOtherCloneCodeRuleList: {}, // æ­¤ç•Œé¢å†…当前选中的编码规则
            selectOtherCodeRuleRowIndex: '',
            cloneOtherQuery: {}, // æŸ¥è¯¢æ¡ä»¶å¯¹è±¡
            codeRulePage: {
                pageSize: 10,
                currentPage: 1,
                total: 0,
            },
            codeRuleloading: false,
            codeRuleData: [],
            codeBasicloading: false,
            cloneBasicData: [],
            cloneSaveLoding: false,
        };
    },
    watch: {
        // ç›‘听父组件传的窗口显示隐藏的值,以及值的回填
        visible() {
            //console.log(this.visible);
            if(this.visible){
                //console.log(this.quiltCloneCodeRule);
                let conditionMap = {};
                conditionMap["conditionMap[oid_notequal]"] = this.quiltCloneCodeRule.oid.trim();
                this.cloneOtherQuery = conditionMap;
                this.onLoad(this.codeRulePage);
            }else{
                this.codeRuleData = [];
                this.cloneBasicData = [];
            }
            this.cloneOtherCodeRuleSettingBox = this.visible;
        },
        selectionOtherCloneCodeRuleList(){
            this.loadBasic(this.selectionOtherCloneCodeRuleList);
        },
    },
    methods: {
        //关闭窗口时触发
        closeCloneOtherBasicSecDialog(){
            this.$emit('update:visible',false);
        },
        /** ä»Žå…¶ä»–编码规则中克隆码段对话框-单击编码规则实现行选择*/
        codeOtherCloneRuleRowClick(row) {
            this.selectOtherCodeRuleRowIndex = row.$index
            this.selectionOtherCloneCodeRuleList = row;
            this.loadBasic(row);
        },
        /** ä»Žå…¶ä»–编码规则中克隆码段对话框-单击基础码段实现行选择*/
        codeOtherCloneBasicRowClick(row) {
            this.$refs.crudCloneCodeBasicOther.toggleSelection();
            this.selectionOtherCloneCodeBasicList = row;
            this.$refs.crudCloneCodeBasicOther.setCurrentRow(row);
            this.$refs.crudCloneCodeBasicOther.toggleRowSelection(row); //选中当前行
        },
        selectionOtherCloneCodeBasicChange(list) {
            this.selectionOtherCloneCodeBasicList = list;
            this.$refs.crudCloneCodeBasicOther.setCurrentRow(
                this.selectionOtherCloneCodeBasicList.slice(-1)[0]
            );
        },
        /** ä»Žå…¶ä»–规则克隆码段界面重置搜索功能 */
        searchOtherCloneReset() {
            let conditionMap = {};
            conditionMap["conditionMap[oid_notequal]"] = this.quiltCloneCodeRule.oid.trim();
            this.cloneOtherQuery = conditionMap;
            this.onLoad(this.codeRulePage);
        },
        /** ä»Žå…¶ä»–规则克隆码段界面搜索功能*/
        searchOtherCloneChange(params, done) {
            this.codeRulePage.currentPage = 1;
            // å¤šä¸ªconditionMap这样传参,快速查询默认采用模糊查询
            if (params) {
                Object.keys(params).forEach((key) => {
                    this.cloneOtherQuery["conditionMap" + "[" + key + "_like]"] =
                    params[key].trim();
                });
            }
            this.onLoad(this.codeRulePage,this.cloneOtherQuery);
            done();
        },
        /** ä¿å­˜ä»Žå…¶ä»–编码规则中克隆码段信息*/
        async saveOtherCodeBasic() {
            this.cloneSaveLoding = true;
            let oid = this.quiltCloneCodeRule.oid;
            let fromDialogPkCodebasic = this.selectionOtherCloneCodeBasicList;
            if (fromDialogPkCodebasic.length <= 0) {
                this.$message.warning("请选择码段数据!");
                return;
            }
            let oidArr = [];
            fromDialogPkCodebasic.forEach((ele) => {
                oidArr.push(ele.oid);
            });
            let data = {
                pkCodeRule: oid,
                oidArr: oidArr.join(","),
            };
            //console.log(data);
            await cloneCodeBasic(data).then( () => {
                this.cloneOtherCodeRuleSettingBox = false;
                this.$message({
                    type: "success",
                    message: "操作成功!",
                });
                // è°ƒç”¨çˆ¶ç»„件方法重新加载码段表
                this.$emit('refreshRuleTable',{"currentPage":1,"pageSize":10});
            },(error) => {
                window.console.log(error);
            });
            this.cloneSaveLoding = false;
        },
        /** ç‚¹å‡»è§¦å‘加载基础码段信息*/
        loadBasic(row) {
            this.codeBasicloading = true;
            // console.log(row)
            if (row != "" && row != null && row !="undefined") {
                let conditionMap = {};
                conditionMap["conditionMap[pkCodeRule]"] = row.oid.trim();
                gridCodeBasicSec(1, -1, conditionMap).then((res) => {
                    const data = res.data.data;
                    this.cloneBasicData = data.records;
                    this.codeBasicloading = false;
                });
            }else {
                this.cloneBasicData = [];
                this.codeBasicloading = false;
            }
        },
        // è§„则表格相关方法
        onLoad(page, params = {}) {
            this.codeRuleloading = true;
            gridCodeRule(page.currentPage, page.pageSize, Object.assign({},this.cloneOtherQuery, params)).then((res) => {
                // console.log(res.data);
                const data = res.data.data;
                this.codeRulePage.total = data.total;
                this.codeRuleData = data.records;
                this.codeRuleloading = false;
                if(this.codeRuleData.length > 0) {
                    this.$nextTick(() => {
                        this.selectOtherCodeRuleRowIndex = this.codeRuleData[0].$index
                        this.selectionOtherCloneCodeRuleList = this.codeRuleData[0];
                    });
                }else{
                    this.cloneBasicData = [];
                }
            });
        },
    }
};
</script>
<style>
</style>
Source/UBCS-WEB/src/components/code-dialog-page/cloneRuleDialog.vue
¶Ô±ÈÐÂÎļþ
@@ -0,0 +1,222 @@
<template>
  <el-dialog
      :visible.sync="cloneSettingBox"
      append-to-body
      class="avue-dialog avue-dialog--top"
      style="height: 100vh"
      title="克隆编码规则"
      top="-3%"
      @close="closeCloneDialog"
      width="800px">
      <div>
        <el-row>
          <el-form ref="form" :inline="true" :model="form" label-width="80px">
            <el-form-item label="编号" required>
              <el-input v-model="cloneCodeRuleForm.id"></el-input>
            </el-form-item>
            <el-form-item label="名称" required>
              <el-input v-model="cloneCodeRuleForm.name"></el-input>
            </el-form-item>
            <el-form-item label="依据" required>
              <el-input v-model="cloneCodeRuleForm.accordingTo"></el-input>
            </el-form-item>
            <el-form-item class="clone-input-textarea" label="描述">
              <el-input
                v-model="cloneCodeRuleForm.description"
                :autosize="{ minRows: 3, maxRows: 5 }"
                type="textarea"
              ></el-input>
            </el-form-item>
          </el-form>
        </el-row>
        <el-row>
          <p
            style="
              margin: 0 0px 16px 50%;
              font-weight: 500;
              font-size: 20px;
              color: #000;">
            ç æ®µç®¡ç†
          </p>
          <avue-crud
            :data="cloneData"
            :option="cloneOption"
            :table-loading="cloneTableLoading"
            class="clone-avue-crud">
            <template slot="menu" slot-scope="scope">
              <el-button
                v-show="scope.row.orderNum > 1"
                icon="el-icon-arrow-up"
                plain
                size="small"
                type="text"
                @click="upOrderNum(scope.row)"
                >上移
              </el-button>
              <el-button
                icon="el-icon-arrow-down"
                plain
                size="small"
                type="text"
                @click="downOrderNum(scope.row)"
                >下移
              </el-button>
            </template>
          </avue-crud>
        </el-row>
      </div>
      <div slot="footer" class="dialog-footer">
        <el-button type="primary" @click="saveCloneCodeRule" :loading="cloneCodeRuleLoading">保 å­˜</el-button>
        <el-button @click="cloneSettingBox = false">取 æ¶ˆ</el-button>
      </div>
  </el-dialog>
</template>
<script>
import cloneOption from "@/const/code/cloneOption";
import {clone} from "@/api/code/mdmrule";
import {downOrderNum, upOrderNum, gridCodeBasicSec} from "@/api/code/codebasic";
export default {
    name: "cloneRuleDialog",
    props: {
        // å¯¹è¯æ¡†æ˜¾ç¤ºéšè—æŽ§åˆ¶
        visible: {
            type: "Boolean",
            default: false,
        },
        ruleData:{
            type: "Object",
        }
    },
    data() {
        return {
            cloneSettingBox: this.visible,
            /*克隆编码规则对话框控制变量*/
            cloneTableLoading: false,
            cloneCodeRuleLoading: false,
            cloneOption: cloneOption,
            cloneData: [],
            cloneCodeRuleForm: {
                id: "",
                name: "",
                accordingTo: "",
                description: "",
            },
        };
    },
    watch: {
        // ç›‘听父组件传的窗口显示隐藏的值,以及值的回填
        visible() {
            //console.log(this.visible);
            if(this.visible){
                this.loadBasic(this.ruleData);
                this.cloneCodeRuleForm.id = this.ruleData.id;
                this.cloneCodeRuleForm.name = this.ruleData.name;
                this.cloneCodeRuleForm.accordingTo = this.ruleData.accordingTo;
                this.cloneCodeRuleForm.description = this.ruleData.description;
            }
            this.cloneSettingBox = this.visible;
        },
    },
    methods: {
        //关闭对话框
        closeCloneDialog(){
            this.$emit('update:visible',false);
            this.cloneData = [];
        },
        /** ä¸Šç§»ä¸‹ç§»åŸºç¡€ç æ®µ*/
        async upOrderNum(row) {
            if (this.ruleData.lcStatus != "Editing") {
                this.$message.warning(
                "只有编码规则的状态是 [编辑中] çš„æ—¶å€™ï¼Œæ‰èƒ½è°ƒæ•´ç æ®µé¡ºåº!"
                );
                return;
            }
            if (row.oid == null || row.oid == "") {
                this.$message.warning("未获取到必填参数!");
                return;
            }
            await upOrderNum(row.oid).then(() => {
                this.loadBasic(this.ruleData);
                this.$message({
                type: "success",
                message: "操作成功!",
                });
            });
        },
        downOrderNum(row) {
            let codeRuleOid = this.ruleData.oid;
            if (this.ruleData.lcStatus != "Editing") {
                this.$message.warning(
                "只有编码规则的状态是 [编辑中] çš„æ—¶å€™ï¼Œæ‰èƒ½è°ƒæ•´ç æ®µé¡ºåº!"
                );
                return;
            }
            if (row.oid == null || row.oid == "") {
                this.$message.warning("未获取到必填参数!");
                return;
            }
            downOrderNum(row.oid).then(() => {
                this.loadBasic({ oid: codeRuleOid });
                this.$message({
                type: "success",
                message: "操作成功!",
                });
            });
        },
        /** ç‚¹å‡»è§¦å‘加载基础码段信息*/
        loadBasic(row) {
            this.cloneTableLoading = true;
            if (row != "" || row != null) {
                let conditionMap = {};
                conditionMap["conditionMap[pkCodeRule]"] = row.oid.trim();
                gridCodeBasicSec(1, -1, conditionMap).then((res) => {
                    const data = res.data.data;
                    this.cloneData = data.records;
                    this.cloneTableLoading = false;
                });
            }
        },
         /** å…‹éš†ç¼–码规则保存功能*/
        saveCloneCodeRule() {
            this.cloneCodeRuleLoading = true;
            let form = this.cloneCodeRuleForm;
            if (form.id.trim() == "") {
                this.$message.warning("编号不能为空!");
                return;
            }
            if (form.name.trim() == "") {
                this.$message.warning("码值不能为空!");
                return;
            }
            let data = Object.assign({}, form, {
                oid: "",
                createTime: new Date().getTime(),
                ts: new Date(this.ruleData.ts).getTime(),
                lcStatus: "Editing",
                elements: this.cloneData,
            });
            // console.log(data);
            this.cloneCodeRuleLoading = true;
            clone(data).then(() => {
                this.cloneSettingBox = false;
                // è°ƒç”¨çˆ¶ç»„件方法重新加载码段表
                this.$emit('refreshRuleTable',{"currentPage":1,"pageSize":10});
                this.$message({
                    type: "success",
                    message: "操作成功!",
                });
            },
            (error) => {
                window.console.log(error);
            });
        },
    }
}
</script>
<style>
</style>
Source/UBCS/ubcs-service/ubcs-code/src/main/java/com/vci/ubcs/code/service/IPasswordFreeLoginService.java
¶Ô±ÈÐÂÎļþ
@@ -0,0 +1,18 @@
package com.vci.ubcs.code.service;
/**
 * å…å¯†ç™»å½•服务
 * @author ludc
 * @date 2023/9/11 15:46
 */
public interface IPasswordFreeLoginService {
    /**
     * å…å¯†ç™»å½•方法
     * @param account è´¦å·
     * @return
     */
    boolean passwordFreeLogin(String account);
}
Source/UBCS/ubcs-service/ubcs-code/src/main/java/com/vci/ubcs/code/service/impl/PasswordFreeLoginServiceImpl.java
¶Ô±ÈÐÂÎļþ
@@ -0,0 +1,31 @@
package com.vci.ubcs.code.service.impl;
import com.vci.ubcs.code.service.IPasswordFreeLoginService;
import org.springframework.stereotype.Service;
import javax.annotation.Resource;
/**
 * å…å¯†ç™»å½•服务
 * @author ludc
 * @date 2023/9/11 15:45
 */
@Service
public class PasswordFreeLoginServiceImpl implements IPasswordFreeLoginService {
    /**
     * å…å¯†ç™»å½•方法
     * @param account è´¦å·
     * @return
     */
    @Override
    public boolean passwordFreeLogin(String account) {
        return false;
    }
}