Browse Source

更新记录

newStyle
jyt 2 years ago
parent
commit
fa3a7451cd
6 changed files with 354 additions and 2 deletions
  1. +8
    -0
      src/api/modules/api.js
  2. +1
    -1
      src/api/modules/http.js
  3. +5
    -0
      src/router/views/index.js
  4. +216
    -0
      src/views/contentManage/updateRecord/list.vue
  5. +122
    -0
      src/views/contentManage/updateRecord/update.vue
  6. +2
    -1
      vue.config.js

+ 8
- 0
src/api/modules/api.js View File

@@ -1174,3 +1174,11 @@ export function sensitivewordsList(data) {
params: data
})
}
// 更新记录列表
export function updateListApi(data) {
return request({
url: '/autoSR/api/zkMessage/messagePage',
method: 'get',
params: data
})
}

+ 1
- 1
src/api/modules/http.js View File

@@ -858,6 +858,6 @@ export function theCirculation(query) {
return request({
url: 'autoSR/customer/theCirculation',
method: 'get',
params: query
data: query
})
}

+ 5
- 0
src/router/views/index.js View File

@@ -30,6 +30,11 @@ export default [{
component: () =>
import(/* webpackChunkName: "page" */ '@/views/Receive/index'),
name: '接待详情',
},
{
path: '/contentManage/updateRecord/update',
component: () => import(/* webpackChunkName: "views" */ '@/views/contentManage/updateRecord/update'),
name:"更新"
}
]
}, {


+ 216
- 0
src/views/contentManage/updateRecord/list.vue View File

@@ -0,0 +1,216 @@
<template>
<div id="updateList">
<!-- 头 -->
<div class="app-top">
<div class="app-titel" style="margin-top: 5px; padding: 0 10px">
<div class="div-lab">
<el-select
v-model="selValue"
@change="selChange"
style="width: 100px"
placeholder="请选择"
>
<el-option label="代理商" v-if="orgType == 0" value="1"></el-option>
<el-option label="公司" v-if="orgType != 2" value="2"></el-option>
<el-option label="项目" value="3"></el-option>
</el-select>
</div>

<div class="div-lab">
<div class="label">更新时间:</div>
<el-date-picker
v-model="time"
type="daterange"
class="div-inp"
range-separator="-"
start-placeholder="开始日期"
:default-time="['00:00:00', '23:59:59']"
value-format="yyyy-MM-dd"
end-placeholder="结束日期"
@change="timeChange"
>
</el-date-picker>
</div>
</div>
<div class="app-titel" style="margin-top: 15px">
<!-- <div class="label" style="color: #ffffff">筛选相关:</div> -->
<div style="margin-left: 16px">
<el-button type="primary" @click="add()" v-if="con_list_add">新增</el-button>
</div>
<div style="margin-left: 16px">
<el-button type="primary" @click="noempty()">筛选</el-button>
</div>
<div style="margin-left: 20px">
<el-button @click="empty()">清空筛选条件</el-button>
</div>
</div>
</div>

<!-- 表格 -->
<div class="cen-tab">
<el-table :data="tableData" stripe style="width: 100%">
<el-table-column prop="username" label="标题" align="center"></el-table-column>
<el-table-column prop="imei" label="阅读数" align="center"></el-table-column>
<el-table-column prop="imei" label="发布人" align="center"></el-table-column>
<el-table-column prop="imei" label="发布时间" align="center"></el-table-column>
<el-table-column label="操作" align="center" fixed="right" width="200">
<template slot-scope="{ row }">
<el-button type="text" @click="modify(row.id)"
v-if="con_list_modify">编辑</el-button>
<el-button type="text" @click="remove(row.id)"
v-if="con_list_del">删除</el-button>
</template>
</el-table-column>
</el-table>
<div style="display: flex; justify-content: flex-end; margin-top: 10px">
<el-pagination
@size-change="handleSizeChange"
@current-change="handleCurrentChange"
:current-page="current"
:page-sizes="[10, 30, 50]"
:page-size="size"
layout="total, sizes, prev, pager, next, jumper"
:total="total"
>
</el-pagination>
</div>
</div>
</div>
</template>

<script>
import { mapGetters } from "vuex";
import axios from "axios"
export default {
name: "updateList",
data() {
return {
current: 1,
size:10,
total:0,
selValue: "1",
orgType: localStorage.getItem("orgType"),
time: [],
tableData:[]
};
},
computed: {
...mapGetters(["permissions"]),
},
watch: {},
created() {
this.con_list_add = this.permissions["con_list_add"];
this.con_list_modify = this.permissions["con_list_modify"];
this.con_list_del = this.permissions["con_list_del"];
},
mounted(){
let data = {
current:1,
size:10,
// zkMessage:{
// orgType:this.selValue
// }
}
this.filefindByPage(data)
},
methods: {
selChange() {},
timeChange() {},
add() {
this.$router.push(
`/contentManage/updateRecord/update?pj=${this.selValue}`
)
},
noempty() {
this.current = 1;
this.filefindByPage();
},
empty() {
this.time = [];
this.current = 1;
this.filefindByPage();
},
filefindByPage(obj) {
this.$api.api.updateListApi(obj).then((res) => {
console.log(res)
this.tableData = res.data
});
},
modify(){
this.$router.push(
"/contentManage/updateRecord/update"
)
},
remove(){

},
handleSizeChange(val) {
console.log(`每页 ${val} 条`);
this.size=val;
this.filefindByPage()
},
handleCurrentChange(val) {
console.log(`当前页: ${val}`);
this.current=val;
this.filefindByPage()
}
},
};
</script>
<style lang="scss">
#updateList {
width: 100%;
min-height: 100%;
padding: 15px;
min-width: 1000px;
padding-bottom: 100px;
.app-top {
width: 100%;
background: #ffffff;
box-shadow: 0px 0px 12px 0px rgba(0, 0, 0, 0.04);
border-radius: 4px;
padding-top: 15px;
padding-bottom: 15px;
.app-titel {
width: 100%;
display: flex;
align-items: center;
.div-lab {
display: flex;
margin: 5px;
}
.label {
font-size: 14px;
font-weight: 400;
color: #32363d;
line-height: 14px;
margin-left: 15px;
display: flex;
align-items: center;
}
.toptimeqhuan {
height: 30px;
background: #ffffff;
display: flex;
align-items: center;
}
.toptimeqhuan div {
padding-left: 20px;
padding-right: 20px;
text-align: center;
line-height: 30px;
font-size: 14px;
margin-right: 15px;
border-radius: 4px;
border: 1px solid #e0e0e0;
}
}
}
.cen-tab{
width: 100%;
padding: 15px;
background: #FFFFFF;
margin-top: 15px;
}
}
</style>

