| | |
| | | <el-button |
| | | type="primary" |
| | | plain |
| | | @click="Editsingletasksonyic('')" |
| | | @click="alterpatient('')" |
| | | > |
| | | ä¿ååºç¡ä¿¡æ¯ |
| | | </el-button> |
| | |
| | | // å¤ç 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("&"); // 转æ¢ä¸ºå符串 |
| | | } |
| | |
| | | } |
| | | 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; |
| | | } |
| | | }); |
| | |
| | | } |
| | | }); |
| | | }, |
| | | 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) { |
| | |
| | | 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: { |
| | |
| | | |
| | | // å®ä¹è¦æ¿æ¢çæ°æ§URL |
| | | var oldUrlBase = this.oldPattern; |
| | | var newUrlBase =this.newPattern; |
| | | var newUrlBase = this.newPattern; |
| | | |
| | | // è·åææçvideoå
ç´ |
| | | var videos = doc.querySelectorAll("video"); |
| | |
| | | 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); |
| | | }, |
| | | }, |
| | | }, |
| | |
| | | // è·åææçvideoå
ç´ |
| | | var videos = doc.querySelectorAll("video"); |
| | | var images = doc.querySelectorAll("img"); |
| | | console.log(videos, "videos"); |
| | | console.log(images, "images"); |
| | | |
| | | // éåææçvideoå
ç´ å¹¶æ¿æ¢src屿§ |
| | | videos.forEach(function (video) { |
| | | // å
æ£æ¥videoå
ç´ èªèº«çsrc屿§ |
| | | 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) { |
| | | // ç¶åæ£æ¥videoå
ç´ å
é¨çsourceåå
ç´ |
| | | 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)); |
| | |
| | | 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({ |
| | |
| | | }, |
| | | // æ¥è¯¢æ |
| | | getDeptTree() { |
| | | getheLibraryAssort({ hetype: 2 }).then((res) => { |
| | | getheLibraryAssort({ hetype: 1 }).then((res) => { |
| | | this.deptOptions = res.rows; |
| | | this.dialogFormVisible = false; |
| | | }); |
| ÎļþÃû´Ó src/views/login-sy.vue ÐÞ¸Ä |
| | |
| | | /> |
| | | </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 |
| | |
| | | code: "", |
| | | orgid: "H41010500003", |
| | | }, |
| | | options: [ |
| | | ], |
| | | options: [], |
| | | loginRules: { |
| | | username: [ |
| | | { required: true, trigger: "blur", message: "请è¾å
¥æ¨çè´¦å·" }, |
| | |
| | | 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, |
| | | })); |
| | | } |
| | | }); |
| | |
| | | }; |
| | | }, |
| | | 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> |
| | |
| | | /> |
| | | </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 |
| | |
| | | code: "", |
| | | orgid: "H41010500003", |
| | | }, |
| | | options: [], |
| | | options: [ |
| | | ], |
| | | loginRules: { |
| | | username: [ |
| | | { required: true, trigger: "blur", message: "请è¾å
¥æ¨çè´¦å·" }, |
| | |
| | | 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, |
| | | })); |
| | | } |
| | | }); |
| | |
| | | }; |
| | | }, |
| | | 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> |