Commit cd844a51 by xue_wengang

Merge branch 'dev_xzeq' of http://39.99.224.27:9022/changchao/founder_vue into dev_xzeq

parents 47ec3fa0 cb1bf620
......@@ -9,6 +9,9 @@ export const insertTbYwXnpgbg = params =>
export const deleteTbYwXnpgbg = data =>
post(`${base.alyIP}/xnpgbg/deleteTbYwXnpgbg`, data);
// 人员列表
export const getListUser = data =>
post(`${base.alyIP}/xnpgbg/getListUser`, data);
// 报告查询详情
export const getTbYwXnpgbg = data =>
......
......@@ -357,7 +357,13 @@ export default {
autoHeightMode: _this.autoHeightMode,
fixToolBar: _this.fixToolBar,
tabIndex: _this.tabIndex
})
});
console.log("this.$route.query", _this.$route.query?.editshow == "show");
if (_this.$route.query?.editshow == "show") {
_this.editor.readonly(true);
} else {
_this.editor.readonly(false);
}
}
}
</script>
......
......@@ -740,7 +740,6 @@
pageBs != 'queryZtryJkm' &&
pageBs != 'queryRyypNew' &&
pageBs != 'transactionFlow' &&
pageBs != 'queryZdcs' &&
pageBs != 'queryBsh'
"
>
......@@ -1791,6 +1790,23 @@
@change="handleSwitchs($event, scope.row)"
></el-switch>
</div>
<!-- 审批状态 -->
<div v-else-if="columnTitle.dwsp == 'dwsp'">
<!-- v-model="scope.row[columnTitle.prop]" -->
<el-switch
:value="scope.row[columnTitle.prop]"
active-value="2"
inactive-value="1"
@change="handleSwitchs($event, scope.row)"
></el-switch>
</div>
<!-- 状态翻译 -->
<div v-else-if="columnTitle.status == 'status'">
<div>{{ onStatus(scope.row.spzt) }}</div>
</div>
<div v-else-if="columnTitle.spjg == 'spjg'">
<div>{{ scope.row.spjg == '0' ? '已拒绝' : (scope.row.spjg == '1' ? '已同意' : '') }}</div>
</div>
<div v-else-if="columnTitle.prop == 'rzlbdm'">
{{
scope.row[columnTitle.prop] == "01"
......@@ -2071,7 +2087,6 @@
pageBs == 'ajypfx' ||
pageBs == 'queryRyypNew' ||
pageBs == 'queryZtryJkm' ||
pageBs == 'queryZdcs' ||
pageBs == 'transactionFlow'
)
"
......@@ -2300,7 +2315,6 @@
pageBs != 'queryAjcc' &&
pageBs != 'queryRyypNew' &&
pageBs != 'queryJqcc' &&
pageBs != 'queryZdcs' &&
pageBs != 'queryZjcl'
"
>删除</span
......@@ -3435,10 +3449,21 @@ export default {
imageUrl: "",
imgRaw: {},
//选中当前行
selectData: [],
selectData: []
};
},
methods: {
onStatus(item) {
if (item == '0') {
return '未审批'
} else if (item == '1') {
return '待审批'
} else if (item == '2') {
return '已审批'
} else {
return ''
}
},
treeLoad(tree, treeNode, resolve) {
debugger;
if (this.pageBs == "queryMenu") {
......@@ -5175,7 +5200,7 @@ export default {
.el-checkbox {
margin-right: 5px !important;
/deep/ .el-checkbox__inner {
::v-deep .el-checkbox__inner {
display: none !important;
}
}
......@@ -5213,15 +5238,15 @@ export default {
line-height: 30px;
}
/deep/ i.el-icon-success {
::v-deep i.el-icon-success {
color: #00ff0a;
}
/deep/ i.el-icon-error {
::v-deep i.el-icon-error {
color: red;
}
/deep/ th.is-center.is-leaf {
::v-deep th.is-center.is-leaf {
background: #f4f6f7;
}
......
......@@ -16,6 +16,14 @@ const menuLayouts = [
},
component: () => import("@/views/pgypbggl/mbxx/queryMbxx.vue")
},
{
path: "/pendMbxx",
name: "pendMbxx",
meta: {
title: '待我审批'
},
component: () => import("@/views/pgypbggl/mbxx/pendMbxx.vue")
},
];
export default [
......
......@@ -45,7 +45,7 @@ const mutations = {
state.header = content;
},
SET_ROLES: (state, roles) => {
debugger
// debugger
state.roles = roles
}
};
......
<template>
<div class="add-mbxx">
<div class="chuancan">
<div class="chuancan" v-show="$route.query.editshow != 'show'">
<span class="widthSpan">研判报告类型:</span>
<el-select v-model="form.bglxdm" placeholder="请选择" style="vertical-align: top; margin-right: 30px;">
<el-option label="个人" value="01"></el-option>
<el-option label="单位" value="02"></el-option>
<el-option label="扫黑除恶" value="03"></el-option>
</el-select>
<span>标题:</span>
<el-input v-model="form.bgbt" placeholder="请输入内容" style="width: 200px;"></el-input>
......@@ -13,13 +14,14 @@
<span class="widthSpan" style="margin-right: 10px;">正文内容:</span>
<div class="float">
<editor id="editor_id" height="500px" width="700px" :content.sync="form.bgnr"
:afterChange="afterChange()"
:loadStyleMode="false"
@on-content-change="onContentChange"></editor>
:afterChange="afterChange()"
:loadStyleMode="false"
@on-content-change="onContentChange"
></editor>
<!-- <div> editorTextCopy: {{ editorTextCopy }} </div> -->
</div>
</div>
<div class="fbsj">
<!-- <div class="fbsj">
<span class="widthSpan">发布时间:</span>
<el-date-picker
v-model="form.fbsj"
......@@ -29,9 +31,11 @@
value-format="yyyy-MM-dd HH:mm:ss"
>
</el-date-picker>
</div> -->
<div v-show="$route.query.editshow != 'show'">
<div v-if="isEdit == false" style="margin: 20px 0; padding-left: 110px;"><el-button type="primary" @click="submit">提 交</el-button></div>
<div v-else style="margin: 20px 0; padding-left: 110px;"><el-button type="primary" @click="submitEdit">提 交</el-button></div>
</div>
<div v-if="isEdit == false" style="margin: 20px 0; padding-left: 110px;"><el-button type="primary" @click="submit">提 交</el-button></div>
<div v-else style="margin: 20px 0; padding-left: 110px;"><el-button type="primary" @click="submitEdit">提 交</el-button></div>
</div>
</template>
......@@ -48,15 +52,15 @@ export default {
return {
isEdit: false,
form: {
bglxdm: '',
bgbt: '',
bgnr: '', // 直接初始化值
fbsj: ''
bglxdm: "",
bgbt: "",
bgnr: "", // 直接初始化值
fbsj: ""
},
// editorText: '直接初始化值', // 双向同步的变量
editorTextCopy: '', // content-change 事件回掉改变的对象
editorTextCopy: "", // content-change 事件回掉改变的对象
header: "效能评估模板维护",
header: "模板维护",
Menu: [
{
id: "addMbxx",
......@@ -64,8 +68,8 @@ export default {
index: "addMbxx",
auth: "M0101",
className: "iconfont iconrizhi",
disabled: false,
},
disabled: false
}
],
leftMenus: [
//左侧导航(模块第一个页面需要)
......@@ -83,21 +87,29 @@ export default {
newAuth: "M02",
index: "queryMbxx",
className: "iconfont icongongnengfuwu",
hasChildren: false,
hasChildren: false
},
{
id: "pendMbxx",
label: "待我审批",
newAuth: "M03",
index: "pendMbxx",
className: "iconfont icongongnengfuwu",
hasChildren: false
}
]
};
},
computed: {
},
computed: {},
created() {
this.$store.commit("user/SET_Menu", this.Menu);
debugger;
this.$store.commit("user/SET_LeftMenu", this.leftMenus);
this.$store.commit("user/SET_Header", this.header);
},
watch: {
$route:{
handler(newRouter){
$route: {
handler(newRouter) {
if(newRouter.fullPath.indexOf('xxzjbh') > -1) {
this.isEdit = true
this.form = {
......@@ -144,7 +156,7 @@ export default {
type: "success",
message: "操作成功",
});
this.$router.push('/queryMbxx')
this.$router.push('/queryMbxx')
}
})
},
......
<template>
<div class="Content content-mbxx">
<right-content
:pageBs="pageBs"
pageASs="nonewAdd"
:header="header"
:cxFormData="cxFormData"
:cxQueryField="cxQueryField"
:cxDefaultFormThead="cxDefaultFormThead"
@handleSwitchs="handleSwitchs"
:cxUrl="cxUrl"
ref="rightContent"
>
<template #btnGroup="scope">
<span class="hbyp" @click="showDetail(scope.scope)">查看</span>
<!-- <span class="hbyp" @click="edit(scope.scope)">修改</span>
<span class="hbyp" @click="toDelete(scope.scope)">删除</span> -->
</template>
</right-content>
<!-- <el-dialog title="报告详情" :visible.sync="dialogFormVisible" width="70%">
<el-row :gutter="20">
<el-col :span="12"><span>报告标题:</span>{{ xqData.bgbt }}</el-col>
<el-col :span="12"
><span>报告状态:</span
>{{ xqData.bgzt == 0 ? "未生效" : "已生效" }}</el-col
>
</el-row>
<el-row :gutter="20">
<el-col :span="12"><span>发布时间:</span>{{ xqData.djsj }}</el-col>
<el-col :span="12"
><span>发布状态:</span
>{{ xqData.fbzt == 0 ? "未发布" : "已发布" }}</el-col
>
</el-row>
<el-row :gutter="20">
<el-col :span="12"><span>发布人姓名:</span>{{ xqData.fbrxm }}</el-col>
<el-col :span="12"
><span>发布人身份证号:</span>{{ xqData.fbrsfhm }}</el-col
>
</el-row>
<el-row :gutter="20">
<el-col :span="12"><span>发布单位:</span>{{ xqData.fbdwStr }}</el-col>
</el-row>
<el-row>
<el-col :span="12"
><span>报告内容:</span
><span
style="margin-left: 37px; width: 800px"
v-html="xqData.bgnr"
></span
></el-col>
</el-row>
</el-dialog> -->
<el-dialog title="报告内容" :visible.sync="dialogFormVisible" width="50%">
<el-button type="primary" @click="downloadReport" size='small'>下载报告</el-button>
<div id="export">
<span
style="margin-left: 37px; width: 800px"
v-html="xqData.bgnr"
></span>
</div>
</el-dialog>
</div>
</template>
<script>
import {
deleteTbYwXnpgbg,
getTbYwXnpgbg,
updateTbYwXnpgbg,
} from "@/api/pgypbggl.js";
import base from "@/api/base";
import axios from "axios";
import rightContent from "@c/ptCxForm_components.vue";
export default {
name: "queryMbxx",
components: {
rightContent,
},
data() {
return {
dialogFormVisible: false,
xqData: {},
header: "评估研判报告管理",
Menu: [
{
id: "queryMbxx",
label: "模板信息维护",
index: "queryMbxx",
auth: "M0101",
className: "iconfont iconrizhi",
disabled: false,
},
],
pageBs: "queryMbxx",
cxFormData: {
page: 1,
limit: 10,
bglx: "",
fbsj: "",
spzt: "1",
sprid: ""
},
cxQueryField: [
{
name: "报告类型",
id: "bglx",
type: "select",
value: "",
placeholder: "请选择",
col: "3",
selectData: [
{ value: "01", name: "个人" },
{ value: "02", name: "单位" },
{ value: "03", name: "扫黑除恶" }
]
},
{
name: "发布时间",
id: "fbsj",
type: "zdyDate",
value: "",
col: "3",
},
],
cxDefaultFormThead: [
{
label: "信息主键编号",
// toInfor: true,
prop: "xxzjbh",
width: "250",
},
{
label: "报告类型",
prop: "bglxStr",
width: "200",
},
{
label: "报告标题",
prop: "bgbt",
width: "200"
},
// {
// label: "报告内容",
// prop: "bgnr",
// width: "200",
// },
// {
// label: "报告摘要",
// prop: "bgzy",
// width: "200",
// },
// {
// label: "报告状态",
// prop: "bgzt",
// width: "200",
// },
// {
// label: "审批状态",
// prop: "spzt",
// width: "200"
// },
{
label: "是否审批",
prop: "spzt",
dwsp: "dwsp",
width: "200"
},
{
label: "发布人身份证号",
prop: "fbrsfhm",
width: "200",
},
{
label: "发布人姓名",
prop: "fbrxm",
width: "200",
},
{
label: "发布单位代码",
prop: "fbdwStr",
width: "200",
},
{
label: "发布时间",
prop: "fbsj",
width: "200",
},
],
cxUrl: "/xnpgbg/pageTbYwXnpgbg",
userinf: ""
};
},
created() {
this.$store.commit("user/SET_Menu", this.Menu);
let userinfo = JSON.parse(sessionStorage.getItem("userInfo"));
this.cxFormData.sprid = userinfo.identitycard
},
methods: {
edit(scope) {
// console.log('scope', scope)
const param = {
xxzjbh: scope.row.xxzjbh,
// bgzt: scope.row.bgzt,
bgzt: "1",
bglxdm: scope.row.bglxdm,
xxzjbh: scope.row.xxzjbh,
bgbt: scope.row.bgbt,
bgnr: scope.row.bgnr,
fbsj: scope.row.djsj,
};
this.$router.push({ path: "/addMbxx", query: param });
},
showDetail(scope) {
getTbYwXnpgbg({ xxzjbh: scope.row.xxzjbh }).then((res) => {
if (res.code == 200) {
this.xqData = res.data.result;
this.dialogFormVisible = true;
}
});
// setTimeout(() => {
// $("#export").wordExport();
// }, 1000);
},
downloadReport () {
$("#export").wordExport();
},
toDelete(scope) {
this.$confirm("是否永久删除报告?", "提示", {
confirmButtonText: "确定",
cancelButtonText: "取消",
type: "warning",
})
.then(() => {
deleteTbYwXnpgbg({ xxzjbh: scope.row.xxzjbh }).then((res) => {
if (res.code == 200) {
this.$message({
type: "success",
message: "删除成功"
});
this.$refs.rightContent.doQuery("yes");
}
});
})
.catch(() => {
this.$message({
type: "info",
message: "已取消删除"
});
});
},
// 审批状态
handleSwitchs(obj) {
console.log("obj", obj);
let params = new FormData();
params.append("xxzjbh", obj.item.xxzjbh);
params.append("spzt", "2");
// console.log(sessionStorage.getItem("token"));
// // params.append("sprid", );
this.$confirm("是否同意审批", "提示", {
confirmButtonText: "同意",
cancelButtonText: "拒绝",
type: "warning"
}).then(() => {
params.append("spjg", "1");
updateTbYwXnpgbg(params).then(res => {
if (res.code == 200) {
obj.item.fbzt = obj.value;
this.$message.success("审批成功");
this.$refs.rightContent.doQuery("yes");
} else {
this.$message.error("审批失败");
}
});
})
.catch(() => {
params.append("spjg", "0");
updateTbYwXnpgbg(params).then(res => {
if (res.code == 200) {
obj.item.fbzt = obj.value;
this.$message.success("审批成功");
this.$refs.rightContent.doQuery("yes");
} else {
this.$message.error("审批失败");
}
});
});
}
}
};
</script>
<style scoped lang="scss">
button.el-button.el-button--primary {
margin: -36px;
float: right;
}
#export {
margin: 40px 0 50px;
}
.content-mbxx {
margin-left: 20px;
.hbyp {
font-size: 14px;
font-family: Source Han Sans CN;
font-weight: 400;
line-height: 22px;
color: #007aff;
margin-right: 16px;
cursor: pointer;
}
.el-col.el-col-12 {
display: flex;
}
::v-deep .el-dialog__body {
padding: 0 15px !important;
.el-row {
margin: 30px 0;
.el-col {
font-size: 15px;
color: #808591;
span {
color: #363636;
width: 120px;
display: inline-block;
}
}
}
}
}
/deep/ .dialog-person {
.el-dialog {
width: 680px;
height: 446px;
overflow: hidden;
}
.person-tree {
height: 350px;
overflow-y: auto;
}
}
</style>
......@@ -12,11 +12,36 @@
ref="rightContent"
>
<template #btnGroup="scope">
<span class="hbyp" @click="showDetail(scope.scope)">查看</span>
<span class="hbyp" @click="edit(scope.scope)">修改</span>
<!-- <span class="hbyp" @click="showDetail(scope.scope)">查看</span> -->
<span class="hbyp" @click="edit(scope.scope, 'show')">查看</span>
<span class="hbyp" @click="edit(scope.scope, 'enit')">修改</span>
<span class="hbyp" @click="toDelete(scope.scope)">删除</span>
</template>
</right-content>
<el-dialog
title="请选择审批人员"
:visible.sync="userTrue"
class="dialog-person"
width="30%"
:before-close="handleClose"
>
<el-tree
:data="dataUser"
node-key="id"
ref="tree"
class="person-tree"
highlight-current
:props="defaultProps"
show-checkbox
check-strictly
:default-checked-keys="selec"
@check-change="handleNodeClick"
></el-tree>
<span slot="footer" class="dialog-footer" style="display: flex;justify-content: flex-end;">
<el-button @click="userTrue = false">取 消</el-button>
<el-button type="primary" style="margin: 0" @click="btnUpdate">确 定</el-button>
</span>
</el-dialog>
<!-- <el-dialog title="报告详情" :visible.sync="dialogFormVisible" width="70%">
<el-row :gutter="20">
<el-col :span="12"><span>报告标题:</span>{{ xqData.bgbt }}</el-col>
......@@ -67,6 +92,7 @@
<script>
import {
deleteTbYwXnpgbg,
getListUser,
getTbYwXnpgbg,
updateTbYwXnpgbg,
} from "@/api/pgypbggl.js";
......@@ -90,15 +116,15 @@ export default {
index: "queryMbxx",
auth: "M0101",
className: "iconfont iconrizhi",
disabled: false,
},
disabled: false
}
],
pageBs: "queryMbxx",
cxFormData: {
page: 1,
limit: 10,
bglx: "",
fbsj: "",
fbsj: ""
},
cxQueryField: [
{
......@@ -111,7 +137,8 @@ export default {
selectData: [
{ value: "01", name: "个人" },
{ value: "02", name: "单位" },
],
{ value: "03", name: "扫黑除恶" }
]
},
{
name: "发布时间",
......@@ -126,7 +153,7 @@ export default {
label: "信息主键编号",
// toInfor: true,
prop: "xxzjbh",
width: "250",
width: "250"
},
{
label: "报告类型",
......@@ -136,7 +163,7 @@ export default {
{
label: "报告标题",
prop: "bgbt",
width: "200",
width: "200"
},
// {
// label: "报告内容",
......@@ -154,9 +181,21 @@ export default {
// width: "200",
// },
{
label: "审批状态",
prop: "spzt",
status: "status",
width: "200"
},
{
label: "审批结果",
prop: "spjg",
spjg: "spjg",
width: "200"
},
{
label: "发布状态",
prop: "fbzt",
width: "200",
width: "200"
},
{
label: "发布人身份证号",
......@@ -180,13 +219,22 @@ export default {
},
],
cxUrl: "/xnpgbg/pageTbYwXnpgbg",
dataUser: [],
defaultProps: {
children: "children",
label: "trueName"
},
userTrue: false,
selec: [],
selectedTree: {},
objTree: {}
};
},
created() {
this.$store.commit("user/SET_Menu", this.Menu);
},
methods: {
edit(scope) {
edit(scope, bool) {
// console.log('scope', scope)
const param = {
xxzjbh: scope.row.xxzjbh,
......@@ -197,6 +245,7 @@ export default {
bgbt: scope.row.bgbt,
bgnr: scope.row.bgnr,
fbsj: scope.row.djsj,
editshow: bool
};
this.$router.push({ path: "/addMbxx", query: param });
},
......@@ -240,23 +289,74 @@ export default {
});
},
// 发布状态
handleClose() {
this.userTrue = false;
},
handleNodeClick(data, checked) {
if (checked === true) {
this.selectedTree = data;
this.$refs.tree.setCheckedKeys([data.id]);
} else {
if (this.selectedTree.id == data.id) {
this.$refs.tree.setCheckedKeys([data.id]);
}
}
},
handleSwitchs(obj) {
debugger;
this.$confirm("是否修改发布状态", "提示", {
console.log("obj", obj);
if (obj.item.spzt == "1") {
this.$message({
message: "正在审批中!",
type: "warning"
});
} else if (obj.item.spzt == "2" && obj.item.spjg == "1") {
this.$message({
message: "已通过不能修改!",
type: "success"
});
} else if (obj.item.spzt == "2" && obj.item.spjg == "0") {
this.$message({
message: "已拒绝不能修改!",
type: "warning"
});
} else {
this.userTrue = true;
this.objTree = obj;
getListUser({
roleId: "1527260832710737921"
}).then(res => {
if (res.success) {
console.log("123", res);
this.dataUser = res.data.rows;
}
});
}
},
btnUpdate() {
if (!this.selectedTree.id) {
this.$message({
message: '请选择审批人员!',
type: 'warning'
})
} else {
this.$confirm("是否修改发布状态", "提示", {
confirmButtonText: "确定",
cancelButtonText: "取消",
type: "warning",
})
.then(() => {
let params = new FormData();
params.append("xxzjbh", obj.item.xxzjbh);
params.append("fbzt", obj.value);
updateTbYwXnpgbg(params).then((res) => {
// this.selectedTree
params.append("xxzjbh", this.objTree.item.xxzjbh);
params.append("fbzt", this.objTree.value);
params.append("spzt", "1");
params.append("sprid", this.selectedTree.identitycard);
updateTbYwXnpgbg(params).then(res => {
if (res.code == 200) {
debugger;
obj.item.fbzt = obj.value;
this.objTree.item.fbzt = this.objTree.value;
this.$message.success("修改成功");
this.$refs.rightContent.doQuery("yes");
this.userTrue = false;
} else {
this.$message.error("修改失败");
}
......@@ -265,11 +365,12 @@ export default {
.catch(() => {
this.$message({
type: "info",
message: "已取消删除",
message: "已取消删除"
});
});
},
},
}
}
}
};
</script>
<style scoped lang="scss">
......@@ -310,4 +411,16 @@ button.el-button.el-button--primary {
}
}
}
/deep/ .dialog-person {
.el-dialog {
width: 680px;
height: 446px;
overflow: hidden;
}
.person-tree {
height: 350px;
overflow-y: auto;
}
}
</style>
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