+ 122
- 0
src/views/contentManage/updateRecord/update.vue View File

@@ -0,0 +1,122 @@
<template>
<div id="updateUpdate">
<div class="app">
<el-form
:model="ruleForm"
:rules="rules"
ref="ruleForm"
label-width="100px"
class="demo-ruleForm"
>
<el-form-item label="标题" prop="name">
<el-input v-model="ruleForm.name"></el-input>
</el-form-item>
<el-form-item label="更新涉及" prop="type" v-if="isShowPj">
<el-checkbox-group v-model="ruleForm.type">
<el-checkbox label="PC端" name="type"></el-checkbox>
<el-checkbox label="小程序端" name="type"></el-checkbox>
</el-checkbox-group>
</el-form-item>
<el-form-item label="内容" prop="content">
<div class="content">
<WxEditor v-model="ruleForm.content" :uploadData="uploadData"/>
</div>
</el-form-item>
<el-form-item>
<div class="btn">
<el-button type="primary" @click="submitForm('ruleForm')"
>发布</el-button
>
<el-button>取消</el-button>
</div>
</el-form-item>
</el-form>
</div>
</div>
</template>

<script>
import WxEditor from "@/components/wechat/WxEditor";
export default {
name: "updateUpdate",
data() {
return {
isShowPj:false,
ruleForm: {
name: "",
type: [],
content: "",
},
rules: {
name: [{ required: true, message: "请输入标题名称", trigger: "blur" }],
content: [{ required: true, message: "请输入内容", trigger: "blur" }],
type: [
{
type: "array",
required: true,
message: "请至少选择一个更新涉及",
trigger: "change",
},
],
},
uploadData: {
"mediaType": 'image',
"title": 'xxxx',
"introduction": 'sasdaa',
'appId': 'wx8f883dca5ecc5510'
},
};
},
components: {
WxEditor,
},
computed: {},
watch: {},
created() {},
mounted(){
if(this.$route.query.pj=="3"){
this.isShowPj = true;
}else{
this.isShowPj =false;
}
},
methods: {
submitForm(formName) {
this.$refs[formName].validate((valid) => {
if (valid) {
console.log(this.ruleForm)
} else {
}
});
},
},
};
</script>
<style lang="scss" scoped>
#updateUpdate {
width: 100%;
min-height: 100%;
padding: 15px;
min-width: 1000px;
padding-bottom: 100px;
.app {
width: 100%;
background: #ffffff;
box-shadow: 0px 0px 12px 0px rgba(0, 0, 0, 0.04);
border-radius: 4px;
padding: 30px;
}
}
.content{
/deep/ #wxEditor{
margin-top: -25px;
.editor{
height: 350px !important;
}
}
}
.btn{
margin-top: 100px;
}
</style>

+ 2
- 1
vue.config.js View File

@@ -7,7 +7,8 @@
// const url = 'http://192.168.31.167:9999' //长龙
// const url = 'http://192.168.31.134:9999' //嘉豪
// const url = 'http://192.168.31.100:9999' //王笑
const url = 'http://62.234.122.43:9999' //正式
// const url = 'http://62.234.122.43:9999' //正式
const url = 'http://192.168.31.88:9999' //正式
// const url = 'https://zanyong.hfju.com' // 正式域名
const CompressionWebpackPlugin = require('compression-webpack-plugin')
const productionGzipExtensions = ['js', 'css']


Loading…
Cancel
Save