Commit 356013b0 by xue_wengang

字典管理、标识号串并

parent 00978c7c
......@@ -7,3 +7,5 @@ export const login = params =>
export const xzLogin = params =>
post("/api/dddl/xzLogin", params);
export const zdryLogin = params =>
post("/api2/doLogin", params);
......@@ -512,6 +512,7 @@ export default {
},
cxFormData: Object,
cxUrl: String,
childrenUrl:String,
header: String,
pageFlag: String,
},
......@@ -593,7 +594,7 @@ export default {
var index = self.tableData.findIndex(
(item) => item.xszajbh == row.xszajbh
);
post(this.cxUrl, formData).then((response) => {
post(this.childrenUrl, formData).then((response) => {
if (response.code == 200) {
self.tableData[index].children = response.data.data;
self.closeLoading();
......
......@@ -576,11 +576,9 @@ export default {
esAsjQuery(json)
.then((response) => {
if (response.code === 200) {
self.tableData = response.data.rows;
debugger
self.tableDataLength = response.count;
self.tPage = Math.ceil(response.count / self.page_size);
self.tableDataLength = response.data.total;
self.tPage = Math.ceil(response.data.total / self.page_size);
self.closeLoading();
} else {
/*self.$message({
......
......@@ -42,12 +42,29 @@ axios.interceptors.response.use(
const status = response.data.code;
const message = response.data.message;
var self = this
var relUrlIp = window.location.host.substring(
0,
window.location.host.length - 5
);
if (status < 0) {
Message({
message: message,
type: "error"
});
return Promise.reject(new Error(message));
}else if (status == "401") {
MessageBox.confirm("系统登录超时,请重新登录", "提示", {
confirmButtonText: "确定",
cancelButtonText: "取消",
type: "warning",
})
.then(() => {
if (relUrlIp == '26.3.13.120') {
window.location.href = 'http://26.3.13.120:3900/#/login';
} else {
window.location.href = 'http://localhost:8080/#/login';
}
})
}
return response.data;
},
......@@ -80,6 +97,19 @@ instance.interceptors.response.use(
type: "error"
});
return Promise.reject(new Error(message));
}else if (status == "401") {
MessageBox.confirm("系统登录超时,请重新登录", "提示", {
confirmButtonText: "确定",
cancelButtonText: "取消",
type: "warning",
})
.then(() => {
if (relUrlIp == '26.3.13.120') {
window.location.href = 'http://26.3.13.120:3900/#/login';
} else {
window.location.href = 'http://localhost:8080/#/login';
}
})
}
return response.data;
},
......@@ -92,13 +122,26 @@ json.interceptors.response.use(
response => {
const status = response.data.code;
const message = response.data.message;
if (status < 0) {
Message({
message: message,
type: "error"
});
return Promise.reject(new Error(message));
}else if (status == "401") {
MessageBox.confirm("系统登录超时,请重新登录", "提示", {
confirmButtonText: "确定",
cancelButtonText: "取消",
type: "warning",
})
.then(() => {
if (relUrlIp == '26.3.13.120') {
window.location.href = 'http://26.3.13.120:3900/#/login';
} else {
window.location.href = 'http://localhost:8080/#/login';
}
})
}
return response.data;
},
......
......@@ -6,6 +6,7 @@
:cxQueryField="cxQueryField"
:cxDefaultFormThead="cxDefaultFormThead"
:cxDefaultFormTheads="cxDefaultFormTheads"
:childrenUrl="childrenUrl"
:cxUrl="cxUrl"></right-content>
</div>
</template>
......@@ -283,6 +284,7 @@ export default {
],
cxUrl: "/api/cbxsz/toQueryXszxx",
updateCbxszUrl: "/api/cbxsz/updateCbxsz",
childrenUrl:"/api/cbxsz/listCbxszGlAsjxx"
};
},
methods: {},
......
......@@ -7,6 +7,7 @@
propBottonType="rgcb"
:cxDefaultFormThead="cxDefaultFormThead"
:cxDefaultFormTheads="cxDefaultFormTheads"
:childrenUrl='childrenUrl'
:cxUrl="cxUrl"></right-content>
</div>
</template>
......@@ -211,6 +212,7 @@ export default {
}
],
cxUrl: '/api/cbxsz/toQueryXszxx',
childrenUrl:"/api/cbxsz/listCbxszGlAsjxx"
}
}
}
......
......@@ -12,7 +12,7 @@
<div class="header-admin">
<span class="img-span"></span>
<span>欢迎您:</span>
<span>admin</span>
<span>冉处</span>
<span>系统管理员:</span>
</div>
<div class="header-nav">
......@@ -38,6 +38,7 @@
</template>
<script>
import { zdryLogin } from "@/api/home.js";
export default {
data() {
return {
......@@ -81,7 +82,11 @@ export default {
methods: {
goDetail(id) {
if (id == "/zdry") {
window.open('http://26.3.13.120:8080/zdGzry/index', "_blank");
zdryLogin({
zjhm: "34222419830726005X",
}).then((result) => {
window.open("http://26.3.13.120:8088/zdGzry/index", "_blank");
});
} else {
this.$router.pushToTab(id);
}
......
......@@ -329,7 +329,10 @@ export default {
zdSubmit(type) {
var self = this;
this.submitType = type;
debugger;
self.$set(self.formLabelAlign,'name','')
self.$set(self.formLabelAlign,'ms','')
if (this.submitType == "update") {
this.dialogName = "编辑字典";
} else if (this.submitType == "delete") {
......@@ -346,10 +349,10 @@ export default {
type: "warning",
});
} else {
self.formLabelAlign.group = self.seleteObj.groupname;
self.formLabelAlign.name = self.seleteObj.name;
self.formLabelAlign.parentCode = self.seleteObj.pname;
self.formLabelAlign.ms = self.seleteObj.description;
self.$set(self.formLabelAlign,'group',self.seleteObj.groupname)
self.$set(self.formLabelAlign,'name',self.seleteObj.name)
self.$set(self.formLabelAlign,'parentCode',self.seleteObj.pname)
self.$set(self.formLabelAlign,'ms',self.seleteObj.description)
this.zdDialogVisible = true;
}
}
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment