flat: 暂存

This commit is contained in:
Apcallover
2024-05-14 16:26:07 +08:00
parent 5f4363ce89
commit 31d259b313
6 changed files with 17 additions and 12 deletions

View File

@@ -16,6 +16,7 @@ import { mapGetters } from "vuex";
function getProv(code) { function getProv(code) {
return code.substring(0, 2) + "0000"; return code.substring(0, 2) + "0000";
} }
function getCity(code) { function getCity(code) {
return code.substring(0, 4) + "00"; return code.substring(0, 4) + "00";
} }
@@ -41,14 +42,14 @@ export default {
computed: { computed: {
...mapGetters(["area"]), ...mapGetters(["area"]),
prov() { prov() {
if (this.county) { if (this.county && this.county != -1) {
return getProv(this.county); return getProv(this.county);
} else { } else {
return ""; return "";
} }
}, },
city() { city() {
if (this.county) { if (this.county && this.county != -1) {
return getCity(this.county); return getCity(this.county);
} else { } else {
return ""; return "";
@@ -60,6 +61,7 @@ export default {
}, },
set(val) { set(val) {
this.$emit("input", val); this.$emit("input", val);
return val;
}, },
}, },
model: { model: {
@@ -71,7 +73,7 @@ export default {
} }
}, },
get() { get() {
if (this.county) { if (this.county && this.county != -1) {
return [this.prov, this.city, this.county]; return [this.prov, this.city, this.county];
} }
return null; return null;

View File

@@ -56,7 +56,8 @@ import topLang from "@/page/index/top/top-lang";
// import { info } from "@/api/system/tenant"; // import { info } from "@/api/system/tenant";
import {getCaptcha} from "@/api/user"; import {getCaptcha} from "@/api/user";
if (/(^http)(s?):\/\/([a-z0-9].+)(\/manage$)/.test(location.href)) { console.log('是否跳转', /(^http)(s?):\/\/([a-z0-9].+)\/manage(\/)?$/i.test(location.href), location.href)
if (/(^http)(s?):\/\/([a-z0-9].+)\/manage(\/)?$/i.test(location.href)) {
window.location.href = 'http://10.160.7.216:9920/casserver/login?service=http://10.165.0.77/manage/login&stService=http%3A%2F%2F10.165.0.77%2Fmanage%2Flogin' window.location.href = 'http://10.160.7.216:9920/casserver/login?service=http://10.165.0.77/manage/login&stService=http%3A%2F%2F10.165.0.77%2Fmanage%2Flogin'
} }
if (/(\/login\?)(.*)/ig.test(location.href)) { if (/(\/login\?)(.*)/ig.test(location.href)) {

View File

@@ -29,15 +29,16 @@ function format(data) {
} else { } else {
dic[item.areaId] = node; dic[item.areaId] = node;
} }
node.valueId = node.value const nodeCopy = JSON.parse(JSON.stringify(node))
node.value = item.areaName nodeCopy.valueId = nodeCopy.value
nodeCopy.value = item.areaName
if (labelChild.hasOwnProperty(item.parentId)) { if (labelChild.hasOwnProperty(item.parentId)) {
if (!labelChild[item.parentId].children) { if (!labelChild[item.parentId].children) {
labelChild[item.parentId].children = []; labelChild[item.parentId].children = [];
} }
labelChild[item.parentId].children.push(node); labelChild[item.parentId].children.push(nodeCopy);
} else { } else {
labelChild[item.parentId] = {children: [node]}; labelChild[item.parentId] = {children: [nodeCopy]};
} }
}); });
return {data: result, dic, labelData: labelResult}; return {data: result, dic, labelData: labelResult};

View File

@@ -165,6 +165,7 @@ export default {
} }
} }
return { return {
type: "",
insureTypeList: [//商保下拉框 insureTypeList: [//商保下拉框
{ {
label: "停用", label: "停用",

View File

@@ -626,7 +626,7 @@ export default {
dicUrl: "/api/jobslink-api/system/dict-biz/dictionary?code=company_nature", dicUrl: "/api/jobslink-api/system/dict-biz/dictionary?code=company_nature",
props: { props: {
label: "dictValue", label: "dictValue",
value: "dictkey", value: "dictKey",
}, },
rules: [ rules: [
{ {

View File

@@ -748,7 +748,7 @@ export default {
dicUrl: "/api/jobslink-api/system/dict-biz/dictionary?code=company_nature", dicUrl: "/api/jobslink-api/system/dict-biz/dictionary?code=company_nature",
props: { props: {
label: "dictValue", label: "dictValue",
value: "dictkey", value: "dictKey",
}, },
rules: [ rules: [
{ {