Source/UBCS-WEB/src/components/code-dialog-page/cloneOtherBasicSecDialog.vue | ●●●●● 补丁 | 查看 | 原始文档 | blame | 历史 | |
Source/UBCS-WEB/src/components/code-dialog-page/cloneRuleDialog.vue | ●●●●● 补丁 | 查看 | 原始文档 | blame | 历史 | |
Source/UBCS/ubcs-service/ubcs-code/src/main/java/com/vci/ubcs/code/service/IPasswordFreeLoginService.java | ●●●●● 补丁 | 查看 | 原始文档 | blame | 历史 | |
Source/UBCS/ubcs-service/ubcs-code/src/main/java/com/vci/ubcs/code/service/impl/PasswordFreeLoginServiceImpl.java | ●●●●● 补丁 | 查看 | 原始文档 | 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"> </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; } }