|
@@ -1,8 +1,10 @@
|
|
|
<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>
|
|
|
+ <!-- <div>
|
|
|
<el-select @change="Inquirechange()" v-model="ModulValue" clearable placeholder="全部模块">
|
|
|
<el-option v-for="item in ModulList" :key="item.value" :label="item.name" :value="item.id">
|
|
|
</el-option>
|
|
@@ -13,41 +15,27 @@
|
|
|
<el-input placeholder="请输入页面名称" v-model="SearchInput" clearable></el-input>
|
|
|
|
|
|
<el-button type="primary" @click="btnSearch" >搜 索</el-button>
|
|
|
- </div>
|
|
|
+ </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>
|
|
|
<div class="pageConfig-table">
|
|
|
<el-table :data="pageList.slice((currentPage - 1) * pageSize, currentPage * pageSize)" border style="width: 100%">
|
|
|
- <el-table-column prop="pageName" label="页面名称" width="130" >
|
|
|
- </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="functionName" label="功能名称" >
|
|
|
</el-table-column>
|
|
|
- <el-table-column prop="androidUrl" label="AndroidUrl" width="130">
|
|
|
+ <el-table-column prop="functionCode" label="功能权限Code" >
|
|
|
</el-table-column>
|
|
|
- <el-table-column prop="iosUrl" label="IosUrl" width="130">
|
|
|
- </el-table-column>
|
|
|
- <el-table-column label="手机端图标" prop="icon" width="130" >
|
|
|
- </el-table-column>
|
|
|
- <el-table-column prop="pageIsEnable" label="web端启用" width="130">
|
|
|
+ <el-table-column prop="isEnable" label="是否启用" >
|
|
|
<template slot-scope="scope">
|
|
|
- <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="scope.row.pagePhoneIsEnable" ></el-checkbox>
|
|
|
+ <el-checkbox :true-label="1" disabled :false-label="0" v-model="scope.row.isEnable" ></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(scope.row)" >编 辑</el-button>
|
|
|
- <el-button type="primary" size="small" icon="el-icon-s-tools" @click="PageBindFun(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>
|
|
@@ -60,82 +48,30 @@
|
|
|
</div>
|
|
|
</div>
|
|
|
|
|
|
- <el-dialog
|
|
|
- title="提示"
|
|
|
- width="30%"
|
|
|
- :visible.sync="dialogVisible"
|
|
|
- :modal-append-to-body='false'
|
|
|
- :append-to-body="false"
|
|
|
- >
|
|
|
- <span>这是一段信息</span>
|
|
|
- <span slot="footer" class="dialog-footer">
|
|
|
- </span>
|
|
|
- </el-dialog>
|
|
|
-
|
|
|
- <Modal :title="dialogTitle" :height="350" :width="700" :show.sync="showModal" restrict-to=".is-vertical" @close="showModal = false" >
|
|
|
+ <Modal :title="dialogTitle" :height="300" :width="400" :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">
|
|
|
+ <el-form label-position="left" label-width="100px" :model="pageBind" :rules="rules" ref="pageBind">
|
|
|
<el-row :gutter="20">
|
|
|
- <el-col :span="8">
|
|
|
- <el-form-item label="页面模块" prop="modulid"> <!--style="width: 48%;" -->
|
|
|
- <el-select v-model="pageBind.modulid" placeholder="请选择">
|
|
|
- <el-option
|
|
|
- v-for="item in Modulfiltr"
|
|
|
- :key="item.id"
|
|
|
- :label="item.name"
|
|
|
- :value="item.id">
|
|
|
- </el-option>
|
|
|
- </el-select>
|
|
|
- </el-form-item>
|
|
|
- </el-col>
|
|
|
- <el-col :span="8">
|
|
|
- <el-form-item label="页面名称" prop="pageName"> <!--style="width: 48%;" -->
|
|
|
- <el-input v-model="pageBind.pageName"></el-input>
|
|
|
- </el-form-item>
|
|
|
- </el-col>
|
|
|
- <el-col :span="8">
|
|
|
- <el-form-item label="页面代码" prop="systemMenuCode" >
|
|
|
- <el-input v-model="pageBind.systemMenuCode"></el-input>
|
|
|
- </el-form-item>
|
|
|
- </el-col>
|
|
|
- </el-row>
|
|
|
- <el-row :gutter="20">
|
|
|
- <el-col :span="8">
|
|
|
- <el-form-item label="webUrl" prop="webUrl" >
|
|
|
- <el-input v-model="pageBind.webUrl"></el-input>
|
|
|
- </el-form-item>
|
|
|
- </el-col>
|
|
|
- <el-col :span="8">
|
|
|
- <el-form-item label="AndroidUrl">
|
|
|
- <el-input v-model="pageBind.androidUrl"></el-input>
|
|
|
- </el-form-item>
|
|
|
- </el-col>
|
|
|
- <el-col :span="8">
|
|
|
- <el-form-item label="IosUrl">
|
|
|
- <el-input v-model="pageBind.iosUrl"></el-input>
|
|
|
+ <el-col :span="24">
|
|
|
+ <el-form-item label="功能名称" prop="functionName" >
|
|
|
+ <el-input v-model="pageBind.functionName"></el-input>
|
|
|
</el-form-item>
|
|
|
</el-col>
|
|
|
</el-row>
|
|
|
<el-row :gutter="20">
|
|
|
- <el-col :span="8">
|
|
|
- <el-form-item label="图标">
|
|
|
- <el-input v-model="pageBind.icon"></el-input>
|
|
|
+ <el-col :span="24">
|
|
|
+ <el-form-item label="功能Code" prop="functionCode" >
|
|
|
+ <el-input v-model="pageBind.functionCode"></el-input>
|
|
|
</el-form-item>
|
|
|
</el-col>
|
|
|
- <el-col :span="16">
|
|
|
- <el-form-item label="页面备注">
|
|
|
- <el-input v-model="pageBind.pageRemark"></el-input>
|
|
|
- </el-form-item>
|
|
|
- </el-col>
|
|
|
-
|
|
|
</el-row>
|
|
|
+ <br/>
|
|
|
<el-row :gutter="20">
|
|
|
- <el-col :span="16">
|
|
|
- <el-checkbox label="Web" :true-label="1" :false-label="0" v-model="pageBind.pageIsEnable"></el-checkbox>
|
|
|
- <el-checkbox label="Android是否启用" :true-label="1" :false-label="0" v-model="pageBind.pagePhoneIsEnable" ></el-checkbox>
|
|
|
+ <el-col :span="24">
|
|
|
+ <el-checkbox label="是否启用" :true-label="1" :false-label="0" v-model="pageBind.isEnable"></el-checkbox>
|
|
|
</el-col>
|
|
|
- </el-row>
|
|
|
+ </el-row>
|
|
|
</el-form>
|
|
|
</div>
|
|
|
</template>
|
|
@@ -164,48 +100,30 @@ export default {
|
|
|
SearchInput:'', //查询的值
|
|
|
currentPage : 1 , //页码
|
|
|
pageSize: 5,// 每页的数据条数
|
|
|
- ModulValue:'', //模块val
|
|
|
- ModulList:[],//模块数据
|
|
|
PathUrl:'http://localhost:5256',
|
|
|
- dialogVisible: false,
|
|
|
showModal: false, //测试弹层
|
|
|
dialogTitle:'测试标题',
|
|
|
pageBind:{
|
|
|
- androidUrl:'',
|
|
|
- iosUrl:'',
|
|
|
- pageIsEnable:0,
|
|
|
- pageName:'',
|
|
|
- pagePhoneIsEnable:0,
|
|
|
- pageid:-1,
|
|
|
- systemMenuCode:'',
|
|
|
- webUrl:'',
|
|
|
- modulName:'',
|
|
|
- modulid:'',
|
|
|
- icon:'',
|
|
|
- modulRemark:'',
|
|
|
- sTid:5,
|
|
|
- pageRemark:'',
|
|
|
+ id:-1,
|
|
|
+ functionCode:'',
|
|
|
+ functionName:'',
|
|
|
+ isEnable:0,
|
|
|
},//数据绑定对象
|
|
|
rules: {
|
|
|
- pageName: [
|
|
|
- { required: true, message: '请输入页面名称', trigger: 'blur' },
|
|
|
+ functionName: [
|
|
|
+ { required: true, message: '请输入操作名称', trigger: 'blur' },
|
|
|
],
|
|
|
- modulid:[
|
|
|
- { required: true, message: '请选中模块', trigger: 'blur' },
|
|
|
+ functionCode:[
|
|
|
+ { required: true, message: '请输入操作code', trigger: 'blur' },
|
|
|
],
|
|
|
- systemMenuCode:[
|
|
|
- { required: true, message: '请输入页面代码', trigger: 'blur' },
|
|
|
- ]
|
|
|
- ,webUrl:[
|
|
|
- { required: true, message: '请输入WebUrl', trigger: 'blur' },
|
|
|
- ]
|
|
|
- }
|
|
|
+ },
|
|
|
+ isload:true,
|
|
|
};
|
|
|
},
|
|
|
methods: {
|
|
|
pageload(){
|
|
|
var that = this;
|
|
|
- this.$axios.post(this.PathUrl + '/api/System/PageConfigInit', {
|
|
|
+ this.$axios.post(this.PathUrl + '/api/System/PageFunInit', {
|
|
|
|
|
|
}, {
|
|
|
headers: {
|
|
@@ -214,29 +132,18 @@ export default {
|
|
|
}).then(resp => {
|
|
|
console.log(resp.data.data);
|
|
|
if (resp.data.code == 200) {
|
|
|
- that.bufferData = resp.data.data;
|
|
|
- that.ModulList = resp.data.data.modList.data;
|
|
|
- that.ModulList.unshift({
|
|
|
- 'id':-1,
|
|
|
- 'name':"全部模块",
|
|
|
- 'sTid':-1
|
|
|
- });
|
|
|
- that.pageList = resp.data.data.viewList.data;
|
|
|
+ that.pageList = resp.data.data;
|
|
|
}
|
|
|
- })
|
|
|
- },
|
|
|
- Inquirechange() {
|
|
|
|
|
|
- var that = this;
|
|
|
- if(this.ModulValue == -1){
|
|
|
- this.pageList = this.bufferData.viewList.data;
|
|
|
- }else{
|
|
|
- this.pageList = this.bufferData.viewList.data.filter(function(item, i, arr) {
|
|
|
- return item.modulid == that.ModulValue;
|
|
|
- });
|
|
|
- }
|
|
|
+ if(that.pageList.slice((that.currentPage - 1) * that.pageSize, that.currentPage * that.pageSize).length == 0){
|
|
|
+ if(that.currentPage > 1){
|
|
|
+ that.currentPage = that.currentPage - 1;
|
|
|
+ }
|
|
|
+ }
|
|
|
+
|
|
|
+ that.isload = false;
|
|
|
+ })
|
|
|
|
|
|
- this.currentPage = 1;
|
|
|
},
|
|
|
//每页条数改变时触发 选择一页显示多少行
|
|
|
handleSizeChange(val) {
|
|
@@ -247,31 +154,14 @@ export default {
|
|
|
handleCurrentChange(val) {
|
|
|
this.currentPage = val;
|
|
|
},
|
|
|
- //搜索按钮
|
|
|
- btnSearch(){
|
|
|
- var that = this;
|
|
|
- this.pageList = this.bufferData.viewList.data.filter(function(item, i, arr) {
|
|
|
- return item.pageName.indexOf(that.SearchInput) != -1;
|
|
|
- });
|
|
|
- },
|
|
|
addPage(){
|
|
|
this.showModal = true;
|
|
|
this.dialogTitle='添加页面';
|
|
|
this.pageBind = {
|
|
|
- androidUrl:'',
|
|
|
- iosUrl:'',
|
|
|
- pageIsEnable:0,
|
|
|
- pageName:'',
|
|
|
- pagePhoneIsEnable:0,
|
|
|
- pageid:-1,
|
|
|
- systemMenuCode:'',
|
|
|
- webUrl:'',
|
|
|
- modulName:'',
|
|
|
- modulid:'',
|
|
|
- icon:'',
|
|
|
- modulRemark:'',
|
|
|
- sTid:5,
|
|
|
- pageRemark:'',
|
|
|
+ id:-1,
|
|
|
+ functionCode:'',
|
|
|
+ functionName:'',
|
|
|
+ isEnable:0,
|
|
|
};
|
|
|
},
|
|
|
Edit(page){
|
|
@@ -280,39 +170,34 @@ export default {
|
|
|
this.dialogTitle='编辑页面';
|
|
|
console.log(page);
|
|
|
this.pageBind = {
|
|
|
- androidUrl:page.androidUrl,
|
|
|
- iosUrl:page.iosUrl,
|
|
|
- pageIsEnable:page.pageIsEnable,
|
|
|
- pageName:page.pageName,
|
|
|
- pagePhoneIsEnable:page.pagePhoneIsEnable,
|
|
|
- pageid:page.pageid,
|
|
|
- systemMenuCode:page.systemMenuCode,
|
|
|
- webUrl:page.webUrl,
|
|
|
- modulName:page.modulName,
|
|
|
- modulid:page.modulid,
|
|
|
- icon:page.icon,
|
|
|
- modulRemark:page.modulRemark,
|
|
|
- sTid:page.sTid,
|
|
|
- pageRemark:page.pageRemark,
|
|
|
+ id:page.id,
|
|
|
+ functionCode:page.functionCode,
|
|
|
+ functionName:page.functionName,
|
|
|
+ isEnable:page.isEnable,
|
|
|
};
|
|
|
},
|
|
|
PageSave(){
|
|
|
var that = this;
|
|
|
- if(this.pageBind.pageid == -1){
|
|
|
+ //添加
|
|
|
+ if(this.pageBind.id == -1){
|
|
|
|
|
|
var p = new Promise((resolve,reject)=>{
|
|
|
this.$refs.pageBind.validate((valid) => {
|
|
|
if(valid){
|
|
|
resolve(true);
|
|
|
- }else{
|
|
|
+ }else{
|
|
|
reject(false);
|
|
|
}
|
|
|
});
|
|
|
})
|
|
|
|
|
|
p.then(resolve=>{
|
|
|
+
|
|
|
+ this.pageBind.Status = 1;
|
|
|
+ this.pageBind.CreateUserId = 235;
|
|
|
+ this.pageBind.Remark = '';
|
|
|
//新增
|
|
|
- this.$axios.post(this.PathUrl + '/api/System/AddPageInfo', this.pageBind, {
|
|
|
+ this.$axios.post(this.PathUrl + '/api/System/OperationFun', this.pageBind, {
|
|
|
headers: {
|
|
|
'Authorization': 'Bearer eyJhbGciOiJIUzI1NiIsInR5cCI6IkpXVCJ9.eyJodHRwOi8vc2NoZW1hcy54bWxzb2FwLm9yZy93cy8yMDA1LzA1L2lkZW50aXR5L2NsYWltcy9uYW1laWRlbnRpZmllciI6IkZ1dHVyZSIsImV4cCI6MTY3OTU0MjgwNSwiaXNzIjoiT0FTeXN0ZW0uY29tIiwiYXVkIjoiT0FTeXN0ZW0uY29tIn0.iy5SUInq1p3yjZultRPyzCa2ekLeepSdMLxvPwXY6MI',
|
|
|
}
|
|
@@ -328,6 +213,7 @@ export default {
|
|
|
this.$message.error(resp.data.msg);
|
|
|
}
|
|
|
that.pageload();
|
|
|
+
|
|
|
})
|
|
|
}).catch(err=>{
|
|
|
console.log("表单验证未通过");
|
|
@@ -346,8 +232,13 @@ export default {
|
|
|
})
|
|
|
|
|
|
p.then(resolve=>{
|
|
|
- //新增
|
|
|
- this.$axios.post(this.PathUrl + '/api/System/EditPageInfo', this.pageBind, {
|
|
|
+
|
|
|
+ this.pageBind.Status = 2;
|
|
|
+ this.pageBind.CreateUserId = 235;
|
|
|
+ this.pageBind.Remark = '';
|
|
|
+
|
|
|
+ //编辑
|
|
|
+ this.$axios.post(this.PathUrl + '/api/System/OperationFun', this.pageBind, {
|
|
|
headers: {
|
|
|
'Authorization': 'Bearer eyJhbGciOiJIUzI1NiIsInR5cCI6IkpXVCJ9.eyJodHRwOi8vc2NoZW1hcy54bWxzb2FwLm9yZy93cy8yMDA1LzA1L2lkZW50aXR5L2NsYWltcy9uYW1laWRlbnRpZmllciI6IkZ1dHVyZSIsImV4cCI6MTY3OTU0MjgwNSwiaXNzIjoiT0FTeXN0ZW0uY29tIiwiYXVkIjoiT0FTeXN0ZW0uY29tIn0.iy5SUInq1p3yjZultRPyzCa2ekLeepSdMLxvPwXY6MI',
|
|
|
}
|
|
@@ -363,6 +254,7 @@ export default {
|
|
|
this.$message.error(resp.data.msg);
|
|
|
}
|
|
|
that.pageload();
|
|
|
+
|
|
|
})
|
|
|
}).catch(err=>{
|
|
|
console.log("表单验证未通过");
|
|
@@ -372,13 +264,11 @@ export default {
|
|
|
},
|
|
|
Del(page){
|
|
|
let that = this;
|
|
|
- var dellist = [];
|
|
|
- dellist.push({
|
|
|
- 'Pageid':page.pageid,
|
|
|
- 'Userid':235,
|
|
|
- })
|
|
|
|
|
|
- this.$axios.post(this.PathUrl + '/api/System/DelPageInfo',dellist, {
|
|
|
+ this.$axios.post(this.PathUrl + '/api/System/DelFun',{
|
|
|
+ 'Id':page.id,
|
|
|
+ 'DeleteUserId':235,
|
|
|
+ }, {
|
|
|
headers: {
|
|
|
'Authorization': 'Bearer eyJhbGciOiJIUzI1NiIsInR5cCI6IkpXVCJ9.eyJodHRwOi8vc2NoZW1hcy54bWxzb2FwLm9yZy93cy8yMDA1LzA1L2lkZW50aXR5L2NsYWltcy9uYW1laWRlbnRpZmllciI6IkZ1dHVyZSIsImV4cCI6MTY3OTU0MjgwNSwiaXNzIjoiT0FTeXN0ZW0uY29tIiwiYXVkIjoiT0FTeXN0ZW0uY29tIn0.iy5SUInq1p3yjZultRPyzCa2ekLeepSdMLxvPwXY6MI',
|
|
|
}
|
|
@@ -391,18 +281,13 @@ export default {
|
|
|
} else {
|
|
|
this.$message.error('删除失败!' + resp.data.msg);
|
|
|
}
|
|
|
+
|
|
|
that.pageload();
|
|
|
|
|
|
}).catch(err=>{
|
|
|
this.$message.error('网络错误!');
|
|
|
})
|
|
|
},
|
|
|
- PageBindFun(page){
|
|
|
-
|
|
|
-
|
|
|
- }
|
|
|
-
|
|
|
-
|
|
|
},
|
|
|
mounted(){
|
|
|
this.pageload();
|