|
@@ -1,5 +1,8 @@
|
|
|
<template>
|
|
|
- <div class="pageConfig-box">
|
|
|
+
|
|
|
+ <div class="pageConfig-box" v-loading="isload" element-loading-text="拼命加载中"
|
|
|
+ element-loading-spinner="el-icon-loading"
|
|
|
+ element-loading-background="rgba(0, 0, 0, 0.8)" >
|
|
|
<div class="pageConfig-head">
|
|
|
<div style="display: flex;">
|
|
|
<div>
|
|
@@ -16,7 +19,7 @@
|
|
|
</div>
|
|
|
</div>
|
|
|
<div>
|
|
|
- <el-button type="primary" @click="pageload()" >刷 新</el-button>
|
|
|
+ <el-button type="primary" @click="isload=true; pageload()" >刷 新</el-button>
|
|
|
<el-button type="primary" @click="addPage" >添 加</el-button>
|
|
|
</div>
|
|
|
</div>
|
|
@@ -26,29 +29,28 @@
|
|
|
</el-table-column>
|
|
|
<el-table-column prop="systemMenuCode" label="页面Code" width="130">
|
|
|
</el-table-column>
|
|
|
- <el-table-column prop="webUrl" label="WebUrl" width="130" >
|
|
|
+ <el-table-column prop="webUrl" label="WebUrl" width="100" >
|
|
|
</el-table-column>
|
|
|
- <el-table-column prop="androidUrl" label="AndroidUrl" width="130">
|
|
|
+ <el-table-column prop="androidUrl" label="AndroidUrl" width="100">
|
|
|
</el-table-column>
|
|
|
- <el-table-column prop="iosUrl" label="IosUrl" width="130">
|
|
|
+ <el-table-column prop="iosUrl" label="IosUrl" width="100">
|
|
|
</el-table-column>
|
|
|
<el-table-column label="手机端图标" prop="icon" width="130" >
|
|
|
</el-table-column>
|
|
|
<el-table-column prop="pageIsEnable" label="web端启用" width="130">
|
|
|
<template slot-scope="scope">
|
|
|
- <el-checkbox :true-label="1" disabled :false-label="0" v-model="pageList[scope.$index].pageIsEnable" ></el-checkbox>
|
|
|
+ <el-checkbox :true-label="1" disabled :false-label="0" v-model="scope.row.pageIsEnable" ></el-checkbox>
|
|
|
</template>
|
|
|
</el-table-column>
|
|
|
<el-table-column prop="pagePhoneIsEnable" label="手机端启用" width="130">
|
|
|
<template slot-scope="scope">
|
|
|
- <el-checkbox :true-label="1" disabled :false-label="0" v-model="pageList[scope.$index].pagePhoneIsEnable" ></el-checkbox>
|
|
|
+ <el-checkbox :true-label="1" disabled :false-label="0" v-model="scope.row.pagePhoneIsEnable" ></el-checkbox>
|
|
|
</template>
|
|
|
</el-table-column>
|
|
|
<el-table-column label="操作" >
|
|
|
<template slot-scope="scope">
|
|
|
- <el-button type="primary" size="small" icon="el-icon-s-tools" @click="Edit(pageList[scope.$index])" >编 辑</el-button>
|
|
|
- <el-button type="primary" size="small" icon="el-icon-s-tools" @click="PageBindFun(pageList[scope.$index])" >功 能</el-button>
|
|
|
- <el-button type="danger" size="small" icon="el-icon-delete-solid" @click="Del(pageList[scope.$index])" >删 除</el-button>
|
|
|
+ <el-button type="primary" size="small" icon="el-icon-s-tools" @click="Edit(scope.row)" >编 辑</el-button>
|
|
|
+ <el-button type="danger" size="small" icon="el-icon-delete-solid" @click="Del(scope.row)" >删 除</el-button>
|
|
|
</template>
|
|
|
</el-table-column>
|
|
|
</el-table>
|
|
@@ -72,7 +74,7 @@
|
|
|
</span>
|
|
|
</el-dialog>
|
|
|
|
|
|
- <Modal :title="dialogTitle" :height="350" :width="700" :show.sync="showModal" restrict-to=".is-vertical" @close="showModal = false" >
|
|
|
+ <Modal :title="dialogTitle" :height="500" :width="700" :show.sync="showModal" restrict-to=".is-vertical" @close="showModal = false" >
|
|
|
<template v-slot:content>
|
|
|
<div style=" padding: 10px;">
|
|
|
<el-form label-position="left" label-width="80px" :model="pageBind" :rules="rules" ref="pageBind">
|
|
@@ -136,6 +138,19 @@
|
|
|
<el-checkbox label="Android是否启用" :true-label="1" :false-label="0" v-model="pageBind.pagePhoneIsEnable" ></el-checkbox>
|
|
|
</el-col>
|
|
|
</el-row>
|
|
|
+ <br/>
|
|
|
+ <br/>
|
|
|
+ <el-row>
|
|
|
+ <el-col :span="24">
|
|
|
+ <div class="=titleSpan">页面功能</div>
|
|
|
+ </el-col>
|
|
|
+ </el-row>
|
|
|
+ <br/>
|
|
|
+ <el-row :gutter="20">
|
|
|
+ <el-col :span="4" v-for="item in pageBindFun" :key="item.id" style="text-align: center;">
|
|
|
+ <el-checkbox :label="item.name" :true-label="1" :false-label="0" v-model="item.value"></el-checkbox>
|
|
|
+ </el-col>
|
|
|
+ </el-row>
|
|
|
</el-form>
|
|
|
</div>
|
|
|
</template>
|
|
@@ -199,7 +214,9 @@ export default {
|
|
|
,webUrl:[
|
|
|
{ required: true, message: '请输入WebUrl', trigger: 'blur' },
|
|
|
]
|
|
|
- }
|
|
|
+ },
|
|
|
+ pageBindFun:[],
|
|
|
+ isload:true,
|
|
|
};
|
|
|
},
|
|
|
methods: {
|
|
@@ -223,11 +240,18 @@ export default {
|
|
|
});
|
|
|
that.pageList = resp.data.data.viewList.data;
|
|
|
}
|
|
|
+ that.Inquirechange();
|
|
|
+ that.isload = false;
|
|
|
})
|
|
|
+
|
|
|
},
|
|
|
Inquirechange() {
|
|
|
-
|
|
|
var that = this;
|
|
|
+
|
|
|
+ if(this.ModulValue == ''){
|
|
|
+ this.ModulValue = -1 ;
|
|
|
+ }
|
|
|
+
|
|
|
if(this.ModulValue == -1){
|
|
|
this.pageList = this.bufferData.viewList.data;
|
|
|
}else{
|
|
@@ -235,7 +259,6 @@ export default {
|
|
|
return item.modulid == that.ModulValue;
|
|
|
});
|
|
|
}
|
|
|
-
|
|
|
this.currentPage = 1;
|
|
|
},
|
|
|
//每页条数改变时触发 选择一页显示多少行
|
|
@@ -249,6 +272,7 @@ export default {
|
|
|
},
|
|
|
//搜索按钮
|
|
|
btnSearch(){
|
|
|
+ this.ModulValue = -1;
|
|
|
var that = this;
|
|
|
this.pageList = this.bufferData.viewList.data.filter(function(item, i, arr) {
|
|
|
return item.pageName.indexOf(that.SearchInput) != -1;
|
|
@@ -273,6 +297,7 @@ export default {
|
|
|
sTid:5,
|
|
|
pageRemark:'',
|
|
|
};
|
|
|
+ this.PageQueryFun(-1);
|
|
|
},
|
|
|
Edit(page){
|
|
|
//this.dialogVisible = true;
|
|
@@ -295,6 +320,7 @@ export default {
|
|
|
sTid:page.sTid,
|
|
|
pageRemark:page.pageRemark,
|
|
|
};
|
|
|
+ this.PageQueryFun(page.pageid);
|
|
|
},
|
|
|
PageSave(){
|
|
|
var that = this;
|
|
@@ -304,13 +330,21 @@ export default {
|
|
|
this.$refs.pageBind.validate((valid) => {
|
|
|
if(valid){
|
|
|
resolve(true);
|
|
|
- }else{
|
|
|
+ }else{
|
|
|
reject(false);
|
|
|
}
|
|
|
});
|
|
|
})
|
|
|
|
|
|
p.then(resolve=>{
|
|
|
+
|
|
|
+ this.pageBind.FunArr = [];
|
|
|
+ this.pageBindFun.forEach(item => {
|
|
|
+ if(item.value){
|
|
|
+ this.pageBind.FunArr.push(item.id)
|
|
|
+ }
|
|
|
+ });
|
|
|
+
|
|
|
//新增
|
|
|
this.$axios.post(this.PathUrl + '/api/System/AddPageInfo', this.pageBind, {
|
|
|
headers: {
|
|
@@ -328,6 +362,7 @@ export default {
|
|
|
this.$message.error(resp.data.msg);
|
|
|
}
|
|
|
that.pageload();
|
|
|
+
|
|
|
})
|
|
|
}).catch(err=>{
|
|
|
console.log("表单验证未通过");
|
|
@@ -346,7 +381,15 @@ export default {
|
|
|
})
|
|
|
|
|
|
p.then(resolve=>{
|
|
|
- //新增
|
|
|
+
|
|
|
+ this.pageBind.FunArr = [];
|
|
|
+ this.pageBindFun.forEach(item => {
|
|
|
+ if(item.value){
|
|
|
+ this.pageBind.FunArr.push(item.id)
|
|
|
+ }
|
|
|
+ });
|
|
|
+
|
|
|
+ //编辑
|
|
|
this.$axios.post(this.PathUrl + '/api/System/EditPageInfo', this.pageBind, {
|
|
|
headers: {
|
|
|
'Authorization': 'Bearer eyJhbGciOiJIUzI1NiIsInR5cCI6IkpXVCJ9.eyJodHRwOi8vc2NoZW1hcy54bWxzb2FwLm9yZy93cy8yMDA1LzA1L2lkZW50aXR5L2NsYWltcy9uYW1laWRlbnRpZmllciI6IkZ1dHVyZSIsImV4cCI6MTY3OTU0MjgwNSwiaXNzIjoiT0FTeXN0ZW0uY29tIiwiYXVkIjoiT0FTeXN0ZW0uY29tIn0.iy5SUInq1p3yjZultRPyzCa2ekLeepSdMLxvPwXY6MI',
|
|
@@ -363,6 +406,7 @@ export default {
|
|
|
this.$message.error(resp.data.msg);
|
|
|
}
|
|
|
that.pageload();
|
|
|
+
|
|
|
})
|
|
|
}).catch(err=>{
|
|
|
console.log("表单验证未通过");
|
|
@@ -397,9 +441,28 @@ export default {
|
|
|
this.$message.error('网络错误!');
|
|
|
})
|
|
|
},
|
|
|
- PageBindFun(page){
|
|
|
+ PageQueryFun(pageid){
|
|
|
+
|
|
|
+ let that = this;
|
|
|
+ var bindFun = [];
|
|
|
|
|
|
+ this.$axios.post(this.PathUrl + '/api/System/QueryPageFunById',{
|
|
|
+ pageid:pageid,
|
|
|
+ bindFunArr:bindFun,
|
|
|
+ uid:235,
|
|
|
+ }, {
|
|
|
+ headers: {
|
|
|
+ 'Authorization': 'Bearer eyJhbGciOiJIUzI1NiIsInR5cCI6IkpXVCJ9.eyJodHRwOi8vc2NoZW1hcy54bWxzb2FwLm9yZy93cy8yMDA1LzA1L2lkZW50aXR5L2NsYWltcy9uYW1laWRlbnRpZmllciI6IkZ1dHVyZSIsImV4cCI6MTY3OTU0MjgwNSwiaXNzIjoiT0FTeXN0ZW0uY29tIiwiYXVkIjoiT0FTeXN0ZW0uY29tIn0.iy5SUInq1p3yjZultRPyzCa2ekLeepSdMLxvPwXY6MI',
|
|
|
+ }
|
|
|
+ }).then(resp => {
|
|
|
+ console.log(resp);
|
|
|
+ if (resp.data.code == 200) {
|
|
|
+ that.pageBindFun = resp.data.data;
|
|
|
+ }
|
|
|
|
|
|
+ }).catch(err=>{
|
|
|
+ this.$message.error('网络错误!');
|
|
|
+ })
|
|
|
}
|
|
|
|
|
|
|