Commit 37ff7554 authored by 赵啸非's avatar 赵啸非

Merge remote-tracking branch 'origin/master'

parents e599b1b1 644674bc
......@@ -14,6 +14,9 @@
:label-col="{ span: 4 }"
:wrapper-col="{ span: 20 }"
>
<a-form-model-item label="站点名称" prop="siteName">
<a-input v-model="form.siteName" disabled />
</a-form-model-item>
<a-form-model-item label="主题名称" prop="categoryName">
<a-input v-model="form.categoryName" placeholder="请输入主题名称" />
</a-form-model-item>
......@@ -110,6 +113,9 @@ export default {
onEdit(data) {
this.$nextTick(() => {
this.form = { ...data };
this.form.siteName = local.getLocal("siteName")
? local.getLocal("siteName")
: data.siteName;
if (this.form.cover) {
this.fileList = [
{
......
......@@ -357,13 +357,13 @@ export default {
}
},
},
watch: {
deptSearchVal(newVal) {
if (newVal === "") {
this.getDeptListData();
}
},
},
// watch: {
// deptSearchVal(newVal) {
// if (newVal === "") {
// this.getDeptListData();
// }
// },
// },
// 进入路由前
beforeRouteEnter(to, from, next) {
if (from.path === "/department/adddepartment") {
......@@ -401,13 +401,13 @@ export default {
});
},
// 获取部门列表
async getDeptListData(obj = {}) {
async getDeptListData() {
this.deptLoading = true;
let res = await getDeptList({
siteId: this.siteId,
page: 1,
size: -1,
...obj,
name: `%${this.deptSearchVal}%`,
});
this.deptLoading = false;
let { code, data } = res.data;
......@@ -481,7 +481,7 @@ export default {
let res = await delDept({ id: num });
let { code, msg } = res.data;
if (code === 1) {
_this.getDeptListData(_this.siteId);
_this.getDeptListData();
_this.$message.success(msg);
}
},
......@@ -501,11 +501,15 @@ export default {
deptId: this.deptId,
...obj,
});
let { code, data } = res.data;
if (code === 1) {
this.total = data.pageInfo.totalResult;
this.windowData = data.data;
this.loading = false;
if (res.data.code === 1) {
let { total, data } = res.data.data;
if (!data.length && this.page > 1) {
this.page -= 1;
this.getWindowListData();
}
this.total = total;
this.windowData = data;
}
},
// 新增窗口
......@@ -539,7 +543,7 @@ export default {
let res = await delWindow({ id: num });
let { code, msg } = res.data;
if (code === 1) {
_this.getWindowListData(_this.siteId);
_this.getWindowListData();
_this.$message.success(msg);
}
},
......@@ -560,8 +564,8 @@ export default {
this.getWindowListData();
},
// 左边搜索
onSearch(value) {
this.getDeptListData({ name: `%${value}%` });
onSearch() {
this.getDeptListData();
},
// 右边搜索
onSearchRight() {
......
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