From 49a1394faab127c1b76ddcff004620696f8513ff Mon Sep 17 00:00:00 2001
From: 田源 <lastanimals@163.com>
Date: 星期一, 11 九月 2023 16:36:21 +0800
Subject: [PATCH] Merge remote-tracking branch 'origin/master'
---
Source/UBCS-WEB/src/components/code-dialog-page/cloneOtherBasicSecDialog.vue | 247 +++++++++++++++++++++++++++
Source/UBCS/ubcs-service/ubcs-code/src/main/java/com/vci/ubcs/code/service/IPasswordFreeLoginService.java | 18 ++
Source/UBCS-WEB/src/components/code-dialog-page/cloneRuleDialog.vue | 222 ++++++++++++++++++++++++
Source/UBCS/ubcs-service/ubcs-code/src/main/java/com/vci/ubcs/code/service/impl/PasswordFreeLoginServiceImpl.java | 31 +++
4 files changed, 518 insertions(+), 0 deletions(-)
diff --git a/Source/UBCS-WEB/src/components/code-dialog-page/cloneOtherBasicSecDialog.vue b/Source/UBCS-WEB/src/components/code-dialog-page/cloneOtherBasicSecDialog.vue
new file mode 100644
index 0000000..5a85239
--- /dev/null
+++ b/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: {
+ // 鐩戝惉鐖剁粍浠朵紶鐨勭獥鍙f樉绀洪殣钘忕殑鍊硷紝浠ュ強鍊肩殑鍥炲~
+ 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>
\ No newline at end of file
diff --git a/Source/UBCS-WEB/src/components/code-dialog-page/cloneRuleDialog.vue b/Source/UBCS-WEB/src/components/code-dialog-page/cloneRuleDialog.vue
new file mode 100644
index 0000000..897c547
--- /dev/null
+++ b/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: {
+ // 鐩戝惉鐖剁粍浠朵紶鐨勭獥鍙f樉绀洪殣钘忕殑鍊硷紝浠ュ強鍊肩殑鍥炲~
+ 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>
\ No newline at end of file
diff --git a/Source/UBCS/ubcs-service/ubcs-code/src/main/java/com/vci/ubcs/code/service/IPasswordFreeLoginService.java b/Source/UBCS/ubcs-service/ubcs-code/src/main/java/com/vci/ubcs/code/service/IPasswordFreeLoginService.java
new file mode 100644
index 0000000..c202116
--- /dev/null
+++ b/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);
+
+
+}
diff --git a/Source/UBCS/ubcs-service/ubcs-code/src/main/java/com/vci/ubcs/code/service/impl/PasswordFreeLoginServiceImpl.java b/Source/UBCS/ubcs-service/ubcs-code/src/main/java/com/vci/ubcs/code/service/impl/PasswordFreeLoginServiceImpl.java
new file mode 100644
index 0000000..ef70cbe
--- /dev/null
+++ b/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;
+ }
+
+
+}
--
Gitblit v1.9.3