提交基础页面

This commit is contained in:
zhoulingpo
2023-04-17 10:31:08 +08:00
parent 4ed0752b86
commit 61e01291fd
12 changed files with 2838 additions and 630 deletions
+18 -18
View File
@@ -1,19 +1,19 @@
import { instance as request } from '@/utils/request'
export default{
//查询
search(data){
return request({
url: '',
method: 'POST',
data
})
},
//重置
reset(data){
return request({
url: '',
method: 'POST',
data
})
}
}
export default {
// 查询
search (data) {
return request({
url: '',
method: 'POST',
data
})
},
// 重置
reset (data) {
return request({
url: '',
method: 'POST',
data
})
}
}
+44
View File
@@ -0,0 +1,44 @@
//流程样式
.process{
background-color: #fff;
width:100%;
height: 100%;
padding: 10px 20px;
overflow: auto;
}
.process_box{
padding: 10px 30px;
border: 1px solid #e8f6fe;
}
.procedure{
}
.content{
margin-top: 25px;
width:100%;
padding: 10px 30px;
border: 1px dotted #ccc;
}
.base_title{
display: inline-block;
font-size: 18px;
font-weight: 700;
color: #555;
line-height: 40px;
border-bottom: 3px solid #409eff;
margin-bottom: 20px;
}
// 表单的样式
.label-input-form{
padding-right: 80px;
.el-form-item.el-form-item__label{
line-height: 40px;
font-size: 15px;
color:#555 !important;
}
.el-form-item.el-input__inner{
height: 40px;
line-height: 40px;
}
}
File diff suppressed because it is too large Load Diff
+62
View File
@@ -0,0 +1,62 @@
<!-- 流程信息公共头部 -->
<template>
<div>
<div class="prc-header-wrap">
<div class="processtitle">{{title}}</div>
<div class="processnum" v-if="proceesNum">流程编号:xcsdsds{{proceesNum}}</div>
</div>
</div>
</template>
<script>
export default {
name: 'ProcessHeader',
mixins: [],
props: {
// 渲染的名称
title: {
type: String,
required: true
},
// 渲染编号
proceesNum: {
type: String,
required: false
}
},
components: {},
data () {
return {
opacityStyle: {},
headerFixed: false
}
},
methods: {
},
computed: {
},
watch: {},
mounted () {
}
}
</script>
<style lang="scss" scoped>
.prc-header-wrap{
display: flex;
justify-content: space-between;
width: 100%;
border-bottom: 1px dotted #ccc;
line-height: 40px;
color: #555;
}
.processtitle{
font-weight: 700;
font-size: 16px;
}
.processnum{
font-size: 13px;
}
</style>
+3
View File
@@ -2,6 +2,8 @@ import Vue from 'vue'
import App from './App.vue'
import router from './router'
import store from './store'
// 流程公共样式
import './assets/css/process.scss'
import config from '@/utils/config'
// VXETable
@@ -27,6 +29,7 @@ import '@/utils/waterMark'
import JSEncrypt from '../src/assets/js/jsencrypt.min.js'
// 富文本引用
import VueQuillEditor from 'vue-quill-editor'
// require styles 引入样式
import 'quill/dist/quill.core.css'
import 'quill/dist/quill.snow.css'
+35
View File
@@ -0,0 +1,35 @@
const routes = [
{
path: '/permission',
name: '',
component: () => import('../../views/Layout.vue'),
children: [
{
path: 'step1',
name: 'urlIndex',
component: () => import('../../views/permissionApplication/launch'),
meta: {
crumb: ['权限申请']
}
},
{
path: 'step2',
name: 'urlIndex',
component: () => import('../../views/permissionApplication/launch'),
meta: {
crumb: ['权限申请']
}
},
{
path: 'step3',
name: 'urlIndex',
component: () => import('../../views/permissionApplication/launch'),
meta: {
crumb: ['权限申请']
}
}
]
}
]
export default routes
File diff suppressed because it is too large Load Diff
@@ -0,0 +1,211 @@
<template>
<div class="box">
<el-divider content-position="left">指派信息</el-divider>
<el-form
ref="processForms"
:model="processForm"
:rules="processFormRules" label-width="230px"
class="label-input-form prc-content-border">
<el-row :gutter="24">
<el-col :span="24">
<el-form-item label="选择牵头人:" prop="personLiable" class="add-form-item"
:class="{'form-item-disabled': formdisableflag}">
<el-input :maxlength='100'
readonly
@click.native="handleDrafterName('xzqtr')"
v-model="processForm.personLiableName"
:disabled="formdisableflag"
placeholder="请选择牵头人"
clearable></el-input>
</el-form-item>
</el-col>
</el-row>
<el-row :gutter="24">
<el-col :span="24">
<el-form-item label="选择会签人员:" prop="countersign" class="add-form-item"
:class="{'form-item-disabled': formdisableflag}">
<el-input :maxlength='100'
readonly
@click.native="handleDrafterName('hqry')"
v-model="processForm.countersignName"
:disabled="formdisableflag"
placeholder="请选择会签人员"
clearable></el-input>
</el-form-item>
</el-col>
</el-row>
<el-row :gutter="24" v-if="processNode.length > 0" v-for="item in processNode" :key="item.id"
>
<el-col :span="24">
<el-form-item :label="item.remark + ''" prop="" class="add-form-item"
required :class="{'form-item-disabled': formdisableflag, 'add-form-item': true}">
<el-input :maxlength='100'
readonly
v-model="item.userName"
:disabled="true"
:placeholder="'请选择' + item.remark"
></el-input>
</el-form-item>
</el-col>
</el-row>
<el-row :gutter="24">
<el-col :span="24">
<el-form-item label="说明:" prop="" class="add-form-item"
:class="{'form-item-disabled': formdisableflag}">
<el-input :maxlength='1000'
type="textarea"
v-model="processForm.remarks"
:disabled="formdisableflag"
:autosize="{ minRows: 2, maxRows: 4}"
placeholder="请输入说明"
clearable></el-input>
</el-form-item>
</el-col>
</el-row>
</el-form>
<org-table :visible.sync="visibleOrgTable" title="人员列表" dialog-model :config="{
value: orgTableVal,
valueName: orgTableValName
}" :workNumFlag="true" :maxSelected="100" @confirm="isTreeOk">
</org-table>
</div>
</template>
<script>
export default {
name: "Assign",
props: {
processNode:{
required:true
},
personLiable:{
type:String
},
personLiableName:{
type:String
},
countersign:{},
countersignName:{},
remarks:{}
}
,
data(){
return {
formdisableflag:false,
visibleOrgTable:false,
processForm: {
personLiable: this.personLiable ||'',
personLiableName:this.personLiableName||'',
countersign:this.countersign||'',
countersignName:this.countersignName||''
},
processFormRules: {
procedureName: [
{required: true, type: 'string', message: '流程名称不能为空', trigger: 'change'},
],
personLiable:[
{required:true,message: '牵头人不能为空', trigger: 'change'}
],
countersign:[
{required:true,message: '会签人员不能为空', trigger: 'change'}
]
},
orgTableVal: '',
orgTableValName: '',
}
},
methods:{
handleDrafterName(val) {
// if (this.disabled) return false;
this.treeType = val;
this.orgTableVal = '';
this.orgTableValName = '';
this.sarTask = ''
this.len = 1
if(val==='cyqcdw'){
this.len=100
}
this.visibleOrgTable = true
},
isTreeOk(checkedList) {
// console.log(checkedList)
const parts = []
const partsName = []
const departmentName = []
let department=[]
let partsWorknum=[]
// const departments = []
// if (checkedList.length === 0) {
// this.$message({
// message: '请选择要分享的人!',
// type: 'warning'
// })
// }
checkedList.map((item, index) => {
parts.push(item.userId);
partsName.push(item.uname);
// if(!departments.includes(item.orgId) && item.orgId){
// departments.push(item.orgId)
// }
partsWorknum.push(item.account)
if(!departmentName.includes(item.orgName) && item.orgName){
departmentName.push(item.orgName)
department.push(item.orgId)
}
})
this.qcrList = checkedList
if (this.treeType == 'zrr') {
this.projectList.responsiblePerson =parts.toString()
this.projectList.responsiblePersonName= partsName.toString()
// // this.standardsFrom.drafter = parts.toString()
// this.budget.applicantOrgName = this.budget.applicantOrgName ? departmentName.toString() : departmentName.toString()
this.projectList.responsiblePersonWorkNum = partsWorknum.toString()
// // this.orgTableVal = this.standardsFrom.drafter
} else if (this.treeType == 'zrld') {
this.projectList.responsibleLeadership =parts.toString()
this.projectList.responsibleLeadershipName= partsName.toString()
this.projectList.responsibleLeadershipWorkNum = partsWorknum.toString()
} else if (this.treeType == 'bzzrr') {
this.projectList.standardizationResponsiblePerson =parts.toString()
this.projectList.standardizationResponsiblePersonName= partsName.toString()
this.projectList.standardizationResponsiblePersonWorkNum = partsWorknum.toString()
} else if (this.treeType == 'zyqcdw') {
this.projectList.mainDraftingUnit =department.toString()
this.projectList.mainDraftingUnitName= departmentName.toString()
}
else if (this.treeType == 'cyqcdw') {
this.projectList.unitsInvolvedInDrafting= department.toString()
this.projectList.unitsInvolvedInDraftingName= departmentName.toString()
}else if (this.treeType == 'qtr') {
this.projectList.leader =parts.toString()
this.projectList.leaderName= partsName.toString()
this.projectList.leaderWorkNum = partsWorknum.toString()
}
else if (this.treeType == 'xzqtr') {
this.processForm.personLiable =parts.toString()
this.processForm.personLiableName= partsName.toString()
this.processForm.personLiableWorkNum = partsWorknum.toString()
}
else if (this.treeType == 'hqry') {
this.processForm.countersign =parts.toString()
this.processForm.countersignName= partsName.toString()
}
},
}
}
</script>
<style scoped>
</style>
@@ -0,0 +1,448 @@
<template>
<div class="AuditOperationBox">
<el-form
ref="examineForm"
:model="examineForm"
:rules="examineFormRules"
class="label-input-form prc-content-border">
<el-row :gutter="24">
<el-col :span="24">
<el-form-item label="审批结果" prop="flag"
label-width="132px" class="add-form-item"
:class="{'form-item-disabled': formdisableflag}">
<el-radio-group :disabled="formdisableflag" v-model="examineForm.flag" style="margin-top: 8px">
<el-radio :label="'1'">同意</el-radio>
<el-radio :label="'2'">不同意</el-radio>
</el-radio-group>
</el-form-item>
</el-col>
</el-row>
<el-row :gutter="24">
<el-col :span="24">
<el-form-item :prop="!formdisableflag?'approvalOpinion':''" label-width="132px" class="add-form-item">
<template slot="label">审批意见</template>
<el-input :maxlength='1000'
v-model="examineForm.approvalOpinion"
placeholder="请输入审批意见"
:autosize="{ minRows: 2, maxRows: 4}"
type="textarea"
/>
</el-form-item>
</el-col>
</el-row>
<!-- <el-row :gutter="24">-->
<!-- <el-col :span="24">-->
<!-- <el-form-item label="附件" prop="entStandText" label-width="132px" class="add-form-item"-->
<!-- :class="{'form-item-disabled': formdisableflag}">-->
<!-- <el-button-->
<!-- size="small"-->
<!-- class="form-upload-btn"-->
<!-- icon="el-icon-upload"-->
<!-- @click="clickButtonToUpload('approvalFile')"-->
<!-- >-->
<!-- {{ examineForm.approvalFile === 'null' || examineForm.approvalFile === '' ||-->
<!-- examineForm.approvalFile == null ? '点击上传' : '查看已上传的文件' }}-->
<!-- </el-button>-->
<!-- </el-form-item>-->
<!-- </el-col>-->
<!-- </el-row>-->
</el-form>
<el-drawer
title="责任部门"
:wrapperClosable="false"
:visible.sync="visible.visibleTree">
<div class="demo-drawer-content">
<dept-tree
v-if="visible.visibleTree"
deptSelect
allDept
check-enable
treeDivId="deptTreeOrg"
only-checked
:chkboxType="{ 'Y': '', 'N': '' }"
:editable="false"
:checkIdList="checkIdList"
orgType="DEPART"
ref="deptTreeOrg"
@treeOnCheck="handleEOCheck">
</dept-tree>
</div>
<div class="demo-drawer-footer">
<el-button size="small"
class="common-button-primary"
type="primary"
@click="handleTaskBreakDrawerConfirm">确定
</el-button>
<el-button
class="common-button-default"
size="small"
@click="handleTaskBreakDrawerCancel">取消
</el-button>
</div>
</el-drawer>
<el-drawer
title="指派人员"
:wrapperClosable="false"
:visible.sync="visible.visibleLLRTree"
@closed="onLLRTreeClosed">
<div class="demo-drawer-content">
<laws-tree
ref="manageTree"
:zNodes="manageZNodes"
treeDivId="manageTree"
:editable="false"
expandAll
onlyChecked
initExpand
check-enable
personCheck
:chkboxType="{ 'Y': '', 'N': '' }"
:check-id-list="manageId"
@treeOnCheck="dblClick"
></laws-tree>
</div>
<div class="demo-drawer-footer">
<el-button size="small"
class="common-button-primary"
type="primary"
@click="handleLLRTreeConfirm">确定
</el-button>
<el-button size="small"
class="common-button-default"
@click="handleLLRTreeCancel">取消
</el-button>
</div>
</el-drawer>
<upload ref="upload" :disabled="formdisableflag" :uploadPath="uploadPath" :title="'上传文件'" @uploadSuccess="uploadSuccess"/>
</div>
</template>
<script>
import upload from '@/components/upload/upload'
import {
getRoleAndUserByOrgId,
} from 'api/process'
import {mapGetters} from "vuex";
export default {
name: "AuditOperation",
props: ['query'],
components: {
upload
},
computed: {
...mapGetters(['userInfo']),
},
data() {
return {
examineForm: {
planReasonFile: '',
oldName:'',
flag: '1',
},
examineFormRules: {
oldName: [
{required: true, message: '添加指派不能为空', trigger: 'change'}
],
flag: [
{required: true, message: '审核结果不能为空', trigger: 'change'}
],
approvalOpinion: [
{type: 'string', max: 1000, message: '审批意见不能超过1000个字符', trigger: 'blur'}
],
},
formdisableflag: false,
uploadPath: 'api/att/attFile/upload',//上传文件的接口
uploadName: '', //当前表单对应的文件名称
isTaskReception: false, //是否显示指派人员以及确认任务
isDesignated: false, //是否显示指派人员
isInitiation: false, //是的显示指派部门
visible: {
visibleTree: false,
visibleLLRTree: false,
},
checkIdList: [],
LLRTreeChecked: [],
FGLLRRoleId: [],
manageZNodes: [],
manageId: [],
userList: [],
isApproval: false,
}
},
created() {
if (this.query) {
if (this.query.type == '1' ||
!this.query.taskDefinitionKey ||
this.query.taskDefinitionKey == 'null' ||
this.query.taskDefinitionKey == 'fqrxg' ||
this.query.taskDefinitionKey == 'bzfggcsfq' ||
this.query.taskDefinitionKey == 'bzfggcsfq-1' ||
this.query.taskDefinitionKey == 'bzfggcsfq-2' ||
this.query.taskDefinitionKey == 'bzfggcsfq-3') {
this.isInitiation = true
} else {
this.isInitiation = false
}
if (this.query.taskDefinitionKey == 'bzhskzshlc' ||
this.query.taskDefinitionKey == 'bzhskzsh-1' ||
this.query.taskDefinitionKey == 'bzhskzsh-2' ||
this.query.taskDefinitionKey == 'bzhskzsh-3' ||
this.query.taskDefinitionKey == 'bzhskzsh' ||
this.query.taskDefinitionKey == 'sjbskzsh' ||
this.query.taskDefinitionKey == 'cpfxzxkzsh' ||
this.query.taskDefinitionKey == 'bzhsszpz' ||
this.query.taskDefinitionKey == 'sjbsszpz' ||
this.query.taskDefinitionKey == 'cpfxzxkzpz') {
this.isApproval = true
} else {
this.isApproval = false
}
if (this.query.taskDefinitionKey == 'bzhsszqr' ||
this.query.taskDefinitionKey == 'sjbsszqr' ||
this.query.taskDefinitionKey == 'cpfxzxszqr') {
this.isTaskReception = true
} else {
this.isTaskReception = false
}
}
if (this.query.isViewDetails && this.query.isViewDetails == 1) {
this.examineForm = this.query
this.formdisableflag = true
if (this.isTaskReception && this.query.flag == '1'){
this.isDesignated = true
}
}
this.getRoleAndUserByOrgId()
},
methods: {
getData(data){
this.examineForm.oldName = data.oldName
this.examineForm.userName = data.userName
this.examineForm.orgId = data.orgId
this.examineForm.userId = data.userId
},
/** 上传文件的回调
* 获取接口中的数据进行反显
* */
clickButtonToUpload(current) {
this.$refs.upload.importModalshowflagtemp = true
this.uploadName = current
if (this.examineForm[current]) {
this.$http.get('att/attFile/getMultiFileInfos', {
fileIds: this.examineForm[current]
}, {
_this: this
}, res => {
this.$refs.upload.ids = []
res.data.map(item => {
item.name = item.oldFileName
this.$refs.upload.ids.push(item.id)
})
this.$refs.upload.defaultFileList = res.data || []
}, e => {
})
} else {
this.$refs.upload.defaultFileList = []
}
},
/** 上传文件的回调 */
uploadSuccess(data) {
/** 赋值给当前对应的表单文件 */
this.examineForm[this.uploadName] = data
this.examineForm = {...this.examineForm}
},
/** 审核时通过或不通过的事件;显示 */
flagchange(value) {
this.isDesignated = value == 1 ? true : false
if (this.isDesignated) {
/** 必填或者部必填 */
this.examineFormRules.userName = [
{required: true, message: '指派人员不能为空', trigger: 'change'}
]
} else {
this.examineFormRules.userName = [
{required: false, message: '指派人员不能为空', trigger: 'change'}
]
}
},
/** 在选择完责任部门点击确定的事件 */
handleTaskBreakDrawerConfirm() {
if (this.EOCheckList.length) {
this.handleQueryPersonByDept()
} else {
this.$message.warning('请选择责任部门')
}
},
/** 在选择完责任部门点击取消的事件 */
handleTaskBreakDrawerCancel() {
this.visible.visibleTree = false
this.EOCheckList = []
this.EOCheckId = []
},
/** 在选择完责任部门点击确定的事件
* 调用此方法获取到当前的选中数据的id;通过id去查找人员进行反显
* */
async handleQueryPersonByDept() {
const parts = []
const partsName = []
this.EOCheckList.map(item => {
parts.push(item.id)
if (item.oldname) {
partsName.push(item.oldname)
} else {
partsName.push(item.name)
}
})
this.examineForm.oldName = partsName.join(',')
this.examineForm.orgId = parts.join(',')
const orgIds = parts.join(',')
const res = await getRoleAndUserByOrgId({
orgId: orgIds,
pageNo: 1,
pageSize: 10000
})
const userId = []
const userName = []
/** 遍历截取所长和部长 */
let nodeUserInfoEOs = []
for (let i = 0; i < parts.length; i++) {
res.data.map(person => {
if (person.pOrgId === parts[i]) {
if (person.roleName.slice(person.roleName.length - 2, person.roleName.length) == '所长' ||
person.roleName.slice(person.roleName.length - 2, person.roleName.length) == '部长') {
console.log(person);
if (person.roleName == '标准化所所长') {
nodeUserInfoEOs.push({
"nodeId": "zijsglbbzqr", "parentFlow": "zcfgrklc", "userId": person.userId,
})
} else if (person.roleName == '产品分析中心所长') {
nodeUserInfoEOs.push({
"nodeId": "zicpfxzxszqr", "parentFlow": "zcfgrklc", "userId": person.userId,
})
} else if (person.roleName == '设计部所所长') {
nodeUserInfoEOs.push({
"nodeId": "zisjbsszqr", "parentFlow": "zcfgrklc", "userId": person.userId,
})
}
userId.push(person.userId)
userName.push(person.userName)
}
}
})
}
this.examineForm.userName = userName.join(',')
this.examineForm.userId = userId.join(',')
this.examineForm.nodeUserInfoEOs = nodeUserInfoEOs
this.examineForm = {...this.examineForm}
this.visible.visibleTree = false
},
/** 点击选择部门的弹框 */
handleVisibleDept(id) {
/** 如果有数据进行反显 */
this.checkIdList = id === undefined ? [] : id.split(',')
this.visible.visibleTree = true
},
/** 获取选中部门的数据 进行赋值*/
handleEOCheck(checkedList) {
this.EOCheckList = checkedList
},
/** 关闭指派人员的弹框*/
onLLRTreeClosed() {
this.LLRTreeChecked = []
},
/** 关闭指派人员的弹框*/
handleLLRTreeCancel() {
this.visible.visibleLLRTree = false
},
/** 在提交表单的校验 通过继续执行 */
submit() {
this.isSubmit = false
this.$refs['examineForm'].validate((valid) => {
if (valid) {
this.isSubmit = true
} else {
this.$message.warning('请检查表单是否填写正确')
}
})
},
/** 打开选择人员的弹框 */
handleVisiblePersonnel(id) {
/** 有数据时赋值 */
this.manageId = id === undefined ? [] : id.split(',')
this.visible.visibleLLRTree = true
},
/** 获取当前选中的人员的数据 */
dblClick(checkedList) {
this.userList = checkedList
},
/** 点击选择人员弹框的确认按钮 进行遍历选中数据反显表单*/
handleLLRTreeConfirm() {
if (this.userList.length > 0) {
let parts = []
let partsName = []
this.userList.map(item => {
parts.push(item.id)
if (item.oldname) {
partsName.push(item.oldname)
} else {
partsName.push(item.name)
}
})
this.examineForm.userName = partsName.join(',')
this.examineForm.userId = parts.join(',')
this.examineForm = {...this.examineForm}
this.visible.visibleLLRTree = false
} else {
this.$message.warning('请选择指派人员')
}
},
/** 通过当前登录人的orgId去获取这个部门下面的人员*/
getRoleAndUserByOrgId() {
getRoleAndUserByOrgId({
orgId: this.userInfo.orgId,
}).then(res => {
const manageIdList = []
const manageNameList = []
const zNodes = JSON.parse(JSON.stringify(res.data))
res.data.map(item => {
manageIdList.push(item.userId)
manageNameList.push(item.userName)
})
/** 重组数据*/
zNodes.map(item => {
item.name = item.userName
item.id = item.userId
item.icon = 'static/images/user.png'
item.iconSkin = 'org-user'
item.pId = item.orgId
})
this.manageZNodes = zNodes
})
},
},
}
</script>
<style scoped>
.AssignButton {
font-size: 18px;
}
.AssignButton:hover {
cursor: pointer;
}
</style>
@@ -0,0 +1,184 @@
<template>
<div class="reportTable">
<el-button type="primary" size="big">添加报告</el-button>
<el-button type="success" size="big" @click="deleteAll">批量删除</el-button>
<div class="table">
<vxe-table :data="processTable" :empty-render="{name: 'NotData'}" align="center" border stripe v-table-min-height="500"
ref="xTable" @checkbox-all="selectAllEvent" @checkbox-change="selectChangeEvent">
<vxe-column type="checkbox" width="60"></vxe-column>
<vxe-column show-overflow show-header-overflow field="labelOneName" :title="tagsForm.tags01.name"></vxe-column>
<vxe-column show-overflow show-header-overflow field="name" title="报告名称"></vxe-column>
<vxe-column show-overflow show-header-overflow field="labelTwoName" :title="tagsForm.tags02.name"></vxe-column>
<vxe-column show-overflow show-header-overflow field="labelThreeName" :title="tagsForm.tags03.name"></vxe-column>
<vxe-column show-overflow show-header-overflow field="year" title="报告年份"></vxe-column>
<vxe-column show-overflow show-header-overflow field="createDate" title="上传时间"></vxe-column>
<vxe-column show-overflow show-header-overflow title="操作" width="200" fixed="right">
<template #default="{ row }">
<el-button type="text" class="del-btn" @click="reportDelete(row.id)">删除</el-button>
<!-- <el-button type="text" @click="downloadRow(row)">下载</el-button>-->
</template>
</vxe-column>
</vxe-table>
<el-pagination
@size-change="handleLogSizeChange"
@current-change="handleLogCurrentChange"
:current-page="qLog.pageNo"
:page-sizes="[5, 10, 20]"
:page-size="qLog.pageSize"
layout="total, sizes, prev, pager, next, jumper"
:total="total"/>
</div>
</div>
</template>
<script>
export default {
name: 'reportTable',
props: {
value: {
type: Array,
default: new Array([]),
required: true
}
},
data () {
return {
processTable: [],
total: 0,
qLog: {
pageSize: 10,
pageNo: 1
},
copyTableData: [],
checkIds: [],
tagsForm: {
tags01: {
name: '',
parentId: '0',
type: '1',
id: '',
childList: [
// {name: '无', type: '1', id: '', parentId: ''},
]
},
tags02: {
name: '',
parentId: '0',
type: '2',
id: '',
childList: [
// {name: '无', type: '2', id: '', parentId: ''},
]
},
tags03: {
name: '',
parentId: '0',
type: '3',
id: '',
childList: [
// {name: '无', type: '3', id: '', parentId: ''},
]
}
}
}
},
watch: {
value () {
this.total = this.value.length
this.processTable = this.value.slice(0, 9)
}
},
created () {
// this.copyTableData = JSON.parse(JSON.stringify(this.tableData))
this.labelList()
},
methods: {
pageChage (current) {
setTimeout(() => {
current = current || this.qLog.pageNo
this.qLog.pageNo = current
this.processTable = this.value.slice(this.qLog.pageSize * (current - 1), this.qLog.pageSize * current)
// console.log(this.pages.size, this.pages.size * (current - 1), this.pages.size * this.pages.current, this.list)
if (this.processTable.length < 1 && current > 1) {
this.pageChage(current - 1)
return false
}
})
this.total = this.value.length
},
handleLogSizeChange (val) {
this.qLog.pageSize = val
this.qLog.pageNo = 1
this.pageChage(1)
},
handleLogCurrentChange (val) {
this.qLog.pageSize = val
this.qLog.pageNo = 1
this.pageChage(1)
},
// 标签列表
labelList () {
this.$api.report.labelList().then(({ data }) => {
if (!data.labelOne.childList.length) {
data.labelOne.childList = [{ name: '', id: '', parentId: this.tagsForm.tags01.id, type: '1' }]
}
if (!data.labelTwo.childList.length) {
data.labelTwo.childList = [{ name: '', id: '', parentId: this.tagsForm.tags02.id, type: '2' }]
}
if (!data.labelThree.childList.length) {
data.labelThree.childList = [{ name: '', id: '', parentId: this.tagsForm.tags03.id, type: '3' }]
}
this.tagsForm.tags01 = data.labelOne
this.tagsForm.tags02 = data.labelTwo
this.tagsForm.tags03 = data.labelThree
})
},
selectAllEvent ({ checked }) {
const records = this.$refs.xTable.getCheckboxRecords()
this.checkIds = records.map(item => {
return item.id
})
},
selectChangeEvent ({ checked }) {
const records = this.$refs.xTable.getCheckboxRecords()
this.checkIds = records.map(item => {
return item.id
})
},
deleteAll () {
this.reportDelete(this.checkIds)
},
reportDelete (id) {
// 删除报告 假删除
if (typeof id === 'string') {
this.$confirm('此操作将删除所选数据, 是否继续?', '提示', {
confirmButtonText: '确定',
cancelButtonText: '取消',
type: 'warning'
}).then(() => {
this.$emit('updateTable', this.value.filter(item => item.id !== id))
})
} else {
if (Array.isArray(id)) {
this.$confirm('此操作将删除所选数据, 是否继续?', '提示', {
confirmButtonText: '确定',
cancelButtonText: '取消',
type: 'warning'
}).then(() => {
this.$emit('updateTable', this.value.filter(item => id.indexOf(item.id) === -1))
})
}
}
}
}
}
</script>
<style lang="scss" scoped>
.table{
margin-top: 10px;
}
.reportTable{
margin-bottom: 20px;
}
</style>
@@ -0,0 +1,97 @@
<template>
<div class="process">
<div class="process_box">
<process-header :title="'发起流程'"></process-header>
<div class="procedure">
<div class="content">
<span class="base_title">基础信息</span>
<el-row>
<report-table v-model="tableData" @updateTable="(newValue)=>{tableData=newValue}"> </report-table>
</el-row>
<el-row>
<el-form ref="form" :model="applicationForm" label-width="150px"
class="label-input-form" size="medium">
<el-row>
<el-col :span="9">
<el-form-item label="申请原因">
<el-input type="textarea" v-model="applicationForm.name"></el-input>
</el-form-item>
</el-col>
<el-col :span="9" :offset="6">
<el-form-item label="选择申请权限">
<el-select v-model="value" placeholder="请选择">
<el-option
v-for="item in options"
:key="item.value"
:label="item.label"
:value="item.value">
</el-option>
</el-select>
</el-form-item>
</el-col>
</el-row>
</el-form>
</el-row>
</div>
<div class="content">
<span class="base_title">指派信息</span>
<el-form ref="form" :model="assignForm" label-width="150px"
class="label-input-form" size="medium">
<el-row>
<el-col :span="9">
<el-form-item label="活动名称">
<el-input v-model="assignForm.name"></el-input>
</el-form-item>
</el-col>
<el-col :span="9" :offset="6">
<el-form-item label="活动名称">
<el-input v-model="assignForm.name"></el-input>
</el-form-item>
</el-col>
</el-row>
</el-form>
</div>
</div>
</div>
</div>
</template>
<script>
import processHeader from '@/components/ProcessHeader'
import reportTable from './components/reportTable'
export default {
name: 'launch',
components: {
processHeader,
reportTable
},
data () {
return {
assignForm: {},
tableData: [],
applicationForm: {},
q: {
pageSize: 10000,
pageNo: 1
}
}
},
created () {
this.reportList()
},
methods: {
// 获取表格列表 吧查询到的值传给子组件
reportList () {
this.$api.report.reportList(this.q).then(({ data }) => {
this.tableData = data.records
})
}
}
}
</script>
<style scoped>
</style>