From 78c84cf61b2a7f558582673a3eecdf8b91eb24c3 Mon Sep 17 00:00:00 2001
From: WXL (wul) <wl_5969728@163.com>
Date: 星期五, 17 四月 2026 16:48:26 +0800
Subject: [PATCH] 测试完成
---
dist (2).zip | 0
dist.zip | 0
src/views/login-ls.vue | 115 ++++++------
src/views/login.vue | 115 ++++++------
sltd&ls&南华.zip | 0
src/views/followvisit/record/detailpage/index.vue | 18 +
dist (3).zip | 0
src/views/knowledge/education/compilequer/index copy.vue | 115 ++++++------
src/views/knowledge/education/index.vue | 2
src/views/knowledge/education/compilequer/index.vue | 129 ++++++++-----
10 files changed, 269 insertions(+), 225 deletions(-)
diff --git "a/dist \0502\051.zip" "b/dist \0502\051.zip"
new file mode 100644
index 0000000..f74de21
--- /dev/null
+++ "b/dist \0502\051.zip"
Binary files differ
diff --git "a/dist \0503\051.zip" "b/dist \0503\051.zip"
new file mode 100644
index 0000000..02f34e6
--- /dev/null
+++ "b/dist \0503\051.zip"
Binary files differ
diff --git a/dist.zip b/dist.zip
new file mode 100644
index 0000000..814a68f
--- /dev/null
+++ b/dist.zip
Binary files differ
diff --git "a/sltd&ls&\345\215\227\345\215\216.zip" "b/sltd&ls&\345\215\227\345\215\216.zip"
new file mode 100644
index 0000000..1fcbf17
--- /dev/null
+++ "b/sltd&ls&\345\215\227\345\215\216.zip"
Binary files differ
diff --git a/src/views/followvisit/record/detailpage/index.vue b/src/views/followvisit/record/detailpage/index.vue
index d8ae58d..ca6a493 100644
--- a/src/views/followvisit/record/detailpage/index.vue
+++ b/src/views/followvisit/record/detailpage/index.vue
@@ -561,7 +561,7 @@
<el-button
type="primary"
plain
- @click="Editsingletasksonyic('')"
+ @click="alterpatient('')"
>
淇濆瓨鍩虹淇℃伅
</el-button>
@@ -1806,10 +1806,7 @@
// 澶勭悊 scriptResult锛岀洿鎺ヤ慨鏀瑰師濮嬫暟鎹�
if (item.scriptType == 2 && item.scriptResult) {
// 澶勭悊鏁扮粍绫诲瀷鐨� scriptResult
- if (
- Array.isArray(item.scriptResult) &&
- item.scriptResult.length > 0
- ) {
+ if (Array.isArray(item.scriptResult)) {
item.originalScriptResult = item.scriptResult; // 淇濆瓨鍘熷鏁扮粍锛堝彲閫夛級
item.scriptResult = item.scriptResult.join("&"); // 杞崲涓哄瓧绗︿覆
}
@@ -2023,7 +2020,7 @@
}
item.patid = this.patid;
item.templateid = item.templateID;
- if (item.nextScriptno == null) {
+ if (item.nextScriptno == null) {
item.nextScriptno = index == dataToSubmit.length - 1 ? 0 : index + 2;
}
});
@@ -2205,6 +2202,15 @@
}
});
},
+ alterpatient(sendstate) {
+ alterpatient(this.userform).then((res) => {
+ if (res.code == 200) {
+ this.$modal.msgSuccess("鍩虹淇℃伅淇濆瓨鎴愬姛");
+ } else {
+ this.$modal.msgError("鍩虹淇℃伅淇敼澶辫触");
+ }
+ });
+ },
// 寮傚父鍒楁覆鏌�
tableRowClassName({ row, rowIndex }) {
if (row.id == this.id) {
diff --git a/src/views/knowledge/education/compilequer/index copy.vue b/src/views/knowledge/education/compilequer/index copy.vue
index 18f6baf..4890b23 100644
--- a/src/views/knowledge/education/compilequer/index copy.vue
+++ b/src/views/knowledge/education/compilequer/index copy.vue
@@ -432,70 +432,77 @@
toolbarConfig: {},
editorConfig: {
placeholder: "璇疯緭鍏ュ唴瀹�...",
+ MENU_CONF: {
+ // 鍥剧墖涓婁紶閰嶇疆
+ uploadImage: {
+ server: process.env.VUE_APP_BASE_API + "/common/uploadSort",
+ fieldName: "file",
+ headers: {
+ Authorization: "Bearer " + getToken(),
+ },
+ // 鑷畾涔夋彃鍏�
+ customInsert: (res, insertFn) => {
+ const url = res.url || res.data || res.filePath;
+ if (url) {
+ // 澶勭悊鍐呯綉鍦板潃杞崲
+ const processedUrl = url.replace(
+ "http://192.168.191.181:8095/profile/upload",
+ "http://m.zjtongde.com:13871/prod-api/profile/upload"
+ );
+ insertFn(processedUrl);
+ }
+ },
+ },
+
+ // 瑙嗛涓婁紶閰嶇疆
+ uploadVideo: {
+ server: process.env.VUE_APP_BASE_API + "/common/uploadSort",
+ fieldName: "file",
+ maxFileSize: 50 * 1024 * 1024, // 50MB
+ allowedFileTypes: ["video/*"],
+ headers: {
+ "Content-Type": "multipart/form-data",
+ Authorization: "Bearer " + getToken(),
+ },
+ // 鑷畾涔夋彃鍏�
+ customInsert: (res, insertFn) => {
+ const url = res.url || res.data || res.filePath;
+ if (url) {
+ // 澶勭悊鍐呯綉鍦板潃杞崲
+ const processedUrl = url.replace(
+ "http://192.168.191.181:8095/profile/upload",
+ "http://m.zjtongde.com:13871/prod-api/profile/upload"
+ );
+ insertFn(processedUrl, "瑙嗛");
+ }
+ },
+ onSuccess: (file, res) => {
+ console.log("瑙嗛涓婁紶鎴愬姛", res);
+ return res.url || res.data || res.filePath;
+ },
+ onFailed: (file, res) => {
+ this.$message.error("瑙嗛涓婁紶澶辫触");
+ console.error("瑙嗛涓婁紶澶辫触", res);
+ },
+ onError: (file, err, res) => {
+ this.$message.error("瑙嗛涓婁紶鍑洪敊");
+ console.error("瑙嗛涓婁紶鍑洪敊", err);
+ },
+ },
+ },
menus: [
"head",
"bold",
"italic",
"underline",
"image",
+ "video", // 纭繚鏈� video
"link",
"list",
"undo",
"redo",
- "file", // 娣诲姞鑷畾涔夋枃浠朵笂浼犺彍鍗�
+ "file",
],
- uploadImgServer: process.env.VUE_APP_BASE_API + "/common/uploadSort", // 鍥剧墖涓婁紶鎺ュ彛
- uploadImgHeaders: {
- Authorization: "Bearer " + getToken(),
- }, // 鑷畾涔変笂浼犵殑 headers
- uploadImgParams: { key: "value" }, // 鑷畾涔変笂浼犵殑鍙傛暟
- uploadImgMaxSize: 2 * 1024 * 1024, // 鍥剧墖鏈�澶уぇ灏忥紝鍗曚綅 Byte
- uploadImgMaxLength: 1, // 涓�娆℃渶澶氫笂浼犲浘鐗囨暟閲�
- uploadImgTimeout: 3 * 60 * 1000, // 瓒呮椂鏃堕棿锛屽崟浣� ms
- uploadImgHooks: {
- customInsert: (insertImgFn, result) => {
- const url = result.url; // 鑾峰彇鍥剧墖鍦板潃
- insertImgFn(url); // 鎻掑叆鍥剧墖
- },
- },
- customMenus: {
- file: {
- tip: "涓婁紶鏂囦欢",
- click: (editor) => {
- const input = document.createElement("input");
- input.type = "file";
- input.accept =
- "application/pdf,application/msword,application/vnd.openxmlformats-officedocument.wordprocessingml.document"; // 鏀寔鐨勬枃浠剁被鍨�
- input.onchange = (e) => {
- const file = e.target.files[0];
- if (!file) return;
- const formData = new FormData();
- formData.append("file", file);
-
- // 纭繚 process.env.VUE_APP_BASE_API 鏄纭殑
- const uploadUrl =
- process.env.VUE_APP_BASE_API + "/common/uploadSort";
- axios
- .post(uploadUrl, formData, {
- headers: {
- Authorization: "Bearer " + getToken(),
- },
- })
- .then((res) => {
- const url = res.data.url; // 鑾峰彇鏂囦欢鍦板潃
- // 鎻掑叆鏂囦欢閾炬帴浣滀负鏅�氭枃鏈�
- editor.txt.append(url + " ");
- // 鎴栬�呮彃鍏ユ枃浠堕摼鎺ヤ綔涓鸿秴閾炬帴
- // editor.cmd.do('insertLink', { name: '鏂囦欢閾炬帴', url: url });
- })
- .catch((err) => {
- console.error("鏂囦欢涓婁紶澶辫触", err);
- });
- };
- input.click();
- },
- },
- },
},
modes: "default", // or 'simple'
headers: {
@@ -732,7 +739,7 @@
// 瀹氫箟瑕佹浛鎹㈢殑鏂版棫URL
var oldUrlBase = this.oldPattern;
- var newUrlBase =this.newPattern;
+ var newUrlBase = this.newPattern;
// 鑾峰彇鎵�鏈夌殑video鍏冪礌
var videos = doc.querySelectorAll("video");
diff --git a/src/views/knowledge/education/compilequer/index.vue b/src/views/knowledge/education/compilequer/index.vue
index f5c3f3f..ef4061c 100644
--- a/src/views/knowledge/education/compilequer/index.vue
+++ b/src/views/knowledge/education/compilequer/index.vue
@@ -360,60 +360,74 @@
fileList: [],
// 宸ュ叿鏍忛厤缃�
toolbarConfig: {
- excludeKeys: [
- "group-video",
- "insertVideo",
- "uploadVideo",
- "emotion",
- "codeBlock",
- ],
+ excludeKeys: ["emotion", "codeBlock"],
},
- // 缂栬緫鍣ㄩ厤缃�
editorConfig: {
- placeholder: "璇疯緭鍏ュ鏁欏唴瀹�...",
+ placeholder: "璇疯緭鍏ュ唴瀹�...",
MENU_CONF: {
+ // 鍥剧墖涓婁紶閰嶇疆
uploadImage: {
server: process.env.VUE_APP_BASE_API + "/common/uploadSort",
fieldName: "file",
- maxFileSize: 2 * 1024 * 1024,
- maxNumberOfFiles: 1,
- allowedFileTypes: ["image/*"],
headers: {
Authorization: "Bearer " + getToken(),
},
- customUpload: async (file, insertFn) => {
- try {
- const formData = new FormData();
- formData.append("file", file);
-
- const response = await axios.post(
- process.env.VUE_APP_BASE_API + "/common/uploadSort",
- formData,
- {
- headers: {
- // "Content-Type": "multipart/form-data",
- Authorization: "Bearer " + getToken(),
- },
- }
+ // 鑷畾涔夋彃鍏ュ浘鐗�
+ customInsert: (res, insertFn) => {
+ const url = res.url || res.data || res.filePath;
+ if (url) {
+ // 澶勭悊鍐呯綉鍦板潃杞崲
+ const processedUrl = url.replace(
+ "http://192.168.191.181:8095/profile/upload",
+ "http://m.zjtongde.com:13871/prod-api/profile/upload"
);
-
- if (response.data && response.data.url) {
- let imgUrl = response.data.url;
- // imgUrl = imgUrl.replace(
- // "http://218.108.11.22:8093/profile-api/upload",
- // "http://192.88.117.236:8090/prod-api/profile/upload"
- // );
- imgUrl = imgUrl.replace(
- "http://m.zjtongde.com:13871/prod-api/profile/upload",
- "http://192.88.117.236:8090/prod-api/profile/upload"
- );
- insertFn(imgUrl);
- }
- } catch (error) {
- console.error("鍥剧墖涓婁紶澶辫触", error);
- this.$message.error("鍥剧墖涓婁紶澶辫触");
+ insertFn(processedUrl);
}
+ },
+ // 涓婁紶鎴愬姛鍥炶皟
+ onSuccess: (file, res) => {
+ console.log("鍥剧墖涓婁紶鎴愬姛", res);
+ return res.url || res.data || res.filePath;
+ },
+ onFailed: (file, res) => {
+ this.$message.error("鍥剧墖涓婁紶澶辫触");
+ console.error("鍥剧墖涓婁紶澶辫触", res);
+ },
+ },
+
+ // 瑙嗛涓婁紶閰嶇疆
+ uploadVideo: {
+ server: process.env.VUE_APP_BASE_API + "/common/uploadSort",
+ fieldName: "file",
+ maxFileSize: 50 * 1024 * 1024, // 50MB
+ allowedFileTypes: ["video/*"],
+ headers: {
+ Authorization: "Bearer " + getToken(),
+ },
+ // 鑷畾涔夋彃鍏ヨ棰�
+ customInsert: (res, insertFn) => {
+ const url = res.url || res.data || res.filePath;
+ if (url) {
+ // 澶勭悊鍐呯綉鍦板潃杞崲
+ const processedUrl = url.replace(
+ "http://192.168.191.181:8095/profile/upload",
+ "http://m.zjtongde.com:13871/prod-api/profile/upload"
+ );
+ insertFn(processedUrl, "瑙嗛");
+ }
+ },
+ onSuccess: (file, res) => {
+ console.log("瑙嗛涓婁紶鎴愬姛", res);
+ return res.url || res.data || res.filePath;
+ },
+ onFailed: (file, res) => {
+ this.$message.error("瑙嗛涓婁紶澶辫触");
+ console.error("瑙嗛涓婁紶澶辫触", res);
+ },
+ onError: (file, err, res) => {
+ this.$message.error("瑙嗛涓婁紶鍑洪敊");
+ console.error("瑙嗛涓婁紶鍑洪敊", err);
},
},
},
@@ -658,17 +672,32 @@
// 鑾峰彇鎵�鏈夌殑video鍏冪礌
var videos = doc.querySelectorAll("video");
var images = doc.querySelectorAll("img");
+ console.log(videos, "videos");
+ console.log(images, "images");
// 閬嶅巻鎵�鏈夌殑video鍏冪礌骞舵浛鎹rc灞炴��
videos.forEach(function (video) {
+ // 鍏堟鏌ideo鍏冪礌鑷韩鐨剆rc灞炴��
var src = video.getAttribute("src");
- if (src.startsWith(oldUrlBase)) {
+ if (src && src.startsWith(oldUrlBase)) {
video.setAttribute("src", src.replace(oldUrlBase, newUrlBase));
}
- });
- console.log(images,'images');
- images.forEach(function (img) {
+ // 鐒跺悗妫�鏌ideo鍏冪礌鍐呴儴鐨剆ource瀛愬厓绱�
+ var sources = video.querySelectorAll("source");
+ sources.forEach(function (source) {
+ var sourceSrc = source.getAttribute("src");
+ if (sourceSrc && sourceSrc.startsWith(oldUrlBase)) {
+ source.setAttribute(
+ "src",
+ sourceSrc.replace(oldUrlBase, newUrlBase)
+ );
+ }
+ });
+ });
+ console.log(images, "images");
+
+ images.forEach(function (img) {
var src = img.getAttribute("src");
if (src.startsWith(oldUrlBase)) {
img.setAttribute("src", src.replace(oldUrlBase, newUrlBase));
@@ -700,11 +729,13 @@
content: this.parserdom(this.content),
fileName: this.generateRandomHtmlFilename(),
}).then((res) => {
+ console.log(55);
+
this.ruleForm.richText = res.msg;
this.ruleForm.richText = res.msg.replace(
- this.oldPattern,
- this.newPattern
- );
+ this.oldPattern,
+ this.newPattern
+ );
console.log(this.ruleForm.richText, "this.ruleForm.richText");
// 澶勭悊鍐呯綉html
addrichText({
diff --git a/src/views/knowledge/education/index.vue b/src/views/knowledge/education/index.vue
index 5a090ab..14b7ac0 100644
--- a/src/views/knowledge/education/index.vue
+++ b/src/views/knowledge/education/index.vue
@@ -865,7 +865,7 @@
},
// 鏌ヨ鏍�
getDeptTree() {
- getheLibraryAssort({ hetype: 2 }).then((res) => {
+ getheLibraryAssort({ hetype: 1 }).then((res) => {
this.deptOptions = res.rows;
this.dialogFormVisible = false;
});
diff --git a/src/views/login-sy.vue b/src/views/login-ls.vue
similarity index 76%
rename from src/views/login-sy.vue
rename to src/views/login-ls.vue
index 2bb661e..63e4d1e 100644
--- a/src/views/login-sy.vue
+++ b/src/views/login-ls.vue
@@ -36,11 +36,11 @@
/>
</el-input>
</el-form-item>
- <!-- 甯備竴===================涓� -->
- <el-form-item prop="medicalCode">
+ <!-- 涓�===================姘� -->
+ <el-form-item prop="orgid">
<el-select
style="width: 100%"
- v-model="loginForm.medicalCode"
+ v-model="loginForm.orgid"
placeholder="璇烽�夋嫨闄㈠尯"
>
<el-option
@@ -118,8 +118,7 @@
code: "",
orgid: "H41010500003",
},
- options: [
- ],
+ options: [],
loginRules: {
username: [
{ required: true, trigger: "blur", message: "璇疯緭鍏ユ偍鐨勮处鍙�" },
@@ -168,8 +167,9 @@
getorganization({ pageSize: 30 }).then((res) => {
if (res.code == 200) {
this.options = res.rows.map((item) => ({
- value: item.medicalCode,
+ value: item.orgid,
label: item.organizationName,
+ campusid: item.organizationID,
}));
}
});
@@ -186,61 +186,60 @@
};
},
handleLogin() {
- this.$refs.loginForm.validate((valid) => {
- if (valid) {
- this.loading = true;
+ this.$refs.loginForm.validate((valid) => {
+ if (valid) {
+ this.loading = true;
- if (this.loginForm.rememberMe) {
- Cookies.set("username", this.loginForm.username, { expires: 30 });
- Cookies.set("password", encrypt(this.loginForm.password), {
- expires: 30,
- });
- Cookies.set("rememberMe", this.loginForm.rememberMe, {
- expires: 30,
- });
- } else {
- Cookies.remove("username");
- Cookies.remove("password");
- Cookies.remove("rememberMe");
- }
-
- // 鍔ㄦ�佽缃� campusid 鍙傛暟
- const selectedOrg = this.options.find(item => item.value === this.loginForm.medicalCode);
- console.log(selectedOrg);
-
- if (selectedOrg) {
- if (selectedOrg.label.includes('婀栨花')) {
- this.loginForm.campusid = 1;
- this.loginForm.orgid = 1;
- } else if (selectedOrg.label.includes('鍚村北')) {
- this.loginForm.campusid = 2;
- this.loginForm.orgid = 1;
- } else {
- this.loginForm.campusid = 1; // 榛樿鍊兼垨鍏朵粬澶勭悊
- this.loginForm.orgid = 1;
- }
- }
-
- this.$store
- .dispatch("Login", this.loginForm)
- .then((res) => {
- if (this.loginForm.username == "admin") {
- this.$router.push({ path: "/index" }).catch(() => {});
+ if (this.loginForm.rememberMe) {
+ Cookies.set("username", this.loginForm.username, { expires: 30 });
+ Cookies.set("password", encrypt(this.loginForm.password), {
+ expires: 30,
+ });
+ Cookies.set("rememberMe", this.loginForm.rememberMe, {
+ expires: 30,
+ });
} else {
- this.$router
- .push({ path: "/followvisit/discharge" })
- .catch(() => {});
+ Cookies.remove("username");
+ Cookies.remove("password");
+ Cookies.remove("rememberMe");
}
- })
- .catch(() => {
- this.loading = false;
- if (this.captchaEnabled) {
- this.getCode();
- }
- });
- }
- });
-}
+
+ // 鍔ㄦ�佽缃� campusid 鍙傛暟
+ const selectedOrg = this.options.find(
+ (item) => item.value === this.loginForm.orgid
+ );
+ this.loginForm.campusid = selectedOrg.campusid || 1;
+ // 甯備竴澶勭悊-----------------
+ // if (selectedOrg) {
+ // if (selectedOrg.label.includes("婀栨花")) {
+ // this.loginForm.campusid = 1;
+ // } else if (selectedOrg.label.includes("鍚村北")) {
+ // this.loginForm.campusid = 2;
+ // } else {
+ // this.loginForm.campusid = 1; // 榛樿鍊兼垨鍏朵粬澶勭悊
+ // }
+ // }
+ // --------------------------------
+ this.$store
+ .dispatch("Login", this.loginForm)
+ .then((res) => {
+ if (this.loginForm.username == "admin") {
+ this.$router.push({ path: "/index" }).catch(() => {});
+ } else {
+ this.$router
+ .push({ path: "/followvisit/discharge" })
+ .catch(() => {});
+ }
+ })
+ .catch(() => {
+ this.loading = false;
+ if (this.captchaEnabled) {
+ this.getCode();
+ }
+ });
+ }
+ });
+ },
},
};
</script>
diff --git a/src/views/login.vue b/src/views/login.vue
index 63e4d1e..2bb661e 100644
--- a/src/views/login.vue
+++ b/src/views/login.vue
@@ -36,11 +36,11 @@
/>
</el-input>
</el-form-item>
- <!-- 涓�===================姘� -->
- <el-form-item prop="orgid">
+ <!-- 甯備竴===================涓� -->
+ <el-form-item prop="medicalCode">
<el-select
style="width: 100%"
- v-model="loginForm.orgid"
+ v-model="loginForm.medicalCode"
placeholder="璇烽�夋嫨闄㈠尯"
>
<el-option
@@ -118,7 +118,8 @@
code: "",
orgid: "H41010500003",
},
- options: [],
+ options: [
+ ],
loginRules: {
username: [
{ required: true, trigger: "blur", message: "璇疯緭鍏ユ偍鐨勮处鍙�" },
@@ -167,9 +168,8 @@
getorganization({ pageSize: 30 }).then((res) => {
if (res.code == 200) {
this.options = res.rows.map((item) => ({
- value: item.orgid,
+ value: item.medicalCode,
label: item.organizationName,
- campusid: item.organizationID,
}));
}
});
@@ -186,60 +186,61 @@
};
},
handleLogin() {
- this.$refs.loginForm.validate((valid) => {
- if (valid) {
- this.loading = true;
+ this.$refs.loginForm.validate((valid) => {
+ if (valid) {
+ this.loading = true;
- if (this.loginForm.rememberMe) {
- Cookies.set("username", this.loginForm.username, { expires: 30 });
- Cookies.set("password", encrypt(this.loginForm.password), {
- expires: 30,
- });
- Cookies.set("rememberMe", this.loginForm.rememberMe, {
- expires: 30,
- });
- } else {
- Cookies.remove("username");
- Cookies.remove("password");
- Cookies.remove("rememberMe");
- }
+ if (this.loginForm.rememberMe) {
+ Cookies.set("username", this.loginForm.username, { expires: 30 });
+ Cookies.set("password", encrypt(this.loginForm.password), {
+ expires: 30,
+ });
+ Cookies.set("rememberMe", this.loginForm.rememberMe, {
+ expires: 30,
+ });
+ } else {
+ Cookies.remove("username");
+ Cookies.remove("password");
+ Cookies.remove("rememberMe");
+ }
- // 鍔ㄦ�佽缃� campusid 鍙傛暟
- const selectedOrg = this.options.find(
- (item) => item.value === this.loginForm.orgid
- );
- this.loginForm.campusid = selectedOrg.campusid || 1;
- // 甯備竴澶勭悊-----------------
- // if (selectedOrg) {
- // if (selectedOrg.label.includes("婀栨花")) {
- // this.loginForm.campusid = 1;
- // } else if (selectedOrg.label.includes("鍚村北")) {
- // this.loginForm.campusid = 2;
- // } else {
- // this.loginForm.campusid = 1; // 榛樿鍊兼垨鍏朵粬澶勭悊
- // }
- // }
- // --------------------------------
- this.$store
- .dispatch("Login", this.loginForm)
- .then((res) => {
- if (this.loginForm.username == "admin") {
- this.$router.push({ path: "/index" }).catch(() => {});
- } else {
- this.$router
- .push({ path: "/followvisit/discharge" })
- .catch(() => {});
- }
- })
- .catch(() => {
- this.loading = false;
- if (this.captchaEnabled) {
- this.getCode();
- }
- });
+ // 鍔ㄦ�佽缃� campusid 鍙傛暟
+ const selectedOrg = this.options.find(item => item.value === this.loginForm.medicalCode);
+ console.log(selectedOrg);
+
+ if (selectedOrg) {
+ if (selectedOrg.label.includes('婀栨花')) {
+ this.loginForm.campusid = 1;
+ this.loginForm.orgid = 1;
+ } else if (selectedOrg.label.includes('鍚村北')) {
+ this.loginForm.campusid = 2;
+ this.loginForm.orgid = 1;
+ } else {
+ this.loginForm.campusid = 1; // 榛樿鍊兼垨鍏朵粬澶勭悊
+ this.loginForm.orgid = 1;
}
- });
- },
+ }
+
+ this.$store
+ .dispatch("Login", this.loginForm)
+ .then((res) => {
+ if (this.loginForm.username == "admin") {
+ this.$router.push({ path: "/index" }).catch(() => {});
+ } else {
+ this.$router
+ .push({ path: "/followvisit/discharge" })
+ .catch(() => {});
+ }
+ })
+ .catch(() => {
+ this.loading = false;
+ if (this.captchaEnabled) {
+ this.getCode();
+ }
+ });
+ }
+ });
+}
},
};
</script>
--
Gitblit v1.9.3