Commit 639124e0 authored by 黄奎's avatar 黄奎

页面修改

parent 9a8824f9
...@@ -14,7 +14,7 @@ ...@@ -14,7 +14,7 @@
</span> </span>
<el-dropdown-menu slot="dropdown"> <el-dropdown-menu slot="dropdown">
<el-dropdown-item>修改密码</el-dropdown-item> <el-dropdown-item>修改密码</el-dropdown-item>
<el-dropdown-item>注销</el-dropdown-item> <el-dropdown-item @click.native="loginOut()">注销</el-dropdown-item>
</el-dropdown-menu> </el-dropdown-menu>
</el-dropdown> </el-dropdown>
</div> </div>
...@@ -72,8 +72,8 @@ ...@@ -72,8 +72,8 @@
<div v-show="tab2==1" class="radius"> <div v-show="tab2==1" class="radius">
<div style="margin-bottom:20px"> <div style="margin-bottom:20px">
<div class="searchInput"> <div class="searchInput">
<el-input style="display:inline-block;width:170px;" placeholder="请输入内容" v-model="val" size="small" <el-input style="display:inline-block;width:170px;" placeholder="请输入内容" v-model="qMsg.MallName"
clearable> size="small" clearable>
</el-input> </el-input>
<span class="el-icon-search" style="color:#979dad;font-size:14px;position:relative;top:1px"></span> <span class="el-icon-search" style="color:#979dad;font-size:14px;position:relative;top:1px"></span>
</div> </div>
...@@ -85,31 +85,33 @@ ...@@ -85,31 +85,33 @@
</div> </div>
<el-table :data="tableData" border style="width: 100%;margin-bottom:20px"> <el-table :data="tableData" border style="width: 100%;margin-bottom:20px">
<el-table-column prop="ID" label="ID" width="60"> <el-table-column prop="MallBaseId" label="编号" width="60">
</el-table-column> </el-table-column>
<el-table-column prop="name" label="商城名称" width="155"> <el-table-column prop="name" label="商城名称" width="155">
<template slot-scope="scope"> <template slot-scope="scope">
<p style="color:#409EFF">{{scope.row.title}}</p> <p style="color:#409EFF">{{scope.row.MallName}}</p>
<p>{{scope.row.num}} <p>{{scope.row.MallBaseId}}
<span style="color:rgb(144, 147, 153)">{{scope.row.num}}</span> <span style="color:rgb(144, 147, 153)">{{scope.row.MallBaseId}}</span>
</p> </p>
</template> </template>
</el-table-column> </el-table-column>
<el-table-column prop="address" label="数据统计" show-overflow-tooltip :render-header="renderHeader" <el-table-column prop="address" label="数据统计" show-overflow-tooltip :render-header="renderHeader"
width="155"> width="155">
</el-table-column> </el-table-column>
<el-table-column prop="address" label="有效期" width="170"> <el-table-column prop="EffectiveDateStr" label="有效期" width="170">
</el-table-column> </el-table-column>
<el-table-column prop="address" label="操作"> <el-table-column prop="address" label="操作">
<template slot-scope="scope"> <template slot-scope="scope">
<el-button size="mini" type="info" plain>编辑{{scope.row.ID}}</el-button> <el-button size="mini" type="info" plain>编辑 </el-button>
<el-button size="mini" type="info" plain>回收</el-button> <el-button size="mini" type="info" plain>回收</el-button>
<el-button size="mini" type="info" plain>版权</el-button> <el-button size="mini" type="info" plain>版权</el-button>
<el-button size="mini" type="info" plain>禁用</el-button> <el-button size="mini" type="info" plain>禁用</el-button>
</template> </template>
</el-table-column> </el-table-column>
</el-table> </el-table>
<el-pagination style="text-align:right" background layout="prev, pager, next" :total="1000"> <el-pagination style="text-align:right" background @current-change="handleCurrentChange"
v-if="tableData&&tableData.length>0" :current-page.sync="qMsg.pageIndex"
layout="total,prev, pager, next, jumper" :page-size="qMsg.pageSize" :total="qMsg.total">
</el-pagination> </el-pagination>
</div> </div>
<!-- 回收站 --> <!-- 回收站 -->
...@@ -225,7 +227,8 @@ ...@@ -225,7 +227,8 @@
<el-input size="small" v-model="creatMsg.MallName"></el-input> <el-input size="small" v-model="creatMsg.MallName"></el-input>
</el-form-item> </el-form-item>
<el-form-item label="商城有效期" prop="MallValidate"> <el-form-item label="商城有效期" prop="MallValidate">
<el-date-picker v-model="creatMsg.MallValidate" :disabled="creatMsg.isChecked" value-format="yyyy-MM-dd" style="width:220px;margin-right:8px" type="date" placeholder="选择日期时间"></el-date-picker> <el-date-picker v-model="creatMsg.MallValidate" :disabled="creatMsg.isChecked" value-format="yyyy-MM-dd"
style="width:220px;margin-right:8px" type="date" placeholder="选择日期时间"></el-date-picker>
<el-checkbox v-model="creatMsg.isChecked">永久</el-checkbox> <el-checkbox v-model="creatMsg.isChecked">永久</el-checkbox>
</el-form-item> </el-form-item>
</el-form> </el-form>
...@@ -306,21 +309,20 @@ ...@@ -306,21 +309,20 @@
name: 'homeIndex', name: 'homeIndex',
data() { data() {
let validataMala = (rule, value, callback) => { let validataMala = (rule, value, callback) => {
if (!this.creatMsg.isChecked&&this.creatMsg.MallValidate=='') { if (!this.creatMsg.isChecked && this.creatMsg.MallValidate == '') {
return callback(new Error('请选择商城有效期')); return callback(new Error('请选择商城有效期'));
} } else {
else {
callback(); callback();
} }
} }
return { return {
currentUserMsg:{}, currentUserMsg: {},
creatMsg: { creatMsg: {
MallBaseId:0, MallBaseId: 0,
MallName:'', MallName: '',
MallValidate:'', MallValidate: '',
IsEffective:0, IsEffective: 0,
isChecked:false isChecked: false
}, },
creatDig: false, creatDig: false,
editMsg: { editMsg: {
...@@ -330,14 +332,16 @@ ...@@ -330,14 +332,16 @@
tab1: 1, tab1: 1,
tab2: 1, tab2: 1,
tab3: 1, tab3: 1,
tableData: [{ tableData: [],
ID: '11',
title: '赞羊严选',
num: 'T1219561424'
}],
val: '', val: '',
dialogVisible: false, dialogVisible: false,
addMsg: {}, addMsg: {},
qMsg: {
pageIndex: 1,
pageSize: 1,
MallName: "",
total: 0,
},
rules: { rules: {
name: [{ name: [{
required: true, required: true,
...@@ -359,17 +363,23 @@ ...@@ -359,17 +363,23 @@
trigger: 'blur' trigger: 'blur'
}], }],
MallValidate: [{ validator: validataMala, trigger: "blur",required: true}], MallValidate: [{
validator: validataMala,
trigger: "blur",
required: true
}],
}, },
} }
}, },
methods: { methods: {
loginOut() {
localStorage.removeItem("mall_userInfo");
location.href = '/';
},
init() { init() {
this.apipost("/api/Tenant/GetTenant", {}, res => { this.apipost("/api/Tenant/GetTenant", {}, res => {
console.log(res);
if (res.data.resultCode == 1) { if (res.data.resultCode == 1) {
this.currentUserMsg=res.data.data; this.currentUserMsg = res.data.data;
} else { } else {
this.Info(res.data.message); this.Info(res.data.message);
} }
...@@ -419,8 +429,24 @@ ...@@ -419,8 +429,24 @@
] ]
) )
}, },
handleCurrentChange(val) {
this.qMsg.pageIndex = val;
this.getMiniPrograme();
},
getMiniPrograme() {
this.apipost("/api/Tenant/GetMiniProgramePage", this.qMsg, res => {
if (res.data.resultCode == 1) {
this.tableData = res.data.data.pageData;
this.qMsg.total = res.data.data.count;
} else {
this.Info(res.data.message);
}
})
},
//创建商城 //创建商城
submitForm(addMsg){ submitForm(addMsg) {
this.$refs[addMsg].validate(valid => { this.$refs[addMsg].validate(valid => {
if (valid) { if (valid) {
this.createShop(); this.createShop();
...@@ -429,15 +455,23 @@ ...@@ -429,15 +455,23 @@
} }
}); });
}, },
createShop(){ createShop() {
if(this.creatMsg.isChecked){ if (this.creatMsg.isChecked) {
this.creatMsg.MallValidate="" this.creatMsg.MallValidate = ""
}
this.apipost("/api/Tenant/SetMiniPrograme", this.creatMsg, res => {
if (res.data.resultCode == 1) {
this.getMiniPrograme();
this.creatDig = false;
} else {
this.Info(res.data.message);
} }
})
} }
}, },
mounted() mounted() {
{
this.init(); this.init();
this.getMiniPrograme();
} }
} }
......
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