Commit bda3b386 authored by 赵啸非's avatar 赵啸非

一件事统一办

parent 731df811
...@@ -257,7 +257,7 @@ CREATE TABLE `mortals_xhx_uploadfile` ( ...@@ -257,7 +257,7 @@ CREATE TABLE `mortals_xhx_uploadfile` (
DROP TABLE IF EXISTS `mortals_xhx_user`; DROP TABLE IF EXISTS `mortals_xhx_user`;
CREATE TABLE `mortals_xhx_user` ( CREATE TABLE `mortals_xhx_user` (
`id` bigint(20) NOT NULL AUTO_INCREMENT COMMENT '用户ID,主键,自增长', `id` bigint(20) NOT NULL AUTO_INCREMENT COMMENT '用户ID,主键,自增长',
`loginName` varchar(50) CHARACTER SET utf8 COLLATE utf8_general_ci NULL DEFAULT NULL COMMENT '登录名', `loginName` varchar(50) CHARACTER SET utf8 COLLATE utf8_general_ci DEFAULT NOT NULL COMMENT '登录名',
`loginPwd` varchar(128) CHARACTER SET utf8 COLLATE utf8_general_ci NULL DEFAULT NULL COMMENT '登录密码,使用md5双次加密', `loginPwd` varchar(128) CHARACTER SET utf8 COLLATE utf8_general_ci NULL DEFAULT NULL COMMENT '登录密码,使用md5双次加密',
`loginPwd1` varchar(128) CHARACTER SET utf8 COLLATE utf8_general_ci NULL DEFAULT NULL COMMENT '最近一次使用密码,使用md5双次加密', `loginPwd1` varchar(128) CHARACTER SET utf8 COLLATE utf8_general_ci NULL DEFAULT NULL COMMENT '最近一次使用密码,使用md5双次加密',
`loginPwd2` varchar(128) CHARACTER SET utf8 COLLATE utf8_general_ci NULL DEFAULT NULL COMMENT '最近二次使用密码,使用md5双次加密', `loginPwd2` varchar(128) CHARACTER SET utf8 COLLATE utf8_general_ci NULL DEFAULT NULL COMMENT '最近二次使用密码,使用md5双次加密',
...@@ -268,16 +268,17 @@ CREATE TABLE `mortals_xhx_user` ( ...@@ -268,16 +268,17 @@ CREATE TABLE `mortals_xhx_user` (
`phone` varchar(21) CHARACTER SET utf8 COLLATE utf8_general_ci NULL DEFAULT NULL COMMENT '用户联系电话', `phone` varchar(21) CHARACTER SET utf8 COLLATE utf8_general_ci NULL DEFAULT NULL COMMENT '用户联系电话',
`email` varchar(50) CHARACTER SET utf8 COLLATE utf8_general_ci NULL DEFAULT NULL COMMENT '用户邮箱', `email` varchar(50) CHARACTER SET utf8 COLLATE utf8_general_ci NULL DEFAULT NULL COMMENT '用户邮箱',
`qq` varchar(20) CHARACTER SET utf8 COLLATE utf8_general_ci NULL DEFAULT NULL COMMENT 'QQ号码', `qq` varchar(20) CHARACTER SET utf8 COLLATE utf8_general_ci NULL DEFAULT NULL COMMENT 'QQ号码',
`userType` tinyint(2) NULL DEFAULT NULL COMMENT '用户类型,0:系统用户 1:代理商用户 2:品牌商用户', `userType` tinyint(2) DEFAULT 1 COMMENT '用户类型,0:系统用户 1:普通用户 2:工作人员,默认2',
`status` tinyint(2) NULL DEFAULT 1 COMMENT '用户状态,0:停用,1:正常,2:冻结,3:销户,4:离职,默认1', `siteId` bigint(20) DEFAULT 0 COMMENT '客户ID',
`customerId` bigint(20) NULL DEFAULT NULL COMMENT '客户ID', `status` tinyint(2) DEFAULT 1 COMMENT '用户状态,0:停用,1:正常,2:冻结,3:销户,4:离职,默认1',
`createTime` datetime(0) NULL DEFAULT NULL COMMENT '创建时间', `customerId` bigint(20) DEFAULT NULL COMMENT '客户ID',
`createUserId` bigint(20) NULL DEFAULT NULL COMMENT '创建用户', `createTime` datetime(0) DEFAULT NULL COMMENT '创建时间',
`createUserName` varchar(50) CHARACTER SET utf8 COLLATE utf8_general_ci NULL DEFAULT NULL COMMENT '创建用户名称', `createUserId` bigint(20) DEFAULT NULL COMMENT '创建用户',
`createUserName` varchar(50) CHARACTER SET utf8 COLLATE utf8_general_ci DEFAULT NULL COMMENT '创建用户名称',
`lastLoginTime` datetime(0) NULL DEFAULT NULL COMMENT '最后一次登录时间', `lastLoginTime` datetime(0) NULL DEFAULT NULL COMMENT '最后一次登录时间',
`lastLoginAddress` varchar(21) CHARACTER SET utf8 COLLATE utf8_general_ci NULL DEFAULT NULL COMMENT '最后一次登录地址', `lastLoginAddress` varchar(21) CHARACTER SET utf8 COLLATE utf8_general_ci DEFAULT NULL COMMENT '最后一次登录地址',
`lastModPwdTime` datetime(0) NULL DEFAULT NULL COMMENT '最后修改密码时间', `lastModPwdTime` datetime(0) DEFAULT NULL COMMENT '最后修改密码时间',
`lastModPwdAddr` varchar(21) CHARACTER SET utf8 COLLATE utf8_general_ci NULL DEFAULT NULL COMMENT '最后修改密码地址', `lastModPwdAddr` varchar(21) CHARACTER SET utf8 COLLATE utf8_general_ci DEFAULT NULL COMMENT '最后修改密码地址',
PRIMARY KEY (`id`) USING BTREE, PRIMARY KEY (`id`) USING BTREE,
UNIQUE INDEX `idx_loginName`(`loginName`) USING BTREE UNIQUE INDEX `idx_loginName`(`loginName`) USING BTREE
) ENGINE = InnoDB CHARACTER SET = ujis COLLATE = ujis_japanese_ci COMMENT = '用户信息' ROW_FORMAT = Dynamic; ) ENGINE = InnoDB CHARACTER SET = ujis COLLATE = ujis_japanese_ci COMMENT = '用户信息' ROW_FORMAT = Dynamic;
...@@ -285,7 +286,7 @@ CREATE TABLE `mortals_xhx_user` ( ...@@ -285,7 +286,7 @@ CREATE TABLE `mortals_xhx_user` (
-- ---------------------------- -- ----------------------------
-- Records of mortals_xhx_user -- Records of mortals_xhx_user
-- ---------------------------- -- ----------------------------
INSERT INTO `mortals_xhx_user` VALUES (1, 'admin', '43442676c74ae59f219c2d87fd6bad52', NULL, NULL, NULL, NULL, '系统管理员', '', NULL, NULL, NULL, 1, 1, 5, NULL, NULL, NULL, '2020-10-26 15:08:30', '127.0.0.1', NULL, NULL); INSERT INTO `mortals_xhx_user` VALUES (1, 'admin', '43442676c74ae59f219c2d87fd6bad52', NULL, NULL, NULL, NULL, '系统管理员', '', NULL, NULL, NULL, 1, 1,1, 5, NULL, NULL, NULL, '2020-10-26 15:08:30', '127.0.0.1', NULL, NULL);
-- ---------------------------- -- ----------------------------
-- Table structure for mortals_xhx_valid_code -- Table structure for mortals_xhx_valid_code
......
...@@ -9,6 +9,7 @@ ...@@ -9,6 +9,7 @@
"build": "vue-cli-service build" "build": "vue-cli-service build"
}, },
"dependencies": { "dependencies": {
"@riophae/vue-treeselect": "0.4.0",
"@chenfengyuan/vue-qrcode": "^1.0.2", "@chenfengyuan/vue-qrcode": "^1.0.2",
"@xunlei/vue-context-menu": "^1.0.2", "@xunlei/vue-context-menu": "^1.0.2",
"axios": "^0.18.0", "axios": "^0.18.0",
......
...@@ -289,4 +289,38 @@ export async function getUserListByQuery(query) { ...@@ -289,4 +289,38 @@ export async function getUserListByQuery(query) {
} catch (error) { } catch (error) {
return []; return [];
} }
}; };
\ No newline at end of file
/**
* 构造树型结构数据
* @param {*} data 数据源
* @param {*} id id字段 默认 'id'
* @param {*} parentId 父节点字段 默认 'parentId'
* @param {*} children 孩子节点字段 默认 'children'
* @param {*} rootId 根Id 默认 0
*/
export function handleTree(data, id, parentId, children, rootId) {
console.log("00000000")
id = id || 'id'
parentId = parentId || 'parentId'
children = children || 'children'
rootId = rootId || Math.min.apply(Math, data.map(item => { return item[parentId] })) || 0
//对源数据深度克隆
const cloneData = JSON.parse(JSON.stringify(data))
//循环所有项
console.log("11111",cloneData)
const treeData = cloneData.filter(father => {
let branchArr = cloneData.filter(child => {
//返回每一项的子级数组
return father[id] === child[parentId]
});
branchArr.length > 0 ? father.children = branchArr : '';
//返回第一层
return father[parentId] === rootId;
});
console.log("treeData",treeData)
return treeData != '' ? treeData : data;
};
...@@ -13,6 +13,7 @@ Prototype.install = (Vue, options) => { ...@@ -13,6 +13,7 @@ Prototype.install = (Vue, options) => {
Vue.prototype.$upload = utils.normalCallUpload; // {function} ajax get Vue.prototype.$upload = utils.normalCallUpload; // {function} ajax get
Vue.prototype.$isLogin = utils.getLoginStatus; // {function} 登录状态 Vue.prototype.$isLogin = utils.getLoginStatus; // {function} 登录状态
Vue.prototype.$cookie = cookie; // {object} cookie操作 Vue.prototype.$cookie = cookie; // {object} cookie操作
Vue.prototype.$handleTree = utils.handleTree; // {function} 获取js对象类型
} }
export default Prototype; export default Prototype;
...@@ -18,6 +18,7 @@ ...@@ -18,6 +18,7 @@
:label="column.label" :label="column.label"
:width="column.width" :width="column.width"
:sortable="column.sortable" :sortable="column.sortable"
:show-overflow-tooltip="column.tooltip"
:align="column.align || 'left'" :align="column.align || 'left'"
:formatter='column.formatter' :formatter='column.formatter'
:subColumns='column.subColumns' :subColumns='column.subColumns'
......
...@@ -7,7 +7,7 @@ ...@@ -7,7 +7,7 @@
<el-input :disabled='disabled' :placeholder='placeholder' v-model="field" @change="emit" @input="emit" v-if='type === "text"' :class="inputClass" :clearable='clearable'></el-input> <el-input :disabled='disabled' :placeholder='placeholder' v-model="field" @change="emit" @input="emit" v-if='type === "text"' :class="inputClass" :clearable='clearable'></el-input>
<el-input :disabled='disabled' :placeholder='placeholder' v-model="field" @change="emit" @input="emit" type='password' v-if='type === "password"'></el-input> <el-input :disabled='disabled' :placeholder='placeholder' v-model="field" @change="emit" @input="emit" type='password' v-if='type === "password"'></el-input>
<el-input :disabled='disabled' :placeholder='placeholder' v-model="field" @change="emit" @input="emit" v-if='type === "textarea"' type='textarea' :autosize="textareaSize" :class="inputClass"></el-input> <el-input :disabled='disabled' :placeholder='placeholder' v-model="field" @change="emit" :rows='rows' @input="emit" v-if='type === "textarea"' type='textarea' :autosize="textareaSize" :class="inputClass"></el-input>
<el-select :disabled='disabled' v-model="field" @change="emit" :multiple='multiple' :filterable='filterable' :clearable='clearable' v-if='type === "select"'> <el-select :disabled='disabled' v-model="field" @change="emit" :multiple='multiple' :filterable='filterable' :clearable='clearable' v-if='type === "select"'>
<el-option <el-option
......
...@@ -11,18 +11,17 @@ import Filter from './assets/utils/filter.js' ...@@ -11,18 +11,17 @@ import Filter from './assets/utils/filter.js'
import GlobalComponents from './assets/utils/globalComponents.js' import GlobalComponents from './assets/utils/globalComponents.js'
import MuseUI from 'muse-ui'; import MuseUI from 'muse-ui';
import 'muse-ui/dist/muse-ui.css'; import 'muse-ui/dist/muse-ui.css';
import Global from './assets/utils/global.js'
import Vue2OrgTree from 'vue2-org-tree';
Vue.config.productionTip = false Vue.config.productionTip = false
Vue.use(Vue2OrgTree)
Vue.use(ElementUI); Vue.use(ElementUI);
Vue.use(MuseUI); Vue.use(MuseUI);
Vue.use(Prototype); Vue.use(Prototype);
Vue.use(Filter); Vue.use(Filter);
Vue.use(GlobalComponents); // 全局组件 Vue.use(GlobalComponents); // 全局组件
Vue.prototype.Global = Global;
new Vue({ new Vue({
router, router,
store, store,
......
...@@ -28,16 +28,18 @@ const router = new Router({ ...@@ -28,16 +28,18 @@ const router = new Router({
...restBuilder('param', 'system/param'), // 系统管理--参数管理 ...restBuilder('param', 'system/param'), // 系统管理--参数管理
...restBuilder('task', 'system/task'), // 系统管理--任务管理 ...restBuilder('task', 'system/task'), // 系统管理--任务管理
...restBuilder('area', 'system/area'), // 系统管理-区域管理 ...restBuilder('area', 'system/area'), // 系统管理-区域管理
builder('site/list', 'system/site/index'),//站点
//工作流业务模块 //工作流业务模块
...restBuilder('flowable/definition', 'flowable/definition'), // 流程定义类 ...restBuilder('flowable/definition', 'flowable/definition'), // 流程定义类
builder('flowable/definition/model', 'flowable/definition/model'),//流程设计器
...restBuilder('form', 'flowable/task/form'),//表单列表
builder('tool/build/index', 'tool/build/index'),//表单设计器
builder('flowable/task/record/index', 'flowable/task/record/index'),//流程申请 builder('flowable/task/record/index', 'flowable/task/record/index'),//流程申请
...restBuilder('task/process', 'flowable/task/process'), //我的流程 ...restBuilder('task/process', 'flowable/task/process'), //我的流程
...restBuilder('task/todo', 'flowable/task/todo'), //代办列表 ...restBuilder('task/todo', 'flowable/task/todo'), //代办列表
...restBuilder('task/finish', 'flowable/task/finished'), //已办列表 ...restBuilder('task/finish', 'flowable/task/finished'), //已办列表
...restBuilder('healthinfo/apply', 'healthinfo/apply'), //健康列表
...restBuilder('information', 'information'), //办件列表 ...restBuilder('information', 'information'), //办件列表
...@@ -45,21 +47,16 @@ const router = new Router({ ...@@ -45,21 +47,16 @@ const router = new Router({
...restBuilder('yth/onething', 'onething'), // 一件事管理-微信人员提交审核材料 ...restBuilder('yth/onething', 'onething'), // 一件事管理-微信人员提交审核材料
//在此添加业务模块
builder('/basics/index', 'basics/index'),//事项工作台
...restBuilder('basics', 'basics'), // 一件事管理-一件事
...restBuilder('basics/info', 'basics/info'), // 一件事管理-基本信息
...restBuilder('accept', 'accept'), // 一件事管理-申请条件
...restBuilder('flowlimit', 'flowlimit'), // 一件事管理-办理流程
//问题引导页面 //问题引导页面
builder('one/classify/list', 'one/classify/list'),//分类引导表 builder('one/classify/list', 'one/classify/list'),//分类引导表
...restBuilder('matter', 'matter'), // 事项管理 ...restBuilder('matter', 'matter'), // 事项管理
...restBuilder('matter/datum', 'matter/datum'), // 事项材料管理 ...restBuilder('matter/datum', 'matter/datum'), // 事项材料管理
...restBuilder('matter/accept', 'matter/accept'), // 事项受理条件管理
...restBuilder('matter/flowlimit', 'matter/flowlimit'), // 事项办理流程管理
...restBuilder('matter/question', 'matter/question'), // 事项常见问题管理
...restBuilder('datum', 'datum'), // 一件事管理-材料库 ...restBuilder('datum', 'datum'), // 一件事管理-材料库
//以下为基础路由配置 //以下为基础路由配置
......
<template>
<div class="page">
<LayoutTable :data="tableData" :config="tableConfig" notSearch />
</div>
</template>
<script>
import table from "@/assets/mixins/table";
export default {
mixins: [table],
created() {
const { basicsId } = this.$route.query;
this.config.addQuery = { basicsId: basicsId };
},
methods: {
beforeRender(data) {
return data;
},
formterApplyStr(arrs) {
let temp = [];
for (let i = 0; i < arrs.length; i++) {
let str = "";
str += i + 1 + ": " + arrs[i].content + "\n";
temp.push(str);
}
return temp.join("");
},
},
data() {
return {
config: {
search: [],
columns: [
{ type: "selection", width: 60 },
{ label: "模板标题", prop: "title", width: 200 },
{
label: "申请条件",
prop: "content",
formatter: (row) => {
let content = this.formterApplyStr(JSON.parse(row.content));
return <span style="white-space: pre-wrap">{content}</span>;
},
},
{
label: "操作",
width: 180,
formatter: (row) => {
return (
<div>
<el-button
type="primary"
icon="el-icon-edit"
round
size="mini"
onClick={() => {
this.toEdit(row);
}}
>
编辑
</el-button>
</div>
);
},
},
],
},
};
},
};
</script>
\ No newline at end of file
<template>
<layout-form>
<el-dialog
:title="applyDialog.title"
:visible.sync="applyDialog.visible"
width="800px"
append-to-body
>
<!--表单添加-->
<el-form label-width="80px">
<div>
<el-button size="mini" plain type="success" @click="addListRow()"
>新增申请条件</el-button
>
<el-table
:data="dynamicForm.options"
border
style="width: 100%; margin-top: 15px"
>
<el-table-column label="内容" align="center">
<template slot-scope="scope">
<el-form-item
label-width="0"
:prop="'options.' + scope.$index + '.content'"
>
<el-input
type="textarea"
v-model="scope.row.content"
placeholder="请输入内容"
></el-input>
</el-form-item>
</template>
</el-table-column>
<el-table-column label="操作" width="160" align="center">
<template slot-scope="scope">
<el-form-item label-width="0">
<el-button
size="mini"
type="text"
icon="el-icon-delete"
@click="handTableDelete(scope.$index, scope.row)"
>删除</el-button
>
</el-form-item>
</template>
</el-table-column>
</el-table>
</div>
</el-form>
<div slot="footer" class="dialog-footer">
<el-button type="primary" @click="applyConfirm">确 定</el-button>
<el-button @click="cancel">取 消</el-button>
</div>
</el-dialog>
<el-form
:model="form"
:loading="loading"
:rules="rules"
size="small"
style="width: 100%"
label-width="120px"
ref="form"
>
<el-row>
<Field
span="14"
label="模板标题"
prop="title"
v-model="form.title"
placeholder="请输入模板标题"
/>
<el-col span="12">
<el-form-item label="申请条件" class="my-form-field">
<el-button @click.prevent="handEditApply(form.content)"
>编辑申请条件</el-button
>
<br />
<span style="white-space: pre-wrap">{{ content }}</span>
</el-form-item>
</el-col>
</el-row>
<form-buttons @submit="submitForm" />
</el-form>
</layout-form>
</template>
<script>
import form from "@/assets/mixins/form";
export default {
mixins: [form],
created() {
const { basicsId } = this.$route.query;
this.form.basicsId = basicsId;
},
methods: {
beforeRender(data) {
console.log("渲染前", data);
if (data.entity.content && data.entity.content.length > 0) {
this.dynamicForm.options = JSON.parse(data.entity.content);
this.content = this.formterApplyStr(this.dynamicForm.options);
}
return data;
},
handTableDelete(index, val) {
this.dynamicForm.options.splice(index, 1);
},
handEditApply(val) {
this.applyDialog.visible = true;
},
applyConfirm() {
//确定 组装qa
this.content = this.formterApplyStr(this.dynamicForm.options);
this.form.content = JSON.stringify(this.dynamicForm.options);
this.applyDialog.visible = false;
},
formterApplyStr(arrs) {
let temp = [];
for (let i=0; i < arrs.length; i++) {
let str = "";
str += (i+1) + ": " + arrs[i].content + "\n";
temp.push(str);
}
return temp.join("");
},
cancel() {
this.applyDialog.visible = false;
},
addListRow() {
this.dynamicForm.options.push({
content: "",
});
},
},
data() {
return {
applyDialog: {
visible: false,
title: "申请条件",
},
content: "",
dynamicForm: {
options: [],
},
rules: {
title: [
{ required: true, message: "请输入申请条件", trigger: "blur" },
{ max: 64, message: "最多只能录入64个字符", trigger: "blur" },
],
content: [
{ required: true, message: "请输入申请条件", trigger: "blur" },
{ max: 65535, message: "最多只能录入65535个字符", trigger: "blur" },
],
},
};
},
};
</script>
\ No newline at end of file
<template>
<div class="page">
<LayoutTable :data='tableData' :config='tableConfig' />
</div>
</template>
<script>
import table from "@/assets/mixins/table";
export default {
mixins: [table],
data() {
return {
config: {
search: [
],
columns: [
{type: "selection", width: 60},
{label: "变更时间", prop: "updatetime", formatter: this.formatterDate},
{label: "变更用户loginName", prop: "updateuser"},
{
label: "操作",
width: 180,
formatter: row => {
return (
<div><el-button type="primary" icon="el-icon-edit" round size='mini' onClick={()=>{this.toEdit(row)}}>编辑</el-button></div>
);
}
}
]
}
};
}
};
</script>
\ No newline at end of file
<template>
<layout-form>
<el-form :model="form" :loading="loading" :rules="rules" size='small' style="width:100%" label-width='120px' ref="form">
<el-row>
<Field label="一件事基础表 one_basics id" prop="basicsId" v-model="form.basicsId" placeholder="请输入一件事基础表 one_basics id"/>
<Field label="材料id " prop="oneDatumIds" v-model="form.oneDatumIds" placeholder="请输入材料id "/>
<Field label="变更时间" prop="updateTime" v-model="form.updateTime" placeholder="请输入变更时间"/>
<Field label="变更用户loginName" prop="updateUser" v-model="form.updateUser" placeholder="请输入变更用户loginName"/>
</el-row>
<form-buttons @submit='submitForm'/>
</el-form>
</layout-form>
</template>
<script>
import form from "@/assets/mixins/form";
export default {
mixins: [form],
data() {
return {
rules: {
updatetime:[{required: true, message: '请输入变更时间', trigger: 'blur'},],
updateUser:[{required: true, message: '请输入变更用户loginName', trigger: 'blur'},
{max: 50, message: '最多只能录入50个字符', trigger: 'blur'}],
}
};
}
};
</script>
\ No newline at end of file
This diff is collapsed.
<template>
<div class="page">
<LayoutTable :data="tableData" :config="tableConfig" notDel notSearch />
</div>
</template>
<script>
import table from "@/assets/mixins/table";
export default {
mixins: [table],
created() {
const { basicsId } = this.$route.query;
this.config.addQuery = { basicsId: basicsId };
},
methods: {
beforeRender(data) {
return data;
},
},
data() {
return {
config: {
search: [],
columns: [
{ label: "模板标题", prop: "title" },
{ label: "办理机构", prop: "jointInfoShow" },
{ label: "法定时限", prop: "legalTimeLimitShow" },
{ label: "承诺时限", prop: "promiseTimeLimitShow" },
{ label: "收费金额", prop: "charges" },
{ label: "办公时间", prop: "handleTimeShow" },
{ label: "办公地址", prop: "handlePlaceShow" },
{ label: "咨询电话", prop: "cousultingTelephoneShow" },
{ label: "投诉电话", prop: "supervisoryTelephoneShow" },
{ label: "结果信息", prop: "resultInfo" },
{
label: "操作",
width: 180,
formatter: (row) => {
return (
<div>
<el-button
type="primary"
icon="el-icon-edit"
round
size="mini"
onClick={() => {
this.toEdit(row);
}}
>
编辑
</el-button>
</div>
);
},
},
],
},
};
},
};
</script>
<template>
<div class="page">
<LayoutTable :data="tableData" :config="tableConfig" />
<!-- 查看二维码弹窗 -->
<el-dialog title="一次办二维码" :visible.sync="qrCodeDialog.visible" width="350px">
<img :src="qrCodeDialog.qrCode" />
<p style="word-wrap: break-word">{{ qrCodeDialog.qrCodeUrl }}</p>
</el-dialog>
</div>
</template>
<script>
import table from "@/assets/mixins/table";
export default {
name: "basics",
components: {},
mixins: [table],
created() {},
methods: {
async viewQrCode(id) {
try {
const { qrCode, qrCodeUrl } = await this.$post("/basics/viewQrCode", {
"entity.id": id,
});
this.qrCodeDialog.qrCode = qrCode;
this.qrCodeDialog.qrCodeUrl = qrCodeUrl;
this.qrCodeDialog.visible = true;
} catch (error) {
this.$message.error(error.message);
}
},
handPlatform(row) {
this.$router.push({
path: "/basics/index",
query: { basicsId: row.id },
});
},
async handAddBaseInfo(row) {
try {
this.$router.push({
path: "/basics/info/list",
query: {
basicsId: row.id
},
});
} catch (error) {
this.$message.error(error.message);
}
},
async handAddApplyCondition(row) {
try {
this.$router.push({
path: "/accept/list",
query: {
basicsId: row.id
},
});
} catch (error) {
this.$message.error(error.message);
}
},
async handAddFlow(row) {
try {
this.$router.push({
path: "/flowlimit/list",
query: {
basicsId: row.id
},
});
} catch (error) {
this.$message.error(error.message);
}
},
},
data() {
return {
qrCodeDialog: {
visible: false,
qrCode: "",
qrCodeUrl: "",
},
config: {
search: [],
columns: [
{ type: "selection", width: 60 },
{ label: "一件事标题", prop: "tname" },
{
label: "二维码",
prop: "qrcode",
formatter: (row) => {
return (
<el-button
type='text'
onClick={() => {
this.viewQrCode(row.id);
}}>
二维码
</el-button>
);
},
},
{
label: "创建时间",
prop: "createTime",
formatter: this.formatterDate,
},
{
label: "操作",
width: 320,
formatter: (row) => {
return (
<div>
<el-row>
<el-button
size='mini'
icon='el-icon-edit'
size='mini'
onClick={() => {
this.toEdit(row);
}}>
编辑
</el-button>
<span> </span>
<el-button
size='mini'
icon='el-icon-edit-outline'
size='mini'
onClick={() => {
this.handPlatform(row);
}}>
事项工作台
</el-button>
<span> </span>
<el-button
size='mini'
icon='el-icon-edit-outline'
size='mini'
onClick={() => {
this.handAddBaseInfo(row);
}}>
基本信息
</el-button>
<span> </span>
</el-row>
<el-row style='margin-top:10px'>
<el-button
size='mini'
icon='el-icon-edit-outline'
size='mini'
onClick={() => {
this.handAddApplyCondition(row);
}}>
申请条件
</el-button>
<span> </span>
<el-button
size='mini'
icon='el-icon-edit-outline'
size='mini'
onClick={() => {
this.handAddFlow(row);
}}>
办理流程
</el-button>
<span> </span>
<Confirm message='确定要删除该事件吗?' onConfirm={() => this.toDel(row.id)}>
<el-button size='mini' icon='el-icon-delete' size='mini'>
删除
</el-button>
</Confirm>
<span> </span>
</el-row>
</div>
);
},
},
],
},
};
},
};
</script>
This diff is collapsed.
<template>
<div class="page">
<LayoutTable :data='tableData' :config='tableConfig' />
</div>
</template>
<script>
import table from "@/assets/mixins/table";
export default {
mixins: [table],
data() {
return {
config: {
search: [
],
columns: [
{type: "selection", width: 60},
{label: "分类名称", prop: "name"},
{label: "父级选项id", prop: "optionids"},
{label: "变更时间", prop: "updatetime", formatter: this.formatterDate},
{label: "变更用户loginName", prop: "updateuser"},
{
label: "操作",
width: 180,
formatter: row => {
return (
<div><el-button type="primary" icon="el-icon-edit" round size='mini' onClick={()=>{this.toEdit(row)}}>编辑</el-button></div>
);
}
}
]
}
};
}
};
</script>
\ No newline at end of file
<template>
<div class="page">
<LayoutTable :data='tableData' :config='tableConfig' />
</div>
</template>
<script>
import table from "@/assets/mixins/table";
export default {
mixins: [table],
data() {
return {
config: {
search: [
],
columns: [
{type: "selection", width: 60},
{label: "选项名称", prop: "name"},
{label: "备注", prop: "summary"},
{label: "变更时间", prop: "updatetime", formatter: this.formatterDate},
{label: "变更用户loginName", prop: "updateuser"},
{
label: "操作",
width: 180,
formatter: row => {
return (
<div><el-button type="primary" icon="el-icon-edit" round size='mini' onClick={()=>{this.toEdit(row)}}>编辑</el-button></div>
);
}
}
]
}
};
}
};
</script>
\ No newline at end of file
<template>
<layout-form>
<el-form :model="form" :loading="loading" :rules="rules" size='small' style="width:100%" label-width='120px' ref="form">
<el-row>
<Field label="一件事问题表id" prop="classifyId" v-model="form.classifyId" placeholder="请输入一件事问题表id"/>
<Field label="一件事下个问题id" prop="classifyNextId" v-model="form.classifyNextId" placeholder="请输入一件事下个问题id"/>
<Field label="选项名称" prop="name" v-model="form.name" placeholder="请输入选项名称"/>
<Field label="是否最终节点 0否 1是" prop="isend" v-model="form.isend" placeholder="请输入是否最终节点 0否 1是"/>
<Field label="基本信息模板id" prop="basicsinfoId" v-model="form.basicsinfoId" placeholder="请输入基本信息模板id"/>
<Field label="申请条件id" prop="acceptId" v-model="form.acceptId" placeholder="请输入申请条件id"/>
<Field label="办理流程id" prop="flowlimitId" v-model="form.flowlimitId" placeholder="请输入办理流程id"/>
<Field label="事项关联id" prop="matterId" v-model="form.matterId" placeholder="请输入事项关联id"/>
<Field label="材料id" prop="datumId" v-model="form.datumId" placeholder="请输入材料id"/>
<Field label="备注类型 1常规备注 2终结备注" prop="summaryType" v-model="form.summaryType" placeholder="请输入备注类型 1常规备注 2终结备注"/>
<Field label="备注" prop="summary" v-model="form.summary" placeholder="请输入备注"/>
<Field label="变更时间" prop="updateTime" v-model="form.updateTime" placeholder="请输入变更时间"/>
<Field label="变更用户loginName" prop="updateUser" v-model="form.updateUser" placeholder="请输入变更用户loginName"/>
</el-row>
<form-buttons @submit='submitForm'/>
</el-form>
</layout-form>
</template>
<script>
import form from "@/assets/mixins/form";
export default {
mixins: [form],
data() {
return {
rules: {
name:[
{max: 255, message: '最多只能录入255个字符', trigger: 'blur'}],
summary:[
{max: 256, message: '最多只能录入256个字符', trigger: 'blur'}],
updatetime:[{required: true, message: '请输入变更时间', trigger: 'blur'},],
updateUser:[{required: true, message: '请输入变更用户loginName', trigger: 'blur'},
{max: 50, message: '最多只能录入50个字符', trigger: 'blur'}],
}
};
}
};
</script>
\ No newline at end of file
<template>
<div class="page">
<LayoutTable :data='tableData' :config='tableConfig' />
</div>
</template>
<script>
import table from "@/assets/mixins/table";
export default {
mixins: [table],
data() {
return {
config: {
search: [
],
columns: [
{type: "selection", width: 60},
{label: "基础信息json", prop: "basicsjson"},
{label: "申请条件json", prop: "acceptjson"},
{label: "办理流程json", prop: "flowlimitjson"},
{label: "最终选择的材料id one_datum", prop: "onedatumids"},
{label: "变更时间", prop: "updatetime", formatter: this.formatterDate},
{label: "变更用户loginName", prop: "updateuser"},
{
label: "操作",
width: 180,
formatter: row => {
return (
<div><el-button type="primary" icon="el-icon-edit" round size='mini' onClick={()=>{this.toEdit(row)}}>编辑</el-button></div>
);
}
}
]
}
};
}
};
</script>
\ No newline at end of file
<template>
<layout-form>
<el-form :model="form" :loading="loading" :rules="rules" size='small' style="width:100%" label-width='120px' ref="form">
<el-row>
<Field label="一件事分类表id" prop="classifyId" v-model="form.classifyId" placeholder="请输入一件事分类表id"/>
<Field label="基础信息json" prop="basicsJson" v-model="form.basicsJson" placeholder="请输入基础信息json"/>
<Field label="申请条件json" prop="acceptJson" v-model="form.acceptJson" placeholder="请输入申请条件json"/>
<Field label="办理流程json" prop="flowlimitJson" v-model="form.flowlimitJson" placeholder="请输入办理流程json"/>
<Field label="最终选择的材料id one_datum" prop="oneDatumIds" v-model="form.oneDatumIds" placeholder="请输入最终选择的材料id one_datum"/>
<Field label="变更时间" prop="updateTime" v-model="form.updateTime" placeholder="请输入变更时间"/>
<Field label="变更用户loginName" prop="updateUser" v-model="form.updateUser" placeholder="请输入变更用户loginName"/>
</el-row>
<form-buttons @submit='submitForm'/>
</el-form>
</layout-form>
</template>
<script>
import form from "@/assets/mixins/form";
export default {
mixins: [form],
data() {
return {
rules: {
basicsJson:[{required: true, message: '请输入基础信息json', trigger: 'blur'},
{max: 65535, message: '最多只能录入65535个字符', trigger: 'blur'}],
acceptJson:[{required: true, message: '请输入申请条件json', trigger: 'blur'},
{max: 65535, message: '最多只能录入65535个字符', trigger: 'blur'}],
flowlimitJson:[{required: true, message: '请输入办理流程json', trigger: 'blur'},
{max: 65535, message: '最多只能录入65535个字符', trigger: 'blur'}],
oneDatumIds:[{required: true, message: '请输入最终选择的材料id one_datum', trigger: 'blur'},
{max: 65535, message: '最多只能录入65535个字符', trigger: 'blur'}],
updatetime:[{required: true, message: '请输入变更时间', trigger: 'blur'},],
updateUser:[{required: true, message: '请输入变更用户loginName', trigger: 'blur'},
{max: 50, message: '最多只能录入50个字符', trigger: 'blur'}],
}
};
}
};
</script>
\ No newline at end of file
<template>
<layout-form>
<el-form :model="form" :loading="loading" :rules="rules" size='small' style="width:100%" label-width='120px' ref="form">
<el-row>
<Field label="一件事表 one_basics id" prop="basicsId" v-model="form.basicsId" placeholder="请输入一件事表 one_basics id"/>
<Field label="分类名称" prop="name" v-model="form.name" placeholder="请输入分类名称"/>
<Field label="题目类型 1单选 2多选" prop="type" v-model="form.type" placeholder="请输入题目类型 1单选 2多选"/>
<Field label="是否必答 0否 1是" prop="ismust" v-model="form.ismust" placeholder="请输入是否必答 0否 1是"/>
<Field label="级数" prop="level" v-model="form.level" placeholder="请输入级数"/>
<Field label="父级选项id" prop="optionIds" v-model="form.optionIds" placeholder="请输入父级选项id"/>
<Field label="变更时间" prop="updateTime" v-model="form.updateTime" placeholder="请输入变更时间"/>
<Field label="变更用户loginName" prop="updateUser" v-model="form.updateUser" placeholder="请输入变更用户loginName"/>
</el-row>
<form-buttons @submit='submitForm'/>
</el-form>
</layout-form>
</template>
<script>
import form from "@/assets/mixins/form";
export default {
mixins: [form],
data() {
return {
rules: {
name:[
{max: 255, message: '最多只能录入255个字符', trigger: 'blur'}],
optionIds:[
{max: 20, message: '最多只能录入20个字符', trigger: 'blur'}],
updatetime:[{required: true, message: '请输入变更时间', trigger: 'blur'},],
updateUser:[{required: true, message: '请输入变更用户loginName', trigger: 'blur'},
{max: 50, message: '最多只能录入50个字符', trigger: 'blur'}],
}
};
}
};
</script>
\ No newline at end of file
<template>
<div class="page">
<LayoutTable :data="tableData" :config="tableConfig" notAdd notDel>
<el-button
slot="table-head-left2"
style="margin-left: 10px"
icon="el-icon-plus"
size="mini"
@click="handleAdd"
>新增</el-button
>
<el-button
slot="table-head-left2"
style="margin-left: 10px"
icon="el-icon-download"
size="mini"
@click="handleExport"
>导出</el-button
>
</LayoutTable>
<!-- 添加或修改流程表单对话框 -->
<el-dialog :title="title" :visible.sync="open" width="500px" append-to-body>
<el-form ref="form" :model="form" :rules="rules" label-width="80px">
<el-form-item label="表单名称" prop="formName">
<el-input v-model="form.formName" placeholder="请输入表单名称" />
</el-form-item>
<el-form-item label="表单内容">
<editor v-model="form.formContent" :min-height="192" />
</el-form-item>
<el-form-item label="备注" prop="remark">
<el-input v-model="form.remark" placeholder="请输入备注" />
</el-form-item>
</el-form>
<div slot="footer" class="dialog-footer">
<el-button type="primary" @click="submitForm">确 定</el-button>
<el-button @click="cancel">取 消</el-button>
</div>
</el-dialog>
<!--表单配置详情-->
<el-dialog
:title="formTitle"
:visible.sync="formConfOpen"
width="60%"
append-to-body
>
<div class="test-form">
<parser :key="new Date().getTime()" :form-conf="formConf" />
</div>
</el-dialog>
</div>
</template>
<script>
import { listForm, getForm, delForm, addForm, updateForm, exportForm } from "@/api/flowable/form";
import table from "@/assets/mixins/table";
import Editor from "@/components/Editor";
import Parser from "@/components/parser/Parser";
export default {
name: "Form",
components: {
Editor,
Parser,
},
mixins: [table],
methods: {
/** 查询流程表单列表 */
// getList() {
// this.loading = true;
// listForm(this.queryParams).then((response) => {
// this.formList = response.rows;
// this.total = response.total;
// this.loading = false;
// });
// },
// 取消按钮
// cancel() {
// this.open = false;
// this.reset();
// },
// // 表单重置
// reset() {
// this.form = {
// formId: null,
// formName: null,
// formContent: null,
// createTime: null,
// updateTime: null,
// createBy: null,
// updateBy: null,
// remark: null,
// };
// this.resetForm("form");
// },
/** 表单配置信息 */
handleDetail(row) {
console.log("详细");
this.formConfOpen = true;
this.formTitle = "流程表单配置详细";
this.formConf = JSON.parse(row.formContent);
},
/** 新增按钮操作 */
handleAdd() {
// this.reset();
// this.open = true;
// this.title = "添加流程表单";
console.log("新增表单!");
this.$router.push({
path: "/tool/build/index",
query: { formId: null },
});
},
/** 修改按钮操作 */
handleUpdate(row) {
// this.reset();
// const formId = row.formId || this.ids
// getForm(formId).then(response => {
// this.form = response.data;
// this.open = true;
// this.title = "修改流程表单";
// });
console.log("row",row);
this.$router.push({
path: "/tool/build/index",
query: { formId: row.id },
});
},
/** 提交按钮 */
submitForm() {
this.$refs["form"].validate((valid) => {
if (valid) {
if (this.form.formId != null) {
updateForm(this.form).then((response) => {
this.msgSuccess("修改成功");
this.open = false;
this.getList();
});
} else {
addForm(this.form).then((response) => {
this.msgSuccess("新增成功");
this.open = false;
this.getList();
});
}
}
});
},
/** 删除按钮操作 */
handleDelete(row) {
// const formIds = row.formId || this.ids;
this.$confirm(
'是否确认删除流程表单编号为"' + row.id + '"的数据项?',
"警告",
{
confirmButtonText: "确定",
cancelButtonText: "取消",
type: "warning",
}
)
.then(function () {
return delForm(row.id);
})
.then(() => {
this.getData();
this.$message.success("删除成功");
});
},
/** 导出按钮操作 */
handleExport() {
const queryParams = this.queryParams;
this.$confirm("是否确认导出所有流程表单数据项?", "警告", {
confirmButtonText: "确定",
cancelButtonText: "取消",
type: "warning",
})
.then(function () {
return exportForm(queryParams);
})
.then((response) => {
this.download(response.msg);
});
},
},
data() {
return {
// 遮罩层
loading: true,
// 选中数组
ids: [],
// 非单个禁用
single: true,
// 非多个禁用
multiple: true,
// 显示搜索条件
showSearch: true,
// 总条数
total: 0,
// 流程表单表格数据
formList: [],
// 弹出层标题
title: "",
formConf: {}, // 默认表单数据
formConfOpen: false,
formTitle: "",
// 是否显示弹出层
open: false,
// 查询参数
queryParams: {
pageNum: 1,
pageSize: 10,
formName: null,
formContent: null,
},
// 表单参数
form: {},
// 表单校验
rules: {},
config: {
search: [
{
name: "formName",
type: "text",
label: "表单名称",
},
],
columns: [
{
type: "selection",
width: 60,
},
{
prop: "id",
label: "序号",
},
{
prop: "formName",
label: "表单名称",
},
{
prop: "remark",
label: "备注",
},
{
prop: "createUser",
label: "创建用户",
},
{
prop: "createTime",
label: "创建时间",
width: 140,
formatter: this.formatterDate,
},
{
label: "操作",
width: 180,
formatter: (row) => {
return (
<el-row>
<el-button
size="mini"
type="text"
icon="el-icon-view"
onClick={() => {
this.handleDetail(row);
}}
>
详细
</el-button>
<span> </span>
<el-button
size="mini"
type="text"
icon="el-icon-edit"
onClick={() => {
this.handleUpdate(row);
}}
>
修改
</el-button>
<span> </span>
<el-button
size="mini"
type="text"
icon="el-icon-delete"
onClick={() => {
this.handleDelete(row);
}}
>
删除
</el-button>
</el-row>
);
},
},
],
},
};
},
};
</script>
...@@ -33,46 +33,90 @@ ...@@ -33,46 +33,90 @@
> >
</div> </div>
<el-col :span="16" :offset="6" v-if="variableOpen"> <el-col :span="22" :offset="2" v-if="variableOpen">
<el-descriptions <el-descriptions
style="margin-bottom: 20px; font-size: 14px" style="margin-bottom: 10px; font-size: 14px"
class="margin-top" class="margin-top"
title="申请事项信息" title="申请事项信息"
direction="vertical" direction="vertical"
:column="4" :column="1"
:size="size" :size="size"
border border
> >
<el-descriptions-item> <el-descriptions-item>
<template slot="label"> <template slot="label">
<i class="el-icon-user"></i> <i class="el-icon-notebook-2"></i>
联系人 一次办名称
</template> </template>
{{ entity.linkman }} {{ businessData.oneThingName }}
</el-descriptions-item> </el-descriptions-item>
<el-descriptions-item> <el-descriptions-item>
<template slot="label"> <template slot="label">
<i class="el-icon-mobile-phone"></i> <i class="el-icon-user"></i>
手机号 事项申报内容
</template> </template>
{{ entity.phone }} <el-collapse v-model="activeNames" @change="handleChange">
</el-descriptions-item> <el-collapse-item
style="font-size: 14px"
v-for="(value, key, index) in businessData.matterGroup"
:key="index"
:title="key | ellipsis"
:name="index"
>
<el-descriptions-item>
<template slot="label"> <!--附件列表-->
<i class="el-icon-office-building"></i> <el-table
办理方式 v-if="value.length > 0"
</template> class="down"
本人办理 :data="value"
style="margin-top: 20px; margin-bottom: 10px"
>
<el-table-column
prop="datumName"
width="500px"
label="材料名称"
>
<template slot-scope="scope">
<span style="margin-left: 10px">{{
scope.row.datumName
}}</span>
</template>
</el-table-column>
<el-table-column
width="150px"
prop="fileName"
label="文件名称"
></el-table-column>
<el-table-column width="150px" label="操作">
<template slot-scope="scope">
<el-button size="small" type="text">
<el-link
type="primary"
@click="
downloadDatumFile(
scope.row.matterId,
scope.row.filePath
)
"
>下载</el-link
>
</el-button>
</template>
</el-table-column>
</el-table>
</el-collapse-item>
</el-collapse>
</el-descriptions-item> </el-descriptions-item>
<el-descriptions-item> <el-descriptions-item>
<template slot="label"> <template slot="label">
<i class="el-icon-office-building"></i> <i class="el-icon-tickets"></i>
邮寄地址 描述信息
</template> </template>
{{ entity.address }} {{ businessData.oneThingDesc }}
</el-descriptions-item> </el-descriptions-item>
</el-descriptions> </el-descriptions>
...@@ -88,7 +132,7 @@ ...@@ -88,7 +132,7 @@
<el-table-column prop="datumid" label="材料名称"> <el-table-column prop="datumid" label="材料名称">
<template slot-scope="scope"> <template slot-scope="scope">
<span style="margin-left: 10px">{{ <span style="margin-left: 10px">{{
util_formatter("datumid",scope.row.datumid) util_formatter("datumid", scope.row.datumid)
}}</span> }}</span>
</template> </template>
</el-table-column> </el-table-column>
...@@ -377,7 +421,6 @@ ...@@ -377,7 +421,6 @@
<script> <script>
import { flowRecord } from "@/api/flowable/finished"; import { flowRecord } from "@/api/flowable/finished";
import Parser from "@/components/parser/Parser";
import { import {
definitionStart, definitionStart,
getProcessVariables, getProcessVariables,
...@@ -393,18 +436,24 @@ import { ...@@ -393,18 +436,24 @@ import {
getNextFlowNode, getNextFlowNode,
delegate, delegate,
assignTask, assignTask,
addSignTask addSignTask,
} from "@/api/flowable/todo"; } from "@/api/flowable/todo";
import flow from "@/views/flowable/task/record/flow"; import flow from "@/views/flowable/task/record/flow";
import Form from "../../../../components/Form.vue";
export default { export default {
name: "Record", name: "Record",
components: { components: {
Parser,
flow, flow,
Form,
}, },
props: {}, props: {},
filters: {
ellipsis(value) {
if (!value) return "";
if (value.length > 80) {
return value.slice(0, 80) + "...";
}
return value;
},
},
data() { data() {
return { return {
taskDialog: { taskDialog: {
...@@ -419,6 +468,8 @@ export default { ...@@ -419,6 +468,8 @@ export default {
fileList: [], fileList: [],
datumFileList: [], datumFileList: [],
dict: {}, dict: {},
businessData: {},
activeNames:[0,1,2,3,4,5,6],
loading: true, loading: true,
flowRecordList: [], // 流程流转数据 flowRecordList: [], // 流程流转数据
...@@ -458,7 +509,6 @@ export default { ...@@ -458,7 +509,6 @@ export default {
}, },
created() { created() {
console.log("index", this.$route.query); console.log("index", this.$route.query);
//通过业务id查询详细 //通过业务id查询详细
this.getBusinessDetail(this.$route.query.businessKey); this.getBusinessDetail(this.$route.query.businessKey);
...@@ -498,19 +548,18 @@ export default { ...@@ -498,19 +548,18 @@ export default {
this.finished = this.$route.query && this.$route.query.finished; this.finished = this.$route.query && this.$route.query.finished;
}, },
mounted() { mounted() {
// // 表单数据回填,模拟异步请求场景
// setTimeout(() => {
// // 请求回来的表单数据
// const data = {
// field102: '18836662555'
// }
// // 回填数据
// this.fillFormData(this.formConf, data)
// // 更新表单
// this.key = +new Date().getTime()
// }, 1000)
}, },
methods: { methods: {
downloadDatumFile(id, url) {
console.log("下载地址", url);
// window.open(this.GLOBAL.httpUrl + url, "_self");
console.log(this.GLOBAL);
window.open(this.GLOBAL.http.url + url, "_blank");
//window.location.href = url
},
/** 流程变量赋值 */ /** 流程变量赋值 */
handleCheckChange(val) { handleCheckChange(val) {
if (val instanceof Array) { if (val instanceof Array) {
...@@ -572,13 +621,21 @@ export default { ...@@ -572,13 +621,21 @@ export default {
getBusinessDetail(id) { getBusinessDetail(id) {
//获取业务信息 //获取业务信息
this.$post("/yth/onething/view", { this.$post("/yth/onething/getBusinessDetail", {
id: [id], id: id,
}).then((res) => { }).then((res) => {
console.log("business", res); console.log("business", res);
this.businessData = res.data;
this.entity = res.data.entity; // this.entity = res.data.entity;
}); });
// this.$post("/yth/onething/view", {
// id: [id],
// }).then((res) => {
// console.log("business", res);
// this.entity = res.data.entity;
// });
}, },
// getBusinessFiles(id) { // getBusinessFiles(id) {
...@@ -730,7 +787,7 @@ export default { ...@@ -730,7 +787,7 @@ export default {
this.taskForm.turnToUserId = this.assignee; this.taskForm.turnToUserId = this.assignee;
this.submitAssignTask(); this.submitAssignTask();
} else if (this.taskDialog.type === "addSign") { } else if (this.taskDialog.type === "addSign") {
console.log(this.assignee) console.log(this.assignee);
this.taskForm.addSignUserList = this.assignee; this.taskForm.addSignUserList = this.assignee;
this.submitAddSignTask(); this.submitAddSignTask();
} }
...@@ -790,7 +847,7 @@ export default { ...@@ -790,7 +847,7 @@ export default {
}, },
handleAddSign() { handleAddSign() {
console.log("加签") console.log("加签");
this.taskDialog.title = "加签"; this.taskDialog.title = "加签";
this.taskDialog.visible = true; this.taskDialog.visible = true;
this.taskDialog.type = "addSign"; this.taskDialog.type = "addSign";
...@@ -914,4 +971,6 @@ export default { ...@@ -914,4 +971,6 @@ export default {
width: 100%; width: 100%;
margin-bottom: 20px; margin-bottom: 20px;
} }
</style> </style>
<template>
<div class="page">
<LayoutTable :data="tableData" :config="tableConfig" notSearch />
</div>
</template>
<script>
import table from "@/assets/mixins/table";
export default {
mixins: [table],
created() {
const { basicsId } = this.$route.query;
this.config.addQuery = { basicsId: basicsId };
},
methods: {
beforeRender(data) {
return data;
},
formterApplyStr(arrs) {
let temp = [];
for (let i = 0; i < arrs.length; i++) {
let str = "";
str += i + 1 + ": " + arrs[i].content + "\n";
temp.push(str);
}
return temp.join("");
},
},
data() {
return {
config: {
search: [],
columns: [
{ type: "selection", width: 60 },
{ label: "模板标题", prop: "title",width:280 },
{
label: "办理流程",
prop: "content",
formatter: (row) => {
let content = this.formterApplyStr(JSON.parse(row.content));
return <span style="white-space: pre-wrap">{content}</span>;
},
},
{
label: "操作",
width: 180,
formatter: (row) => {
return (
<div>
<el-button
type="primary"
icon="el-icon-edit"
round
size="mini"
onClick={() => {
this.toEdit(row);
}}
>
编辑
</el-button>
</div>
);
},
},
],
},
};
},
};
</script>
\ No newline at end of file
<template>
<layout-form>
<el-dialog
:title="flowDialog.title"
:visible.sync="flowDialog.visible"
width="800px"
append-to-body
>
<!--表单添加-->
<el-form label-width="80px">
<div>
<el-button size="mini" plain type="success" @click="addListRow()"
>新增办理流程</el-button
>
<el-table
:data="dynamicForm.options"
border
style="width: 100%; margin-top: 15px"
>
<el-table-column label="内容" align="center">
<template slot-scope="scope">
<el-form-item
label-width="0"
:prop="'options.' + scope.$index + '.content'"
>
<el-input
type="textarea"
v-model="scope.row.content"
placeholder="请输入内容"
></el-input>
</el-form-item>
</template>
</el-table-column>
<el-table-column label="操作" width="160" align="center">
<template slot-scope="scope">
<el-form-item label-width="0">
<el-button
size="mini"
type="text"
icon="el-icon-delete"
@click="handTableDelete(scope.$index, scope.row)"
>删除</el-button
>
</el-form-item>
</template>
</el-table-column>
</el-table>
</div>
</el-form>
<div slot="footer" class="dialog-footer">
<el-button type="primary" @click="flowConfirm">确 定</el-button>
<el-button @click="cancel">取 消</el-button>
</div>
</el-dialog>
<el-form
:model="form"
:loading="loading"
:rules="rules"
size="small"
style="width: 100%"
label-width="120px"
ref="form"
>
<el-row>
<Field
label="模板标题"
prop="title"
v-model="form.title"
:span="14"
placeholder="请输入模板标题"
/>
<el-col span="12">
<el-form-item label="办理流程" class="my-form-field">
<el-button @click.prevent="handEditFlow(form.content)"
>编辑办理流程</el-button
>
<br />
<span style="white-space: pre-wrap">{{ content }}</span>
</el-form-item>
</el-col>
</el-row>
<form-buttons @submit="submitForm" />
</el-form>
</layout-form>
</template>
<script>
import form from "@/assets/mixins/form";
export default {
mixins: [form],
created() {
const { basicsId } = this.$route.query;
this.form.basicsId = basicsId;
},
methods: {
beforeRender(data) {
if (data.entity.content && data.entity.content.length > 0) {
this.dynamicForm.options = JSON.parse(data.entity.content);
this.content = this.formterFlowStr(this.dynamicForm.options);
}
return data;
},
handTableDelete(index, val) {
this.dynamicForm.options.splice(index, 1);
},
handEditFlow(val) {
this.flowDialog.visible = true;
},
flowConfirm() {
//确定 组装qa
this.content = this.formterFlowStr(this.dynamicForm.options);
this.form.content = JSON.stringify(this.dynamicForm.options);
this.flowDialog.visible = false;
},
formterFlowStr(arrs) {
let temp = [];
for (let i = 0; i < arrs.length; i++) {
let str = "";
str += i + 1 + ": " + arrs[i].content + "\n";
temp.push(str);
}
return temp.join("");
},
cancel() {
this.flowDialog.visible = false;
},
addListRow() {
this.dynamicForm.options.push({
content: "",
});
},
},
data() {
return {
flowDialog: {
visible: false,
title: "办理流程",
},
content: "",
dynamicForm: {
options: [],
},
rules: {
title: [{ max: 64, message: "最多只能录入64个字符", trigger: "blur" }],
content: [
{ required: true, message: "请输入办理流程", trigger: "blur" },
{ max: 65535, message: "最多只能录入65535个字符", trigger: "blur" },
]
},
};
},
};
</script>
\ No newline at end of file
...@@ -81,6 +81,11 @@ export default { ...@@ -81,6 +81,11 @@ export default {
prop: "mobile", prop: "mobile",
label: "手机号码" label: "手机号码"
}, },
{
prop: "siteName",
label: "所属站点"
},
{ {
prop: "userType", prop: "userType",
label: "用户类型", label: "用户类型",
......
...@@ -16,6 +16,11 @@ ...@@ -16,6 +16,11 @@
<Field label="手机号码" prop="mobile" v-model="form.mobile" /> <Field label="手机号码" prop="mobile" v-model="form.mobile" />
<Field label="用户类型" prop="userType" v-model="form.userType" :enumData='dict.userType' type='select' /> <Field label="用户类型" prop="userType" v-model="form.userType" :enumData='dict.userType' type='select' />
<Field label="用户状态" prop="status" v-model="form.status" :enumData='dict.status' type='select' /> <Field label="用户状态" prop="status" v-model="form.status" :enumData='dict.status' type='select' />
<el-col :span="12">
<el-form-item label="归属站点" prop="siteId">
<treeselect v-model="form.siteId" :options="siteOptions" :show-count="true" placeholder="请选择归属站点" />
</el-form-item>
</el-col>
</el-row> </el-row>
<form-buttons @submit='submitForm'/> <form-buttons @submit='submitForm'/>
</el-form> </el-form>
...@@ -24,11 +29,38 @@ ...@@ -24,11 +29,38 @@
<script> <script>
import form from '@/assets/mixins/form'; import form from '@/assets/mixins/form';
import Treeselect from "@riophae/vue-treeselect";
import "@riophae/vue-treeselect/dist/vue-treeselect.css";
export default { export default {
mixins: [form], mixins: [form],
name: "User",
components: { Treeselect },
created() {
//this.getList();
this.getTreeselect();
},
methods: {
/** 查询部门下拉树结构 */
getTreeselect() {
this.loading = true;
this.$post("/site/treeselect", {})
.then((res) => {
if (res && res.code && res.code == 1) {
this.siteOptions = res.data.result;
this.loading = false;
}
})
.catch((error) => {
this.$message.error(error.message);
});
},
},
data() { data() {
return { return {
toString: ['status', 'userType'], toString: ['status', 'userType'],
siteOptions:[],
rules: { rules: {
loginName: [ loginName: [
{ required: true, message: '请输入登录名称', trigger: 'blur' }, { required: true, message: '请输入登录名称', trigger: 'blur' },
......
...@@ -878,6 +878,13 @@ ...@@ -878,6 +878,13 @@
dependencies: dependencies:
regenerator-runtime "^0.13.4" regenerator-runtime "^0.13.4"
"@babel/runtime@^7.3.1":
version "7.15.4"
resolved "https://registry.nlark.com/@babel/runtime/download/@babel/runtime-7.15.4.tgz?cache=0&other_urls=https%3A%2F%2Fregistry.nlark.com%2F%40babel%2Fruntime%2Fdownload%2F%40babel%2Fruntime-7.15.4.tgz#fd17d16bfdf878e6dd02d19753a39fa8a8d9c84a"
integrity sha1-/RfRa/34eObdAtGXU6OfqKjZyEo=
dependencies:
regenerator-runtime "^0.13.4"
"@babel/template@^7.0.0", "@babel/template@^7.14.5": "@babel/template@^7.0.0", "@babel/template@^7.14.5":
version "7.14.5" version "7.14.5"
resolved "https://registry.nlark.com/@babel/template/download/@babel/template-7.14.5.tgz?cache=0&sync_timestamp=1623280991117&other_urls=https%3A%2F%2Fregistry.nlark.com%2F%40babel%2Ftemplate%2Fdownload%2F%40babel%2Ftemplate-7.14.5.tgz#a9bc9d8b33354ff6e55a9c60d1109200a68974f4" resolved "https://registry.nlark.com/@babel/template/download/@babel/template-7.14.5.tgz?cache=0&sync_timestamp=1623280991117&other_urls=https%3A%2F%2Fregistry.nlark.com%2F%40babel%2Ftemplate%2Fdownload%2F%40babel%2Ftemplate-7.14.5.tgz#a9bc9d8b33354ff6e55a9c60d1109200a68974f4"
...@@ -987,6 +994,20 @@ ...@@ -987,6 +994,20 @@
resolved "https://registry.nlark.com/@nodelib/fs.stat/download/@nodelib/fs.stat-1.1.3.tgz?cache=0&sync_timestamp=1622792692185&other_urls=https%3A%2F%2Fregistry.nlark.com%2F%40nodelib%2Ffs.stat%2Fdownload%2F%40nodelib%2Ffs.stat-1.1.3.tgz#2b5a3ab3f918cca48a8c754c08168e3f03eba61b" resolved "https://registry.nlark.com/@nodelib/fs.stat/download/@nodelib/fs.stat-1.1.3.tgz?cache=0&sync_timestamp=1622792692185&other_urls=https%3A%2F%2Fregistry.nlark.com%2F%40nodelib%2Ffs.stat%2Fdownload%2F%40nodelib%2Ffs.stat-1.1.3.tgz#2b5a3ab3f918cca48a8c754c08168e3f03eba61b"
integrity sha1-K1o6s/kYzKSKjHVMCBaOPwPrphs= integrity sha1-K1o6s/kYzKSKjHVMCBaOPwPrphs=
"@riophae/vue-treeselect@0.4.0":
version "0.4.0"
resolved "https://registry.nlark.com/@riophae/vue-treeselect/download/@riophae/vue-treeselect-0.4.0.tgz#0baed5a794cffc580b63591f35c125e51c0df241"
integrity sha1-C67Vp5TP/FgLY1kfNcEl5RwN8kE=
dependencies:
"@babel/runtime" "^7.3.1"
babel-helper-vue-jsx-merge-props "^2.0.3"
easings-css "^1.0.0"
fuzzysearch "^1.0.3"
is-promise "^2.1.0"
lodash "^4.0.0"
material-colors "^1.2.6"
watch-size "^2.0.0"
"@soda/friendly-errors-webpack-plugin@^1.7.1": "@soda/friendly-errors-webpack-plugin@^1.7.1":
version "1.8.0" version "1.8.0"
resolved "https://registry.nlark.com/@soda/friendly-errors-webpack-plugin/download/@soda/friendly-errors-webpack-plugin-1.8.0.tgz#84751d82a93019d5c92c0cf0e45ac59087cd2240" resolved "https://registry.nlark.com/@soda/friendly-errors-webpack-plugin/download/@soda/friendly-errors-webpack-plugin-1.8.0.tgz#84751d82a93019d5c92c0cf0e45ac59087cd2240"
...@@ -1828,7 +1849,7 @@ babel-eslint@10.1.0: ...@@ -1828,7 +1849,7 @@ babel-eslint@10.1.0:
eslint-visitor-keys "^1.0.0" eslint-visitor-keys "^1.0.0"
resolve "^1.12.0" resolve "^1.12.0"
babel-helper-vue-jsx-merge-props@^2.0.0: babel-helper-vue-jsx-merge-props@^2.0.0, babel-helper-vue-jsx-merge-props@^2.0.3:
version "2.0.3" version "2.0.3"
resolved "https://registry.nlark.com/babel-helper-vue-jsx-merge-props/download/babel-helper-vue-jsx-merge-props-2.0.3.tgz#22aebd3b33902328e513293a8e4992b384f9f1b6" resolved "https://registry.nlark.com/babel-helper-vue-jsx-merge-props/download/babel-helper-vue-jsx-merge-props-2.0.3.tgz#22aebd3b33902328e513293a8e4992b384f9f1b6"
integrity sha1-Iq69OzOQIyjlEyk6jkmSs4T58bY= integrity sha1-Iq69OzOQIyjlEyk6jkmSs4T58bY=
...@@ -3594,6 +3615,11 @@ duplexify@^3.4.2, duplexify@^3.6.0: ...@@ -3594,6 +3615,11 @@ duplexify@^3.4.2, duplexify@^3.6.0:
readable-stream "^2.0.0" readable-stream "^2.0.0"
stream-shift "^1.0.0" stream-shift "^1.0.0"
easings-css@^1.0.0:
version "1.0.0"
resolved "https://registry.nlark.com/easings-css/download/easings-css-1.0.0.tgz#dde569003bb7a4a0c0b77878f5db3e0be5679c81"
integrity sha1-3eVpADu3pKDAt3h49ds+C+VnnIE=
easy-stack@^1.0.1: easy-stack@^1.0.1:
version "1.0.1" version "1.0.1"
resolved "https://registry.nlark.com/easy-stack/download/easy-stack-1.0.1.tgz#8afe4264626988cabb11f3c704ccd0c835411066" resolved "https://registry.nlark.com/easy-stack/download/easy-stack-1.0.1.tgz#8afe4264626988cabb11f3c704ccd0c835411066"
...@@ -4539,6 +4565,11 @@ fuse.js@6.4.3: ...@@ -4539,6 +4565,11 @@ fuse.js@6.4.3:
resolved "https://registry.npm.taobao.org/fuse.js/download/fuse.js-6.4.3.tgz#aadd6ac34aab5b1d6e6c60462fcb4d1c3f53bb01" resolved "https://registry.npm.taobao.org/fuse.js/download/fuse.js-6.4.3.tgz#aadd6ac34aab5b1d6e6c60462fcb4d1c3f53bb01"
integrity sha1-qt1qw0qrWx1ubGBGL8tNHD9TuwE= integrity sha1-qt1qw0qrWx1ubGBGL8tNHD9TuwE=
fuzzysearch@^1.0.3:
version "1.0.3"
resolved "https://registry.npmmirror.com/fuzzysearch/download/fuzzysearch-1.0.3.tgz#dffc80f6d6b04223f2226aa79dd194231096d008"
integrity sha1-3/yA9tawQiPyImqnndGUIxCW0Ag=
gauge@~2.7.3: gauge@~2.7.3:
version "2.7.4" version "2.7.4"
resolved "https://registry.nlark.com/gauge/download/gauge-2.7.4.tgz?cache=0&sync_timestamp=1627308085572&other_urls=https%3A%2F%2Fregistry.nlark.com%2Fgauge%2Fdownload%2Fgauge-2.7.4.tgz#2c03405c7538c39d7eb37b317022e325fb018bf7" resolved "https://registry.nlark.com/gauge/download/gauge-2.7.4.tgz?cache=0&sync_timestamp=1627308085572&other_urls=https%3A%2F%2Fregistry.nlark.com%2Fgauge%2Fdownload%2Fgauge-2.7.4.tgz#2c03405c7538c39d7eb37b317022e325fb018bf7"
...@@ -5531,6 +5562,11 @@ is-plain-object@^2.0.3, is-plain-object@^2.0.4: ...@@ -5531,6 +5562,11 @@ is-plain-object@^2.0.3, is-plain-object@^2.0.4:
dependencies: dependencies:
isobject "^3.0.1" isobject "^3.0.1"
is-promise@^2.1.0:
version "2.2.2"
resolved "https://registry.nlark.com/is-promise/download/is-promise-2.2.2.tgz#39ab959ccbf9a774cf079f7b40c7a26f763135f1"
integrity sha1-OauVnMv5p3TPB597QMeib3YxNfE=
is-regex@^1.0.4, is-regex@^1.1.3: is-regex@^1.0.4, is-regex@^1.1.3:
version "1.1.3" version "1.1.3"
resolved "https://registry.nlark.com/is-regex/download/is-regex-1.1.3.tgz?cache=0&sync_timestamp=1620452573551&other_urls=https%3A%2F%2Fregistry.nlark.com%2Fis-regex%2Fdownload%2Fis-regex-1.1.3.tgz#d029f9aff6448b93ebbe3f33dac71511fdcbef9f" resolved "https://registry.nlark.com/is-regex/download/is-regex-1.1.3.tgz?cache=0&sync_timestamp=1620452573551&other_urls=https%3A%2F%2Fregistry.nlark.com%2Fis-regex%2Fdownload%2Fis-regex-1.1.3.tgz#d029f9aff6448b93ebbe3f33dac71511fdcbef9f"
...@@ -6169,6 +6205,11 @@ matches-selector@^1.2.0: ...@@ -6169,6 +6205,11 @@ matches-selector@^1.2.0:
resolved "https://registry.nlark.com/matches-selector/download/matches-selector-1.2.0.tgz#d1814e7e8f43e69d22ac33c9af727dc884ecf12a" resolved "https://registry.nlark.com/matches-selector/download/matches-selector-1.2.0.tgz#d1814e7e8f43e69d22ac33c9af727dc884ecf12a"
integrity sha1-0YFOfo9D5p0irDPJr3J9yITs8So= integrity sha1-0YFOfo9D5p0irDPJr3J9yITs8So=
material-colors@^1.2.6:
version "1.2.6"
resolved "https://registry.nlark.com/material-colors/download/material-colors-1.2.6.tgz#6d1958871126992ceecc72f4bcc4d8f010865f46"
integrity sha1-bRlYhxEmmSzuzHL0vMTY8BCGX0Y=
md5.js@^1.3.4: md5.js@^1.3.4:
version "1.3.5" version "1.3.5"
resolved "https://registry.nlark.com/md5.js/download/md5.js-1.3.5.tgz#b5d07b8e3216e3e27cd728d72f70d1e6a342005f" resolved "https://registry.nlark.com/md5.js/download/md5.js-1.3.5.tgz#b5d07b8e3216e3e27cd728d72f70d1e6a342005f"
...@@ -9963,6 +10004,11 @@ vuex@3.6.0: ...@@ -9963,6 +10004,11 @@ vuex@3.6.0:
resolved "https://registry.nlark.com/vuex/download/vuex-3.6.0.tgz#95efa56a58f7607c135b053350833a09e01aa813" resolved "https://registry.nlark.com/vuex/download/vuex-3.6.0.tgz#95efa56a58f7607c135b053350833a09e01aa813"
integrity sha1-le+lalj3YHwTWwUzUIM6CeAaqBM= integrity sha1-le+lalj3YHwTWwUzUIM6CeAaqBM=
watch-size@^2.0.0:
version "2.0.0"
resolved "https://registry.nlark.com/watch-size/download/watch-size-2.0.0.tgz#096ee28d0365bd7ea03d9c8bf1f2f50a73be1474"
integrity sha1-CW7ijQNlvX6gPZyL8fL1CnO+FHQ=
watchpack-chokidar2@^2.0.1: watchpack-chokidar2@^2.0.1:
version "2.0.1" version "2.0.1"
resolved "https://registry.nlark.com/watchpack-chokidar2/download/watchpack-chokidar2-2.0.1.tgz#38500072ee6ece66f3769936950ea1771be1c957" resolved "https://registry.nlark.com/watchpack-chokidar2/download/watchpack-chokidar2-2.0.1.tgz#38500072ee6ece66f3769936950ea1771be1c957"
......
...@@ -96,7 +96,7 @@ public class LoginController extends BaseCRUDJsonController<UserService, UserFor ...@@ -96,7 +96,7 @@ public class LoginController extends BaseCRUDJsonController<UserService, UserFor
data.put("id", userEntity.getId()); data.put("id", userEntity.getId());
data.put("userType", userEntity.getUserType()); data.put("userType", userEntity.getUserType());
this.generateBlackCookie(request, response,loginName, urls); this.generateBlackCookie(request, response, loginName, urls);
ret.put(KEY_RESULT_DATA, data); ret.put(KEY_RESULT_DATA, data);
ret.put(KEY_RESULT_CODE, VALUE_RESULT_SUCCESS); ret.put(KEY_RESULT_CODE, VALUE_RESULT_SUCCESS);
ret.put(KEY_RESULT_MSG, "用户登录系统成功!"); ret.put(KEY_RESULT_MSG, "用户登录系统成功!");
...@@ -141,37 +141,35 @@ public class LoginController extends BaseCRUDJsonController<UserService, UserFor ...@@ -141,37 +141,35 @@ public class LoginController extends BaseCRUDJsonController<UserService, UserFor
data.put("id", user.getId()); data.put("id", user.getId());
data.put("userType", user.getUserType()); data.put("userType", user.getUserType());
ret.put(KEY_RESULT_DATA, data); ret.put(KEY_RESULT_DATA, data);
this.generateBlackCookie(request, response,user.getLoginName(), urls); this.generateBlackCookie(request, response, user.getLoginName(), urls);
ret.put(KEY_RESULT_CODE, VALUE_RESULT_SUCCESS); ret.put(KEY_RESULT_CODE, VALUE_RESULT_SUCCESS);
ret.put(KEY_RESULT_MSG, "用户登录系统成功!"); ret.put(KEY_RESULT_MSG, "用户登录系统成功!");
ret.put("resources", urls); ret.put("resources", urls);
return ret.toJSONString(); return ret.toJSONString();
} }
private void generateBlackCookie(HttpServletRequest request, HttpServletResponse response,String loginName, Set<String> urls) { private void generateBlackCookie(HttpServletRequest request, HttpServletResponse response, String loginName, Set<String> urls) {
try { try {
String cacheKey = RedisKey.KEY_MENU_CACHE + loginName; String cacheKey = RedisKey.KEY_MENU_CACHE + loginName;
String securityKey = GlobalSysInfo.getPropertyValue(SysConstains.PROP_COOKIE_SECURITY_KEY); String securityKey = GlobalSysInfo.getPropertyValue(SysConstains.PROP_COOKIE_SECURITY_KEY);
//应为Cookie会超长,所以改为仅存储key将值放入redis //应为Cookie会超长,所以改为仅存储key将值放入redis
//CookieService.setCookieForAuth(request, response, securityKey, null); //CookieService.setCookieForAuth(request, response, securityKey, null);
StringBuilder sb = new StringBuilder(); StringBuilder sb = new StringBuilder();
if(urls != null && urls.size() > 0) if (urls != null && urls.size() > 0) {
{ for (String url : urls) {
for(String url : urls) int index = url.hashCode() & (Integer.MAX_VALUE - 1);
{ sb.append(index).append(",");
int index = url.hashCode() & (Integer.MAX_VALUE-1); }
sb.append(index).append(","); }
} String menuUrl = sb.toString();
} menuUrl = AESUtil.encrypt(menuUrl, securityKey);
String menuUrl = sb.toString(); cacheService.set(cacheKey, menuUrl, 604800);
menuUrl = AESUtil.encrypt(menuUrl, securityKey); HttpUtil.setCookieValue(request, response, SysConstains.COOKIE_MENU, cacheKey, -1);
cacheService.set(cacheKey, menuUrl,604800);
HttpUtil.setCookieValue(request, response, SysConstains.COOKIE_MENU, cacheKey, -1);
} catch (Throwable e) { } catch (Throwable e) {
} }
} }
@RequestMapping("validcode") @RequestMapping("validcode")
public String validCode(HttpServletRequest request, HttpServletResponse response, LoginForm loginForm) { public String validCode(HttpServletRequest request, HttpServletResponse response, LoginForm loginForm) {
...@@ -224,7 +222,7 @@ public class LoginController extends BaseCRUDJsonController<UserService, UserFor ...@@ -224,7 +222,7 @@ public class LoginController extends BaseCRUDJsonController<UserService, UserFor
} }
private static CookieInfo setLoginCookie(HttpServletResponse response, IUser user, String securityKey, private static CookieInfo setLoginCookie(HttpServletResponse response, IUser user, String securityKey,
String cookieDomain, int cookieMaxAge) { String cookieDomain, int cookieMaxAge) {
try { try {
//设置cookie有效串,防篡改 LTPA版本号+创建时间+过期时间+用户名+LTPA密钥 //设置cookie有效串,防篡改 LTPA版本号+创建时间+过期时间+用户名+LTPA密钥
// SHA-1=LTPA版本号+创建时间+过期时间+用户名+Domino LTPA 密钥 // SHA-1=LTPA版本号+创建时间+过期时间+用户名+Domino LTPA 密钥
...@@ -242,6 +240,9 @@ public class LoginController extends BaseCRUDJsonController<UserService, UserFor ...@@ -242,6 +240,9 @@ public class LoginController extends BaseCRUDJsonController<UserService, UserFor
String customerNum = user.getCustomerNum(); String customerNum = user.getCustomerNum();
String customerJson = ""; String customerJson = "";
Long deptId = user.getDeptId(); Long deptId = user.getDeptId();
Long roleId = 0L;
Long siteId = user.getSiteId();
String deptName = user.getDeptName(); String deptName = user.getDeptName();
int deptManager = user.isManager() ? 1 : 0; int deptManager = user.isManager() ? 1 : 0;
if (customerId != null || customerJoinId != null || StringUtils.isNotEmpty(customerNum)) { if (customerId != null || customerJoinId != null || StringUtils.isNotEmpty(customerNum)) {
...@@ -250,7 +251,11 @@ public class LoginController extends BaseCRUDJsonController<UserService, UserFor ...@@ -250,7 +251,11 @@ public class LoginController extends BaseCRUDJsonController<UserService, UserFor
+ DataUtil.conver2Long(customerJoinId) + CookieService.COOKIE_STORE_SPLIT + DataUtil.conver2Long(customerJoinId) + CookieService.COOKIE_STORE_SPLIT
+ StringUtils.trim(customerNum) + CookieService.COOKIE_STORE_SPLIT + StringUtils.trim(customerNum) + CookieService.COOKIE_STORE_SPLIT
+ DataUtil.conver2Int(deptId) + CookieService.COOKIE_STORE_SPLIT + DataUtil.conver2Int(deptId) + CookieService.COOKIE_STORE_SPLIT
+ StringUtils.trim(deptName) + CookieService.COOKIE_STORE_SPLIT + deptManager; + StringUtils.trim(deptName) + CookieService.COOKIE_STORE_SPLIT
+ deptManager + CookieService.COOKIE_STORE_SPLIT
+ roleId + CookieService.COOKIE_STORE_SPLIT
+ siteId
;
customerJson = AESUtil.encrypt(customerJson, securityKey); customerJson = AESUtil.encrypt(customerJson, securityKey);
} catch (Exception e) { } catch (Exception e) {
logger.debug("用户的关联信息加密异常-->" + e.getMessage()); logger.debug("用户的关联信息加密异常-->" + e.getMessage());
......
package com.mortals.xhx.base.system.user.model;
import com.mortals.framework.model.BaseEntityLong;
import lombok.Data;
/**
*
* Description:User
* date: 2021-9-26 16:11:48
*/
@Data
public class UserEntityExt extends BaseEntityLong {
private String siteName;
}
\ No newline at end of file
/** /**
* 文件:UserServiceImpl.java * 文件:UserServiceImpl.java
* 版本:1.0.0 * 版本:1.0.0
* 日期: * 日期:
* Copyright &reg; * Copyright &reg;
* All right reserved. * All right reserved.
*/ */
package com.mortals.xhx.base.system.user.service.impl; package com.mortals.xhx.base.system.user.service.impl;
...@@ -27,8 +27,10 @@ import com.mortals.xhx.base.system.user.model.UserEntity; ...@@ -27,8 +27,10 @@ import com.mortals.xhx.base.system.user.model.UserEntity;
import com.mortals.xhx.base.system.user.model.UserQuery; import com.mortals.xhx.base.system.user.model.UserQuery;
import com.mortals.xhx.base.system.user.service.UserService; import com.mortals.xhx.base.system.user.service.UserService;
import com.mortals.xhx.module.site.service.SiteService;
import org.springframework.beans.factory.annotation.Autowired; import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.stereotype.Service; import org.springframework.stereotype.Service;
import org.springframework.util.ObjectUtils;
import java.util.*; import java.util.*;
...@@ -37,17 +39,19 @@ import java.util.*; ...@@ -37,17 +39,19 @@ import java.util.*;
* <p>Description: UserServiceImpl service接口 </p> * <p>Description: UserServiceImpl service接口 </p>
* <p>Copyright: Copyright &reg; </p> * <p>Copyright: Copyright &reg; </p>
* <p>Company: </p> * <p>Company: </p>
* @author * @author
* @version 1.0.0 * @version 1.0.0
*/ */
@Service("userService") @Service("userService")
public class UserServiceImpl extends AbstractCRUDServiceImpl<UserDao,UserEntity,Long> implements UserService { public class UserServiceImpl extends AbstractCRUDServiceImpl<UserDao, UserEntity, Long> implements UserService {
@Autowired @Autowired
private MenuService menuService; private MenuService menuService;
@Autowired @Autowired
private ResourceService resourceService; private ResourceService resourceService;
@Autowired
private SiteService siteService;
private void doHandlerUser(UserEntity entity) throws AppException { private void doHandlerUser(UserEntity entity) throws AppException {
if (StringUtils.isNotEmpty(entity.getLoginPwd())) { if (StringUtils.isNotEmpty(entity.getLoginPwd())) {
...@@ -56,7 +60,7 @@ public class UserServiceImpl extends AbstractCRUDServiceImpl<UserDao,UserEntity, ...@@ -56,7 +60,7 @@ public class UserServiceImpl extends AbstractCRUDServiceImpl<UserDao,UserEntity,
} catch (Exception e) { } catch (Exception e) {
throw new AppException("密码转换异常"); throw new AppException("密码转换异常");
} }
}else { } else {
entity.setLoginPwd(null); entity.setLoginPwd(null);
} }
// if (entity.isSystemUser()) { // if (entity.isSystemUser()) {
...@@ -274,4 +278,14 @@ public class UserServiceImpl extends AbstractCRUDServiceImpl<UserDao,UserEntity, ...@@ -274,4 +278,14 @@ public class UserServiceImpl extends AbstractCRUDServiceImpl<UserDao,UserEntity,
return true; return true;
} }
@Override
protected void findAfter(UserEntity params, PageInfo pageInfo, Context context, List<UserEntity> list) throws AppException {
super.findAfter(params, pageInfo, context, list);
list.stream().peek(item->{
if(!ObjectUtils.isEmpty(item.getSiteId())&&item.getSiteId()!=0L){
item.setSiteName(siteService.get(item.getSiteId()).getSiteName());
}
}).count();
}
} }
\ No newline at end of file
...@@ -124,4 +124,6 @@ public class UserController extends BaseCRUDJsonMappingController<UserService, U ...@@ -124,4 +124,6 @@ public class UserController extends BaseCRUDJsonMappingController<UserService, U
return ret.toJSONString(); return ret.toJSONString();
} }
} }
\ No newline at end of file
package com.mortals.xhx.common.code;
import java.util.LinkedHashMap;
import java.util.Map;
/**
* @author: finegirl
* @date: 2021/7/16 11:50
* @description: //TODO 请完善注释信息
**/
public enum MatterSourceEnum {
OUTER(0, "政务网"),
SELF(1, "自定义");
private int value;
private String desc;
private MatterSourceEnum(int value, String desc) {
this.value = value;
this.desc = desc;
}
public int getValue() {
return this.value;
}
public String getDesc() {
return this.desc;
}
public static MatterSourceEnum getByValue(int value) {
MatterSourceEnum[] var1 = values();
int var2 = var1.length;
for(int var3 = 0; var3 < var2; ++var3) {
MatterSourceEnum examStatus = var1[var3];
if (examStatus.getValue() == value) {
return examStatus;
}
}
return null;
}
public static Map<String, String> getEnumMap(int... eItem) {
Map<String, String> resultMap = new LinkedHashMap();
MatterSourceEnum[] var2 = values();
int var3 = var2.length;
for(int var4 = 0; var4 < var3; ++var4) {
MatterSourceEnum item = var2[var4];
try {
boolean hasE = false;
int[] var7 = eItem;
int var8 = eItem.length;
for(int var9 = 0; var9 < var8; ++var9) {
int e = var7[var9];
if (item.getValue() == e) {
hasE = true;
break;
}
}
if (!hasE) {
resultMap.put(item.getValue() + "", item.getDesc());
}
} catch (Exception var11) {
}
}
return resultMap;
}
}
\ No newline at end of file
package com.mortals.xhx.common.code;
import java.util.LinkedHashMap;
import java.util.Map;
/**
* 站点状态
* @author
*
*/
public enum SiteSatusEnum {
DISENABLE(0, "禁用"),
ENABLE(1, "启用");
private int value;
private String desc;
SiteSatusEnum(int value, String desc) {
this.value = value;
this.desc = desc;
}
public int getValue() {
return this.value;
}
public String getDesc() {
return desc;
}
public static SiteSatusEnum getByValue(int value) {
for (SiteSatusEnum examStatus : SiteSatusEnum.values()) {
if (examStatus.getValue() == value) {
return examStatus;
}
}
return null;
}
/**
* 获取Map集合
* @param eItem 不包含项
* @return
*/
public static Map<String,String> getEnumMap(int... eItem) {
Map<String,String> resultMap= new LinkedHashMap<String,String>();
for (SiteSatusEnum item : SiteSatusEnum.values()) {
try{
boolean hasE = false;
for (int e : eItem){
if(item.getValue()==e){
hasE = true;
break;
}
}
if(!hasE){
resultMap.put(item.getValue()+"", item.getDesc());
}
}catch(Exception ex){
}
}
return resultMap;
}
}
...@@ -7,7 +7,7 @@ import com.mortals.framework.model.BaseEntityLong; ...@@ -7,7 +7,7 @@ import com.mortals.framework.model.BaseEntityLong;
* Description:MatterAccept * Description:MatterAccept
* date: 2021-9-17 15:55:12 * date: 2021-9-17 15:55:12
*/ */
public class MatterAcceptEntity extends BaseEntityLong{ public class MatterAcceptEntity extends MatterAcceptEntityExt{
private static final long serialVersionUID = 1631865312220L; private static final long serialVersionUID = 1631865312220L;
......
package com.mortals.xhx.module.matter.model;
import com.mortals.framework.model.BaseEntityLong;
import lombok.Data;
import java.util.Date;
/**
*
* Description:MatterAccept
* date: 2021-9-17 15:55:12
*/
@Data
public class MatterAcceptEntityExt extends BaseEntityLong{
/**
* 事项名称
*/
private String matterName;
}
\ No newline at end of file
...@@ -7,7 +7,7 @@ import com.mortals.framework.model.BaseEntityLong; ...@@ -7,7 +7,7 @@ import com.mortals.framework.model.BaseEntityLong;
* Description:MatterDatum * Description:MatterDatum
* date: 2021-9-17 15:55:12 * date: 2021-9-17 15:55:12
*/ */
public class MatterDatumEntity extends BaseEntityLong{ public class MatterDatumEntity extends MatterDatumEntityExt{
private static final long serialVersionUID = 1631865312101L; private static final long serialVersionUID = 1631865312101L;
......
package com.mortals.xhx.module.matter.model;
import com.mortals.framework.model.BaseEntityLong;
import lombok.Data;
import java.util.Date;
/**
*
* Description:MatterDatum
* date: 2021-9-17 15:55:12
*/
@Data
public class MatterDatumEntityExt extends BaseEntityLong{
/**
* 事项名称
*/
private String matterName;
}
\ No newline at end of file
...@@ -7,7 +7,7 @@ import com.mortals.framework.model.BaseEntityLong; ...@@ -7,7 +7,7 @@ import com.mortals.framework.model.BaseEntityLong;
* Description:MatterDatumFile * Description:MatterDatumFile
* date: 2021-9-17 15:55:12 * date: 2021-9-17 15:55:12
*/ */
public class MatterDatumFileEntity extends BaseEntityLong{ public class MatterDatumFileEntity extends MatterDatumFileEntityExt{
private static final long serialVersionUID = 1631865312135L; private static final long serialVersionUID = 1631865312135L;
......
package com.mortals.xhx.module.matter.model;
import com.mortals.framework.model.BaseEntityLong;
import lombok.Data;
import java.util.Date;
/**
*
* Description:MatterDatumFile
* date: 2021-9-17 15:55:12
*/
@Data
public class MatterDatumFileEntityExt extends BaseEntityLong{
/**
* 事项名称
*/
private String matterName;
}
\ No newline at end of file
...@@ -7,7 +7,7 @@ import com.mortals.framework.model.BaseEntityLong; ...@@ -7,7 +7,7 @@ import com.mortals.framework.model.BaseEntityLong;
* Description:MatterFlowlimit * Description:MatterFlowlimit
* date: 2021-9-23 13:21:04 * date: 2021-9-23 13:21:04
*/ */
public class MatterFlowlimitEntity extends BaseEntityLong{ public class MatterFlowlimitEntity extends MatterFlowlimitEntityExt{
private static final long serialVersionUID = 1632374464316L; private static final long serialVersionUID = 1632374464316L;
......
package com.mortals.xhx.module.matter.model;
import com.mortals.framework.model.BaseEntityLong;
import lombok.Data;
import java.util.Date;
/**
*
* Description:MatterFlowlimit
* date: 2021-9-23 13:21:04
*/
@Data
public class MatterFlowlimitEntityExt extends BaseEntityLong{
/**
* 事项名称
*/
private String matterName;
}
\ No newline at end of file
...@@ -7,7 +7,7 @@ import com.mortals.framework.model.BaseEntityLong; ...@@ -7,7 +7,7 @@ import com.mortals.framework.model.BaseEntityLong;
* Description:MatterQuestion * Description:MatterQuestion
* date: 2021-9-17 15:55:12 * date: 2021-9-17 15:55:12
*/ */
public class MatterQuestionEntity extends BaseEntityLong{ public class MatterQuestionEntity extends MatterQuestionEntityExt{
private static final long serialVersionUID = 1631865312230L; private static final long serialVersionUID = 1631865312230L;
......
...@@ -12,4 +12,7 @@ import com.mortals.xhx.module.matter.model.MatterFlowlimitEntity; ...@@ -12,4 +12,7 @@ import com.mortals.xhx.module.matter.model.MatterFlowlimitEntity;
public interface MatterFlowlimitService extends ICRUDService<MatterFlowlimitEntity,Long>{ public interface MatterFlowlimitService extends ICRUDService<MatterFlowlimitEntity,Long>{
} }
\ No newline at end of file
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