@@ -1189,4 +1189,45 @@ export function correctList(data) { | |||
method: 'get', | |||
params: data | |||
}) | |||
} | |||
// /zkhouse/findWeekMonth | |||
export function findWeekMonth(data) { | |||
return request({ | |||
url: '/autoSR/zkhouse/findWeekMonth', | |||
method: 'get', | |||
params: data | |||
}) | |||
} | |||
// | |||
export function deleteById(data) { | |||
return request({ | |||
url: '/autoSR/api/zkMessage/deleteById', | |||
method: 'get', | |||
params: data | |||
}) | |||
} | |||
// | |||
export function weekFindById(data) { | |||
return request({ | |||
url: '/autoSR/api/zkMessage/findById', | |||
method: 'get', | |||
params: data | |||
}) | |||
} | |||
// | |||
export function byWeekMonthData(data) { | |||
return request({ | |||
url: '/autoSR/zkhouse/byWeekMonthData', | |||
method: 'get', | |||
params: data | |||
}) | |||
} | |||
// | |||
export function insertSelective(data) { | |||
return request({ | |||
url: '/autoSR/api/zkMessage/insertSelective', | |||
method: 'get', | |||
params: data | |||
}) | |||
} |
@@ -22,6 +22,10 @@ import api from './api' | |||
import AvueUeditor from 'avue-plugin-ueditor' | |||
Vue.use(AvueUeditor); | |||
import VueQuillEditor from 'vue-quill-editor' //vue-quill-editor其它文件可在应用页面直接引入 | |||
Vue.use(VueQuillEditor) | |||
import 'echarts' | |||
import ECharts from 'vue-echarts' | |||
Vue.component('v-chart', ECharts) | |||
@@ -109,11 +109,10 @@ | |||
<i class="noticeIcon"></i> | |||
<span>通知(0)</span> | |||
</div> --> | |||
<!-- 暂时注释下一版本开发上线 --> | |||
<el-popover placement="bottom" trigger="hover" width="350" @show="getMessage"> | |||
<el-tabs v-model="activeName" @tab-click="handleClick"> | |||
<el-tab-pane label="接待报告" name="first"> | |||
<el-table :data="gridData" @row-click="msgTaps"> | |||
<el-table :data="gridDatas" @row-click="msgTaps"> | |||
<el-table-column | |||
width="324" | |||
property="date" | |||
@@ -145,7 +144,7 @@ | |||
</el-table> | |||
</el-tab-pane> | |||
</el-tabs> | |||
<i slot="reference" @click="toMessageList" class="el-icon-bell" style="font-size: 18px;color: #fff;"></i> | |||
<i slot="reference" @click="toMessageList" class="el-icon-bell" style="font-size: 18px;margin-right: 24px;cursor: pointer;"></i> | |||
</el-popover> | |||
<el-tooltip | |||
@@ -260,6 +259,7 @@ export default { | |||
info: {}, | |||
activeName: 'first', | |||
gridData: [], // 消息列表 | |||
gridDatas: [], // 日/周报列表 | |||
}; | |||
}, | |||
computed: { | |||
@@ -660,4 +660,7 @@ export default { | |||
/deep/ .el-dropdown-menu__item--divided{ | |||
border:none !important; | |||
} | |||
/deep/.has-gutter { | |||
display: none; | |||
} | |||
</style> |
@@ -41,6 +41,18 @@ export default [{ | |||
path: '/reportExcel/weekReport', | |||
component: () => import(/* webpackChunkName: "views" */ '@/views/reportExcel/weekReport'), | |||
name: '报告详情', // 周报 | |||
}, | |||
{ | |||
path: '/suglist', | |||
component: () => import(/* webpackChunkName: "views" */"@/views/building/sugList") | |||
}, | |||
{ | |||
path: '/sugdetail', | |||
component: () => import(/* webpackChunkName: "views" */"@/views/building/sugDetail") | |||
} | |||
] | |||
@@ -266,6 +266,9 @@ | |||
<el-dropdown-item> | |||
<el-button type="text" v-if="cus_build_index_open" size="small" @click="toDisable(row)">{{ row.lockFlag == 0 ? "禁用" : "启用"}}</el-button> | |||
</el-dropdown-item> | |||
<el-dropdown-item> | |||
<el-button type="text" v-if="permissions['cus_build_index_sug']" size="small" @click="toOtherPage(row)">使用建议</el-button> | |||
</el-dropdown-item> | |||
</el-dropdown-menu> | |||
</el-dropdown> | |||
@@ -971,6 +974,18 @@ export default { | |||
} | |||
}); | |||
}, | |||
// 跳转其他页面 | |||
toOtherPage(page) { | |||
console.log(page) | |||
this.$router.push({ | |||
path: '/suglist', | |||
query: { | |||
id: page.id | |||
} | |||
}) | |||
}, | |||
toDisable(row) { | |||
this.$confirm( | |||
`确定${row.lockFlag == 0 | |||
@@ -0,0 +1,187 @@ | |||
<template> | |||
<div class="app"> | |||
<div class="app"> | |||
<el-form | |||
:model="ruleForm" | |||
ref="ruleForm" | |||
label-width="100px" | |||
class="demo-ruleForm" | |||
:rules="rules" | |||
> | |||
<el-form-item label="周日期"> | |||
{{ week }} | |||
</el-form-item> | |||
<el-form-item label="使用建议" prop="suggest"> | |||
<quill-editor | |||
v-model="ruleForm.suggest" | |||
:options="editorOption" | |||
:uploadData="uploadData" | |||
style="height: 250px; width: 81%" | |||
></quill-editor> | |||
</el-form-item> | |||
<el-form-item> | |||
<div class="btn"> | |||
<el-button type="primary" @click="submit('ruleForm')" | |||
>发布</el-button | |||
> | |||
<el-button @click="cancel">取消</el-button> | |||
</div> | |||
</el-form-item> | |||
</el-form> | |||
</div> | |||
</div> | |||
</template> | |||
<script> | |||
import { quillEditor, Quill } from "vue-quill-editor"; | |||
import "quill/dist/quill.core.css"; | |||
import "quill/dist/quill.snow.css"; | |||
import "quill/dist/quill.bubble.css"; | |||
const toolOptions = [ | |||
["bold", "italic", "underline", "strike"], | |||
["blockquote"], | |||
[{ header: 1 }, { header: 2 }], | |||
[{ list: "ordered" }, { list: "bullet" }], | |||
[{ script: "sub" }, { script: "super" }], | |||
[{ indent: "-1" }, { indent: "+1" }], | |||
[{ size: ["small", false, "large", "huge"] }], | |||
[{ header: [1, 2, 3, 4, 5, 6, false] }], | |||
[{ color: [] }, { background: [] }], | |||
[{ align: [] }], | |||
["link", "image", "video"], | |||
]; | |||
export default { | |||
data() { | |||
return { | |||
defaultMSG: null, | |||
uploadData: { | |||
mediaType: "image", | |||
title: "", | |||
introduction: "", | |||
appId: "", | |||
}, | |||
config: { | |||
// initialFrameHeight: 500, | |||
// initialFrameWidth:600 | |||
}, | |||
id: "", | |||
isShowPj: false, | |||
// ue:UE.getEditor('editor'), | |||
opt: [ | |||
{ label: "PC端", value: 1 }, | |||
{ label: "小程序端", value: 2 }, | |||
], | |||
rules: {}, | |||
ruleForm: { | |||
suggest: "", | |||
}, | |||
getParamsObj: {}, | |||
editorOption: { | |||
theme: "snow", // or 'bubble' | |||
placeholder: "请输入文章内容", | |||
modules: { | |||
toolbar: toolOptions, | |||
}, | |||
}, | |||
week: "", | |||
pid: "", | |||
}; | |||
}, | |||
async mounted() { | |||
if (this.$route.query.id) { | |||
this.getParamsObj.id = this.$route.query.id | |||
} | |||
if (this.$route.query.week) { | |||
this.getParamsObj.week = this.$route.query.week | |||
} | |||
if (this.$route.query.pid) { | |||
this.getParamsObj.pid = this.$route.query.pid | |||
} | |||
if (this.$route.query.type) { | |||
this.getParamsObj.type = this.$route.query.type | |||
} | |||
if (this.getParamsObj.id != "" && this.getParamsObj.id != undefined) { | |||
let res = await this.$api.api.weekFindById({ id: this.getParamsObj.id }); | |||
this.ruleForm.suggest = res.data.data.suggest; | |||
this.id = res.data.data.id; | |||
this.defaultMSG = this.ruleForm.suggest; | |||
this.week = res.data.data.weekDate; | |||
this.pid = this.getParamsObj.pid; | |||
this.type = this.getParamsObj.type; | |||
} else { | |||
let res = await this.$api.api.byWeekMonthData({ | |||
weekDate: this.getParamsObj.week, | |||
projectId: this.getParamsObj.pid, | |||
}); | |||
if (res.data.data != null) { | |||
this.ruleForm.suggest = res.data.data.suggest; | |||
this.defaultMSG = this.ruleForm.suggest; | |||
this.id = res.data.data.id; | |||
console.log("有数据:", res.data.data); | |||
} | |||
this.week = this.getParamsObj.week; | |||
this.pid = this.getParamsObj.pid; | |||
this.type = this.getParamsObj.type; | |||
} | |||
}, | |||
methods: { | |||
cancel() { | |||
this.$router.go(-1); | |||
}, | |||
editorReady(instance) { | |||
instance.setContent(this.ruleForm.suggest); | |||
instance.addListener("contentChange", () => { | |||
this.ruleForm.suggest = instance.getContent(); | |||
}); | |||
}, | |||
submit(formName) { | |||
this.$refs[formName].validate((valid) => { | |||
if (valid) { | |||
if (this.id != "" && this.id != undefined) { | |||
this.ruleForm.id = this.id; | |||
} | |||
this.ruleForm.projectId = this.pid; | |||
this.ruleForm.weekDate = this.week; | |||
this.ruleForm.messageType = this.type; | |||
console.log("231", this.ruleForm); | |||
this.$api.api.insertSelective(this.ruleForm).then((res) => { | |||
if (res.data.code == 10000) { | |||
this.$message.success("操作成功"); | |||
this.$router.go(-1) | |||
} | |||
}); | |||
} else { | |||
this.$message.error("请填写完整"); | |||
return false; | |||
} | |||
}); | |||
}, | |||
}, | |||
}; | |||
</script> | |||
<style lang="scss" scoped> | |||
.app { | |||
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; | |||
} | |||
.btn { | |||
margin-top: 100px; | |||
} | |||
.ql-picker-label { | |||
display: flex !important; | |||
} | |||
</style> |
@@ -0,0 +1,234 @@ | |||
<template> | |||
<div class="app"> | |||
<!-- 头 --> | |||
<div class="app-top"> | |||
<div class="app-titel" style="margin-top: 5px; padding: 0 10px;flex-direction: column;"> | |||
<div class="div-lab" style="justify-content: space-between; width: 95%"> | |||
<el-select | |||
v-model="selValue" | |||
@change="selChange" | |||
style="width: 100px" | |||
placeholder="请选择" | |||
> | |||
<el-option label="周建议" value="2"></el-option> | |||
<el-option label="月建议" value="4"></el-option> | |||
</el-select> | |||
<el-button type="danger" plain @click="back()">返回</el-button> | |||
</div> | |||
<div class="app-titel" style="width: 100%;margin-top: 15px"> | |||
<div style="margin-left: 16px"> | |||
<el-button type="primary" @click="add()">新增</el-button> | |||
</div> | |||
</div> | |||
</div> | |||
<!-- 表格 --> | |||
<div class="cen-tab"> | |||
<el-table :data="tableData" stripe style="width: 100%"> | |||
<el-table-column | |||
prop="weekDate" | |||
label="周" | |||
align="center" | |||
></el-table-column> | |||
<el-table-column | |||
prop="createUser" | |||
label="更新人" | |||
align="center" | |||
></el-table-column> | |||
<el-table-column | |||
prop="createTime" | |||
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, row.orgType)" | |||
>编辑</el-button | |||
> | |||
<el-button type="text" @click="remove(row.id)">删除</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="num" | |||
:page-sizes="[10, 30, 50]" | |||
:page-size="size" | |||
layout="total, sizes, prev, pager, next, jumper" | |||
:total="total" | |||
> | |||
</el-pagination> | |||
</div> | |||
</div> | |||
</div> | |||
</div> | |||
</template> | |||
<script> | |||
export default { | |||
data() { | |||
return { | |||
id: null, | |||
num: 1, | |||
size: 10, | |||
total: 0, | |||
selValue: "2", | |||
time: [], | |||
tableData: [], | |||
week: "", | |||
menuId: "", | |||
}; | |||
}, | |||
mounted() { | |||
if (this.$route.query.id) { | |||
this.id = this.$route.query.id | |||
} | |||
let data = { | |||
num: 1, | |||
size: 10, | |||
projectId: this.id, | |||
messageType: this.selValue, | |||
}; | |||
this.filefindByPage(data); | |||
}, | |||
methods: { | |||
back() { | |||
this.$router.go(-1); | |||
}, | |||
selChange() { | |||
let data = { | |||
num: 1, | |||
size: 10, | |||
projectId: this.id, | |||
messageType: this.selValue, | |||
}; | |||
this.filefindByPage(data); | |||
}, | |||
add() { | |||
this.$router.push({ | |||
path: '/sugdetail', | |||
query: { | |||
week: this.week, | |||
pid: this.id, | |||
type: this.selValue | |||
} | |||
}) | |||
}, | |||
filefindByPage(data) { | |||
this.$api.api.findWeekMonth(data).then((res) => { | |||
console.log(res); | |||
this.tableData = res.data.data.list.results; | |||
this.total = res.data.data.list.totalRecord; | |||
this.week = res.data.data.weekDate; | |||
this.menuId = res.data.data.permitBtn; | |||
}); | |||
}, | |||
modify(id, org) { | |||
this.$router.push({ | |||
path: '/sugdetail', | |||
query: { | |||
week: this.week, | |||
pid: this.id, | |||
id: id, | |||
type: this.selValue, | |||
} | |||
}) | |||
// location.href = | |||
// "${jypath}/properties/addMessageData?id=" + | |||
// id + | |||
// "&week=" + | |||
// this.week + | |||
// "&pid=" + | |||
// this.id + | |||
// "&type=" + | |||
// this.selValue; | |||
}, | |||
remove(id) { | |||
this.$api.api.deleteById({ id: id }).then((res) => { | |||
console.log(res); | |||
if (res.data.code == 10000) { | |||
let data = { | |||
num: 1, | |||
size: this.size, | |||
messageType: this.selValue, | |||
projectId: this.id, | |||
}; | |||
this.filefindByPage(data); | |||
this.$message.success("删除成功"); | |||
} | |||
}); | |||
}, | |||
handleSizeChange(val) { | |||
this.size = val; | |||
let data = { | |||
num: 1, | |||
size: val, | |||
projectId: this.id, | |||
messageType: this.selValue, | |||
}; | |||
this.filefindByPage(data); | |||
}, | |||
handleCurrentChange(val) { | |||
this.num = val; | |||
let data = { | |||
num: val, | |||
size: 10, | |||
projectId: this.id, | |||
messageType: this.selValue, | |||
}; | |||
this.filefindByPage(data); | |||
}, | |||
}, | |||
}; | |||
</script> | |||
<style lang="scss" scoped> | |||
.app { | |||
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; | |||
} | |||
.cen-tab { | |||
width: 100%; | |||
padding: 15px; | |||
background: #ffffff; | |||
margin-top: 15px; | |||
} | |||
</style> |
@@ -3,14 +3,13 @@ | |||
* https://cli.vuejs.org/zh/config/ | |||
*/ | |||
// const url = 'http://192.168.31.161:9999' //长龙 | |||
// const url = 'http://192.168.31.211:9999' // 泽明 | |||
// const url = 'http://192.168.31.100:9999' //王笑 | |||
const url = 'http://192.168.31.152:9999' // 泽明 | |||
// const url = 'http://62.234.122.43:9999' //正式 | |||
// const url = 'http://81.70.55.170:9999' // 新测试服务器IP | |||
// const url = 'http://192.168.31.86:9999' // 胜浩 | |||
// const url = 'https://zanyong.hfju.com' // 正式域名 | |||
// const url = 'http://127.0.0.1:9999' // 本地 | |||
const url = 'http://81.70.55.170:9999' // 新测试 | |||
// const url = 'http://81.70.55.170:9999' // 新测试 | |||
// const url = 'http://82.156.35.22:9999' // 新正式ip | |||
const CompressionWebpackPlugin = require('compression-webpack-plugin') | |||
const productionGzipExtensions = ['js', 'css'] | |||