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

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

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