Commit 0bc6ad56 authored by “yiyousong”'s avatar “yiyousong”

fix:修复接口数据层级问题

parent 2c5b995c
...@@ -34,6 +34,49 @@ ...@@ -34,6 +34,49 @@
img { img {
display: inline-block; display: inline-block;
} }
/* 弹性布局 */
.flex {
display: flex;
}
.flex1 {
flex: 1;
}
.flexc {
flex-direction: column;
}
.flexwrap {
flex-wrap: wrap;
}
.jcc {
justify-content: center;
}
.jca {
justify-content: space-around;
}
.jcb {
justify-content: space-between;
}
.jce {
justify-content: space-evenly;
}
.jc-start {
justify-content: flex-start;
}
.jc-end {
justify-content: flex-end;
}
.aic {
align-items: center;
}
.aca {
align-content: space-around;
}
.acb {
align-content: space-between;
}
.ace {
align-content: space-evenly;
}
/* margin */ /* margin */
.m10 { .m10 {
...@@ -461,7 +504,7 @@ img { ...@@ -461,7 +504,7 @@ img {
padding: 0 !important; padding: 0 !important;
& + .ant-btn-link { & + .ant-btn-link {
margin-left: 1rem !important; margin-left: 6px !important;
} }
} }
......
...@@ -104,8 +104,8 @@ export default { ...@@ -104,8 +104,8 @@ export default {
size: -1, size: -1,
siteId: this.siteId, siteId: this.siteId,
}); });
if (res.data.code == 1) { if (res.code == 1) {
let { data } = res.data.data; let { data } = res.data;
this.windowData = data; this.windowData = data;
} }
}, },
......
...@@ -137,8 +137,8 @@ export default { ...@@ -137,8 +137,8 @@ export default {
size: -1, size: -1,
siteId: this.siteId, siteId: this.siteId,
}); });
if (res.data.code == 1) { if (res.code == 1) {
let { data } = res.data.data; let { data } = res.data;
this.datingList = data; this.datingList = data;
} }
}, },
...@@ -150,8 +150,8 @@ export default { ...@@ -150,8 +150,8 @@ export default {
size: -1, size: -1,
siteId: this.siteId, siteId: this.siteId,
}); });
if (res.data.code == 1) { if (res.code == 1) {
let { data } = res.data.data; let { data } = res.data;
this.deptList = data; this.deptList = data;
} }
}, },
...@@ -162,8 +162,8 @@ export default { ...@@ -162,8 +162,8 @@ export default {
page: 1, page: 1,
size: -1, size: -1,
}); });
if (res.data.code == 1) { if (res.code == 1) {
let { data } = res.data.data; let { data } = res.data;
this.deviceData = data; this.deviceData = data;
} }
}, },
......
...@@ -137,8 +137,8 @@ export default { ...@@ -137,8 +137,8 @@ export default {
size: -1, size: -1,
siteId: this.siteId, siteId: this.siteId,
}); });
if (res.data.code == 1) { if (res.code == 1) {
let { data } = res.data.data; let { data } = res.data;
this.datingList = data; this.datingList = data;
} }
}, },
...@@ -150,8 +150,8 @@ export default { ...@@ -150,8 +150,8 @@ export default {
size: -1, size: -1,
siteId: this.siteId, siteId: this.siteId,
}); });
if (res.data.code == 1) { if (res.code == 1) {
let { data } = res.data.data; let { data } = res.data;
this.deptList = data; this.deptList = data;
} }
}, },
...@@ -159,8 +159,8 @@ export default { ...@@ -159,8 +159,8 @@ export default {
// 获取评价选项 // 获取评价选项
async getOptonList() { async getOptonList() {
let res = await getOptonList(); let res = await getOptonList();
if (res.data.code == 1) { if (res.code == 1) {
this.optonList = res.data.data; this.optonList = res.data;
} }
}, },
......
...@@ -81,8 +81,8 @@ export default { ...@@ -81,8 +81,8 @@ export default {
page: 1, page: 1,
size: -1, size: -1,
}); });
if (res.data.code == 1) { if (res.code == 1) {
let { data } = res.data; let { data } = res;
this.deviceData = data; this.deviceData = data;
} }
}, },
......
...@@ -88,8 +88,8 @@ export default { ...@@ -88,8 +88,8 @@ export default {
// 获取类型列表 // 获取类型列表
async getType() { async getType() {
let res = await getType(); let res = await getType();
if (res.data.code == 1) { if (res.code == 1) {
this.typeList = res.data.data; this.typeList = res.data;
} }
}, },
// 搜索 // 搜索
......
...@@ -95,8 +95,8 @@ export default { ...@@ -95,8 +95,8 @@ export default {
size: -1, size: -1,
siteId: this.siteId, siteId: this.siteId,
}); });
if (res.data.code == 1) { if (res.code == 1) {
let { data } = res.data.data; let { data } = res.data;
this.depList = data; this.depList = data;
} }
}, },
......
...@@ -137,8 +137,8 @@ export default { ...@@ -137,8 +137,8 @@ export default {
size: -1, size: -1,
siteId: this.siteId, siteId: this.siteId,
}); });
if (res.data.code == 1) { if (res.code == 1) {
let { data } = res.data.data; let { data } = res.data;
this.datingList = data; this.datingList = data;
} }
}, },
...@@ -150,8 +150,8 @@ export default { ...@@ -150,8 +150,8 @@ export default {
size: -1, size: -1,
siteId: this.siteId, siteId: this.siteId,
}); });
if (res.data.code == 1) { if (res.code == 1) {
let { data } = res.data.data; let { data } = res.data;
this.deptList = data; this.deptList = data;
} }
}, },
...@@ -159,8 +159,8 @@ export default { ...@@ -159,8 +159,8 @@ export default {
// 获取评价选项 // 获取评价选项
async getOptonList() { async getOptonList() {
let res = await getOptonList(); let res = await getOptonList();
if (res.data.code == 1) { if (res.code == 1) {
this.optonList = res.data.data; this.optonList = res.data;
} }
}, },
......
...@@ -90,8 +90,8 @@ export default { ...@@ -90,8 +90,8 @@ export default {
page: 1, page: 1,
size: -1, size: -1,
}); });
if (res.data.code == 1) { if (res.code == 1) {
let { data } = res.data; let { data } = res;
this.deviceData = data; this.deviceData = data;
} }
}, },
......
...@@ -69,8 +69,8 @@ export default { ...@@ -69,8 +69,8 @@ export default {
page: 1, page: 1,
size: -1, size: -1,
}); });
if (res.data.code == 1) { if (res.code == 1) {
let { data } = res.data; let { data } = res;
this.deviceData = data; this.deviceData = data;
} }
}, },
......
...@@ -141,8 +141,8 @@ export default { ...@@ -141,8 +141,8 @@ export default {
size: -1, size: -1,
siteId: this.siteId, siteId: this.siteId,
}); });
if (res.data.code == 1) { if (res.code == 1) {
let { data } = res.data.data; let { data } = res.data;
this.datingList = data; this.datingList = data;
} }
}, },
...@@ -154,8 +154,8 @@ export default { ...@@ -154,8 +154,8 @@ export default {
size: -1, size: -1,
siteId: this.siteId, siteId: this.siteId,
}); });
if (res.data.code == 1) { if (res.code == 1) {
let { data } = res.data.data; let { data } = res.data;
this.deptList = data; this.deptList = data;
} }
}, },
...@@ -166,8 +166,8 @@ export default { ...@@ -166,8 +166,8 @@ export default {
page: 1, page: 1,
size: -1, size: -1,
}); });
if (res.data.code == 1) { if (res.code == 1) {
let { data } = res.data.data; let { data } = res.data;
this.deviceData = data; this.deviceData = data;
} }
}, },
......
...@@ -137,8 +137,8 @@ export default { ...@@ -137,8 +137,8 @@ export default {
size: -1, size: -1,
siteId: this.siteId, siteId: this.siteId,
}); });
if (res.data.code == 1) { if (res.code == 1) {
let { data } = res.data.data; let { data } = res.data;
this.datingList = data; this.datingList = data;
} }
}, },
...@@ -150,8 +150,8 @@ export default { ...@@ -150,8 +150,8 @@ export default {
size: -1, size: -1,
siteId: this.siteId, siteId: this.siteId,
}); });
if (res.data.code == 1) { if (res.code == 1) {
let { data } = res.data.data; let { data } = res.data;
this.deptList = data; this.deptList = data;
} }
}, },
...@@ -159,8 +159,8 @@ export default { ...@@ -159,8 +159,8 @@ export default {
// 获取评价选项 // 获取评价选项
async getOptonList() { async getOptonList() {
let res = await getOptonList(); let res = await getOptonList();
if (res.data.code == 1) { if (res.code == 1) {
this.optonList = res.data.data; this.optonList = res.data;
} }
}, },
......
import Storage from "@/utils/js/Storage"; import Storage from "@/utils/js/Storage";
import store from "@/store";
// 修改密码权限 // 修改密码权限
export const permission = { export const permission = {
inserted: function (el, binding) { inserted: function (el, binding) {
const { value } = binding; const { value } = binding;
const roles = Storage.get(2, "userInfo").id; const roles = store.getters["user/userData"].id;
if (value) { if (value) {
const permissionRoles = value; const permissionRoles = value;
const hasPermission = permissionRoles.includes(roles); const hasPermission = permissionRoles.includes(roles);
......
...@@ -60,7 +60,7 @@ axios.interceptors.response.use( ...@@ -60,7 +60,7 @@ axios.interceptors.response.use(
} }
} }
// NProgress.done(); // NProgress.done();
return response; return response.data;
}, },
(error) => { (error) => {
if (error && error.response) { if (error && error.response) {
......
...@@ -13,7 +13,7 @@ ...@@ -13,7 +13,7 @@
.ant-btn { .ant-btn {
&+.ant-btn { &+.ant-btn {
margin-left: 1rem !important; margin-left: 6px !important;
} }
} }
......
...@@ -182,8 +182,8 @@ export default { ...@@ -182,8 +182,8 @@ export default {
...this.searchForm, ...this.searchForm,
...searchForm, ...searchForm,
}); });
if (res.data.code == 1) { if (res.code == 1) {
let { data, total } = res.data.data; let { data, total } = res.data;
list = data; list = data;
listTotal = total; listTotal = total;
} }
......
...@@ -195,8 +195,8 @@ export default { ...@@ -195,8 +195,8 @@ export default {
alarmTimeEnd: this.searchForm.time[1], alarmTimeEnd: this.searchForm.time[1],
...searchForm, ...searchForm,
}); });
if (res.data.code == 1) { if (res.code == 1) {
let { data, total } = res.data.data; let { data, total } = res.data;
list = data; list = data;
listTotal = total; listTotal = total;
} }
......
...@@ -187,8 +187,8 @@ export default { ...@@ -187,8 +187,8 @@ export default {
this.total = total; this.total = total;
this.tableData = data; this.tableData = data;
let res = await getCountImpossible({ ...this.searchForm }); let res = await getCountImpossible({ ...this.searchForm });
if (res.data.code == 1) { if (res.code == 1) {
let { reply_count, count } = res.data.data; let { reply_count, count } = res.data;
this.$emit("update", { this.$emit("update", {
total: count, total: count,
reply_count: reply_count, reply_count: reply_count,
...@@ -209,8 +209,8 @@ export default { ...@@ -209,8 +209,8 @@ export default {
...this.searchForm, ...this.searchForm,
...searchForm, ...searchForm,
}); });
if (res.data.code == 1) { if (res.code == 1) {
let { data, total } = res.data.data; let { data, total } = res.data;
list = data; list = data;
listTotal = total; listTotal = total;
} }
...@@ -312,7 +312,7 @@ export default { ...@@ -312,7 +312,7 @@ export default {
getImpossibleInfo({ getImpossibleInfo({
id: id, id: id,
}).then((res) => { }).then((res) => {
const { code, data } = res.data; const { code, data } = res;
if (code == 1) { if (code == 1) {
this.$refs.FormDetails.fromData = data; this.$refs.FormDetails.fromData = data;
this.visible = true; this.visible = true;
......
...@@ -242,9 +242,9 @@ export default { ...@@ -242,9 +242,9 @@ export default {
...this.searchForm, ...this.searchForm,
...searchForm, ...searchForm,
}); });
if (res.data.code == 1) { if (res.code == 1) {
let { data, total, picturesCount, trial, videosCount, designer } = let { data, total, picturesCount, trial, videosCount, designer } =
res.data.data; res.data;
list = data; list = data;
listTotal = total; listTotal = total;
picturesCount_total = picturesCount; picturesCount_total = picturesCount;
......
...@@ -105,8 +105,8 @@ export default { ...@@ -105,8 +105,8 @@ export default {
this.loading = true; this.loading = true;
this.designType = type; this.designType = type;
let res = await picInfoList({ customerId }); let res = await picInfoList({ customerId });
if (res.data.code == 1) { if (res.code == 1) {
let { data } = res.data.data; let { data } = res.data;
this.designList = data.filter((v) => v.designType == type) || []; this.designList = data.filter((v) => v.designType == type) || [];
} }
this.loading = false; this.loading = false;
......
...@@ -277,8 +277,8 @@ export default { ...@@ -277,8 +277,8 @@ export default {
...this.searchForm, ...this.searchForm,
...searchForm, ...searchForm,
}); });
if (res.data.code == 1) { if (res.code == 1) {
let { data, total } = res.data.data.data; let { data, total } = res.data.data;
list = data; list = data;
listTotal = total; listTotal = total;
} }
...@@ -385,8 +385,8 @@ export default { ...@@ -385,8 +385,8 @@ export default {
// 详情 // 详情
async checkInfo(id) { async checkInfo(id) {
let res = await getEvaData({ id }); let res = await getEvaData({ id });
if (res.data.code == 1) { if (res.code == 1) {
let { data } = res.data; let { data } = res;
this.title = "评价详情"; this.title = "评价详情";
this.detailsInfo = data; this.detailsInfo = data;
this.detailsVisible = true; this.detailsVisible = true;
...@@ -407,7 +407,7 @@ export default { ...@@ -407,7 +407,7 @@ export default {
let res = await getEvaDetil({ let res = await getEvaDetil({
id, id,
}); });
let { code, msg } = res.data; let { code, msg } = res;
if (code == 1) { if (code == 1) {
_this.$message.success(msg); _this.$message.success(msg);
_this.getEvaList(); _this.getEvaList();
......
...@@ -274,8 +274,8 @@ export default { ...@@ -274,8 +274,8 @@ export default {
...this.searchForm, ...this.searchForm,
...searchForm, ...searchForm,
}); });
if (res.data.code == 1) { if (res.code == 1) {
let { data, total } = res.data.data.data; let { data, total } = res.data.data;
list = data; list = data;
listTotal = total; listTotal = total;
} }
...@@ -382,8 +382,8 @@ export default { ...@@ -382,8 +382,8 @@ export default {
// 详情 // 详情
async checkInfo(id) { async checkInfo(id) {
let res = await getQueEvaData({ id }); let res = await getQueEvaData({ id });
if (res.data.code == 1) { if (res.code == 1) {
let { data } = res.data; let { data } = res;
this.detailsInfo = data; this.detailsInfo = data;
this.detailsVisible = true; this.detailsVisible = true;
} }
...@@ -403,7 +403,7 @@ export default { ...@@ -403,7 +403,7 @@ export default {
let res = await getEvaDetil({ let res = await getEvaDetil({
id, id,
}); });
let { code, msg } = res.data; let { code, msg } = res;
if (code == 1) { if (code == 1) {
_this.$message.success(msg); _this.$message.success(msg);
_this.getEvaList(); _this.getEvaList();
......
...@@ -274,8 +274,8 @@ export default { ...@@ -274,8 +274,8 @@ export default {
...this.searchForm, ...this.searchForm,
...searchForm, ...searchForm,
}); });
if (res.data.code == 1) { if (res.code == 1) {
let { data, total } = res.data.data.data; let { data, total } = res.data.data;
list = data; list = data;
listTotal = total; listTotal = total;
} }
...@@ -382,8 +382,8 @@ export default { ...@@ -382,8 +382,8 @@ export default {
// 详情 // 详情
async checkInfo(id) { async checkInfo(id) {
let res = await getEvaData({ id }); let res = await getEvaData({ id });
if (res.data.code == 1) { if (res.code == 1) {
let { data } = res.data; let { data } = res;
this.title = "评价详情"; this.title = "评价详情";
this.detailsInfo = data; this.detailsInfo = data;
this.detailsVisible = true; this.detailsVisible = true;
...@@ -404,7 +404,7 @@ export default { ...@@ -404,7 +404,7 @@ export default {
let res = await getEvaDetil({ let res = await getEvaDetil({
id, id,
}); });
let { code, msg } = res.data; let { code, msg } = res;
if (code == 1) { if (code == 1) {
_this.$message.success(msg); _this.$message.success(msg);
_this.getEvaList(); _this.getEvaList();
......
...@@ -224,8 +224,8 @@ export default { ...@@ -224,8 +224,8 @@ export default {
pramse.materialName = `%${this.searchForm.searchName}%`; pramse.materialName = `%${this.searchForm.searchName}%`;
} }
let res = await getPrintList(pramse); let res = await getPrintList(pramse);
if (res.data.code == 1) { if (res.code == 1) {
let { data, total } = res.data.data; let { data, total } = res.data;
this.total = total; this.total = total;
this.tableData = data; this.tableData = data;
this.$emit("update", { total, time: this.searchForm.time }); this.$emit("update", { total, time: this.searchForm.time });
......
...@@ -293,8 +293,8 @@ export default { ...@@ -293,8 +293,8 @@ export default {
...this.searchForm, ...this.searchForm,
...searchForm, ...searchForm,
}); });
if (res.data.code == 1) { if (res.code == 1) {
let { data, total } = res.data.data; let { data, total } = res.data;
list = data; list = data;
listTotal = total; listTotal = total;
} }
...@@ -385,8 +385,8 @@ export default { ...@@ -385,8 +385,8 @@ export default {
// 详情 // 详情
async checkInfo({ id }) { async checkInfo({ id }) {
let res = await getOrderinfo({ id }); let res = await getOrderinfo({ id });
if (res.data.code == 1) { if (res.code == 1) {
this.detailsInfo = res.data.data; this.detailsInfo = res.data;
this.visible = true; this.visible = true;
} }
}, },
......
...@@ -210,8 +210,8 @@ export default { ...@@ -210,8 +210,8 @@ export default {
search: this.searchForm.search, search: this.searchForm.search,
...searchForm, ...searchForm,
}); });
if (res.data.code == 1) { if (res.code == 1) {
let { data, total } = res.data.data; let { data, total } = res.data;
list = data; list = data;
listTotal = total; listTotal = total;
} }
......
...@@ -136,8 +136,8 @@ export default { ...@@ -136,8 +136,8 @@ export default {
...this.searchForm, ...this.searchForm,
...searchForm, ...searchForm,
}); });
if (res.data.code == 1) { if (res.code == 1) {
let { data, total } = res.data.data; let { data, total } = res.data;
list = data; list = data;
listTotal = total; listTotal = total;
} }
......
...@@ -259,8 +259,8 @@ export default { ...@@ -259,8 +259,8 @@ export default {
...this.searchForm, ...this.searchForm,
...searchForm, ...searchForm,
}); });
if (res.data.code == 1) { if (res.code == 1) {
let { data, total } = res.data.data; let { data, total } = res.data;
list = data; list = data;
listTotal = total; listTotal = total;
} }
...@@ -345,8 +345,8 @@ export default { ...@@ -345,8 +345,8 @@ export default {
// 查看信息 // 查看信息
checkInfo(id) { checkInfo(id) {
letterInfo({ id }).then((res) => { letterInfo({ id }).then((res) => {
if (res.data.code == 1) { if (res.code == 1) {
let { data } = res.data; let { data } = res;
this.$refs.FormDetails.fromData = data; this.$refs.FormDetails.fromData = data;
this.visible = true; this.visible = true;
} }
......
...@@ -242,8 +242,8 @@ export default { ...@@ -242,8 +242,8 @@ export default {
this.total = total; this.total = total;
this.tableData = data; this.tableData = data;
let res = await getWLLZCount({ ...this.searchForm, siteid: this.siteId }); let res = await getWLLZCount({ ...this.searchForm, siteid: this.siteId });
if (res.data.code == 1) { if (res.code == 1) {
let { all_count, hf_count } = res.data.data; let { all_count, hf_count } = res.data;
this.$emit("update", { this.$emit("update", {
JYCount: all_count, JYCount: all_count,
HFCount: hf_count, HFCount: hf_count,
...@@ -264,8 +264,8 @@ export default { ...@@ -264,8 +264,8 @@ export default {
...this.searchForm, ...this.searchForm,
...searchForm, ...searchForm,
}); });
if (res.data.code == 1) { if (res.code == 1) {
let { data, total } = res.data.data; let { data, total } = res.data;
list = data; list = data;
listTotal = total; listTotal = total;
} }
...@@ -381,7 +381,7 @@ export default { ...@@ -381,7 +381,7 @@ export default {
getWLLZInfo({ getWLLZInfo({
id: id, id: id,
}).then((res) => { }).then((res) => {
const { code, data } = res.data; const { code, data } = res;
if (code == 1) { if (code == 1) {
this.$refs.FormDetails.fromData = data; this.$refs.FormDetails.fromData = data;
this.visible = true; this.visible = true;
......
...@@ -193,8 +193,8 @@ export default { ...@@ -193,8 +193,8 @@ export default {
...this.searchForm, ...this.searchForm,
...searchForm, ...searchForm,
}); });
if (res.data.code == 1) { if (res.code == 1) {
let { data, total } = res.data.data; let { data, total } = res.data;
list = data; list = data;
listTotal = total; listTotal = total;
} }
......
...@@ -162,8 +162,8 @@ export default { ...@@ -162,8 +162,8 @@ export default {
...this.searchForm, ...this.searchForm,
...searchForm, ...searchForm,
}); });
if (res.data.code == 1) { if (res.code == 1) {
let { data, total } = res.data.data; let { data, total } = res.data;
list = data; list = data;
listTotal = total; listTotal = total;
} }
......
...@@ -202,8 +202,8 @@ export default { ...@@ -202,8 +202,8 @@ export default {
...this.searchForm, ...this.searchForm,
...searchForm, ...searchForm,
}); });
if (res.data.code == 1) { if (res.code == 1) {
let { data, total } = res.data.data; let { data, total } = res.data;
list = data; list = data;
listTotal = total; listTotal = total;
} }
......
...@@ -354,8 +354,8 @@ export default { ...@@ -354,8 +354,8 @@ export default {
siteId: this.siteId, siteId: this.siteId,
...this.searchForm, ...this.searchForm,
}); });
if (res.data.code == 1) { if (res.code == 1) {
let { data, total } = res.data.data; let { data, total } = res.data;
this.total = total; this.total = total;
this.tableData = data; this.tableData = data;
this.$emit("update", { total, time: this.searchForm.time }); this.$emit("update", { total, time: this.searchForm.time });
...@@ -377,8 +377,8 @@ export default { ...@@ -377,8 +377,8 @@ export default {
peopleid: row.peopleid, peopleid: row.peopleid,
time: this.searchForm.time, time: this.searchForm.time,
}); });
if (res.data.code == 1) { if (res.code == 1) {
let { data } = res.data; let { data } = res;
this.userInfo = { ...row, ...data }; this.userInfo = { ...row, ...data };
} }
this.userInfoVisible = true; this.userInfoVisible = true;
...@@ -390,8 +390,8 @@ export default { ...@@ -390,8 +390,8 @@ export default {
businessid: row.businessid, businessid: row.businessid,
time: this.searchForm.time, time: this.searchForm.time,
}); });
if (res.data.code == 1) { if (res.code == 1) {
let { data } = res.data; let { data } = res;
let { business } = row; let { business } = row;
this.businessName = business; this.businessName = business;
this.businessInfo = data; this.businessInfo = data;
...@@ -408,8 +408,8 @@ export default { ...@@ -408,8 +408,8 @@ export default {
let result = await getWorkerInfo({ let result = await getWorkerInfo({
id, id,
}); });
let { data } = res.data; let { data } = res;
this.workerInfo = { ...data, ...result.data.data }; this.workerInfo = { ...data, ...result.data };
this.workerInfoVisible = true; this.workerInfoVisible = true;
}, },
...@@ -418,8 +418,8 @@ export default { ...@@ -418,8 +418,8 @@ export default {
let res = await getQueueInfo({ let res = await getQueueInfo({
id, id,
}); });
if (res.data.code == 1) { if (res.code == 1) {
let { data } = res.data; let { data } = res;
this.detailsInfo = data; this.detailsInfo = data;
this.detailsVisible = true; this.detailsVisible = true;
} }
......
...@@ -217,7 +217,7 @@ export default { ...@@ -217,7 +217,7 @@ export default {
}, },
// 转换时间为秒 // 转换时间为秒
timeToSec(time) { timeToSec(time) {
if (time !== null && time !== undefined) { if (time) {
var s = ""; var s = "";
if (time.includes("分钟") && time.includes("")) { if (time.includes("分钟") && time.includes("")) {
var min = time.split("分钟")[0]; var min = time.split("分钟")[0];
...@@ -225,6 +225,8 @@ export default { ...@@ -225,6 +225,8 @@ export default {
s = Number(min * 60) + Number(sec); s = Number(min * 60) + Number(sec);
return s; return s;
} }
} else {
return 0;
} }
}, },
}, },
......
...@@ -347,8 +347,8 @@ export default { ...@@ -347,8 +347,8 @@ export default {
siteId: this.siteId, siteId: this.siteId,
...this.searchForm, ...this.searchForm,
}); });
if (res.data.code == 1) { if (res.code == 1) {
let { data, total } = res.data.data; let { data, total } = res.data;
this.total = total; this.total = total;
this.tableData = data; this.tableData = data;
this.$emit("update", { total, time: this.searchForm.time }); this.$emit("update", { total, time: this.searchForm.time });
...@@ -370,8 +370,8 @@ export default { ...@@ -370,8 +370,8 @@ export default {
peopleid: row.peopleid, peopleid: row.peopleid,
time: this.searchForm.time, time: this.searchForm.time,
}); });
if (res.data.code == 1) { if (res.code == 1) {
let { data } = res.data; let { data } = res;
this.userInfo = { ...row, ...data }; this.userInfo = { ...row, ...data };
} }
this.userInfoVisible = true; this.userInfoVisible = true;
...@@ -383,8 +383,8 @@ export default { ...@@ -383,8 +383,8 @@ export default {
businessid: row.businessid, businessid: row.businessid,
time: this.searchForm.time, time: this.searchForm.time,
}); });
if (res.data.code == 1) { if (res.code == 1) {
let { data } = res.data; let { data } = res;
let { business } = row; let { business } = row;
this.businessName = business; this.businessName = business;
this.businessInfo = data; this.businessInfo = data;
...@@ -401,8 +401,8 @@ export default { ...@@ -401,8 +401,8 @@ export default {
let result = await getWorkerInfo({ let result = await getWorkerInfo({
id, id,
}); });
let { data } = res.data; let { data } = res;
this.workerInfo = { ...data, ...result.data.data }; this.workerInfo = { ...data, ...result.data };
this.workerInfoVisible = true; this.workerInfoVisible = true;
}, },
...@@ -411,8 +411,8 @@ export default { ...@@ -411,8 +411,8 @@ export default {
let res = await getQueueInfo({ let res = await getQueueInfo({
id, id,
}); });
if (res.data.code == 1) { if (res.code == 1) {
let { data } = res.data; let { data } = res;
this.detailsInfo = data; this.detailsInfo = data;
this.detailsVisible = true; this.detailsVisible = true;
} }
......
...@@ -187,8 +187,8 @@ export default { ...@@ -187,8 +187,8 @@ export default {
pramse.materialName = `%${this.searchForm.searchName}%`; pramse.materialName = `%${this.searchForm.searchName}%`;
} }
let res = await getBillList(pramse); let res = await getBillList(pramse);
if (res.data.code == 1) { if (res.code == 1) {
let { data, total } = res.data.data; let { data, total } = res.data;
this.total = total; this.total = total;
this.tableData = data; this.tableData = data;
this.$emit("update", { total, time: this.searchForm.time }); this.$emit("update", { total, time: this.searchForm.time });
......
...@@ -146,14 +146,14 @@ export default { ...@@ -146,14 +146,14 @@ export default {
// 获取数据分类列表 // 获取数据分类列表
async censusListInterface() { async censusListInterface() {
let res = await censusListInterface({ siteId: this.siteId }); let res = await censusListInterface({ siteId: this.siteId });
if (res.data.code == 1) { if (res.code == 1) {
let { let {
CensusType_1, CensusType_1,
CensusType_2, CensusType_2,
CensusType_3, CensusType_3,
CensusType_4, CensusType_4,
CensusType_5, CensusType_5,
} = res.data.data.data; } = res.data.data;
if (CensusType_1 && CensusType_1.length) if (CensusType_1 && CensusType_1.length)
this.CensusType_1 = CensusType_1.filter((v) => v.status != 0); this.CensusType_1 = CensusType_1.filter((v) => v.status != 0);
if (CensusType_2 && CensusType_2.length) if (CensusType_2 && CensusType_2.length)
......
...@@ -121,7 +121,7 @@ export default { ...@@ -121,7 +121,7 @@ export default {
loginName: encrypt(this.form.loginName), loginName: encrypt(this.form.loginName),
password: encrypt(this.form.password), password: encrypt(this.form.password),
}); });
let { code, data } = res.data; let { code, data } = res;
if (code == 1) { if (code == 1) {
let { siteList, user, token } = data; let { siteList, user, token } = data;
this.set_token(token); this.set_token(token);
......
...@@ -44,12 +44,12 @@ ...@@ -44,12 +44,12 @@
> >
<a-button <a-button
:style=" :style="
userInfo.id == record.id userData.id == record.id
? { color: '#3333' } ? { color: '#3333' }
: { color: '#ff4420' } : { color: '#ff4420' }
" "
type="link" type="link"
:disabled="userInfo.id === record.id" :disabled="userData.id === record.id"
@click="deleteRole(record, index)" @click="deleteRole(record, index)"
>删除</a-button >删除</a-button
> >
...@@ -70,11 +70,11 @@ ...@@ -70,11 +70,11 @@
import { deepClone } from "@/utils/js/common.js"; import { deepClone } from "@/utils/js/common.js";
import { roleList, roleDelete } from "@/api/authorityMis.js"; import { roleList, roleDelete } from "@/api/authorityMis.js";
import AddEditRole from "./components/addEditRole.vue"; import AddEditRole from "./components/addEditRole.vue";
import { mapState } from "vuex";
export default { export default {
name: "PortalAdminVueAuthorityMis", name: "PortalAdminVueAuthorityMis",
data() { data() {
return { return {
userInfo: {},
searchRoleName: undefined, searchRoleName: undefined,
tableLoading: false, tableLoading: false,
tablePagination: { tablePagination: {
...@@ -131,18 +131,10 @@ export default { ...@@ -131,18 +131,10 @@ export default {
components: { components: {
AddEditRole, AddEditRole,
}, },
computed: {
...mapState("user", ["userData"]),
},
created() { created() {
// for (let key = 0; key < 20; key++) {
// this.tableSourceData.push({
// key: `00${key + 1}`,
// name: `超级管理员${key + 1}`,
// remark: `该角色定义为省级权限${key + 1}`,
// });
// }
localStorage.getItem("userInfo")
? (this.userInfo = JSON.parse(localStorage.getItem("userInfo")))
: "";
console.log(this.userInfo);
this.getRoleList(); this.getRoleList();
}, },
methods: { methods: {
......
...@@ -56,7 +56,9 @@ ...@@ -56,7 +56,9 @@
</a-form-model> </a-form-model>
<div slot="footer"> <div slot="footer">
<a-button style="margin-left: 10px" @click="resetForm">重置</a-button> <a-button style="margin-left: 10px" @click="resetForm">重置</a-button>
<a-button type="primary" class="addclass" @click="onSubmit">确定</a-button> <a-button type="primary" class="addclass" @click="onSubmit"
>确定</a-button
>
</div> </div>
</a-modal> </a-modal>
</div> </div>
......
...@@ -180,12 +180,12 @@ ...@@ -180,12 +180,12 @@
<script> <script>
import { roleInfo, assignMenuToRole } from "@/api/authorityMis.js"; import { roleInfo, assignMenuToRole } from "@/api/authorityMis.js";
// import { deepClone, childrenTreeNode } from "@/utils/js/common.js"; // import { deepClone, childrenTreeNode } from "@/utils/js/common.js";
import menu from "@/mixins/menu"; // import menu from "@/mixins/menu";
import { menuFindAllTree } from "@/api/menuMgmt"; import { menuFindAllTree } from "@/api/menuMgmt";
// import common from "@/mixins/common"; // import common from "@/mixins/common";
export default { export default {
// mixins: [common], // mixins: [common],
mixins: [menu], // mixins: [menu],
name: "PortalAdminVueSetMenuPerms", name: "PortalAdminVueSetMenuPerms",
data() { data() {
return { return {
...@@ -216,7 +216,7 @@ export default { ...@@ -216,7 +216,7 @@ export default {
}; };
}, },
created() { created() {
this.getMenuList(true); // this.getMenuList(true);
this.getRoleInfo(); this.getRoleInfo();
this.menuFindAllTree(); this.menuFindAllTree();
}, },
......
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