【增加】增加字典接口 增加权限的组件
This commit is contained in:
@@ -0,0 +1,31 @@
|
|||||||
|
import { instance as request } from '@/utils/request'
|
||||||
|
|
||||||
|
export default {
|
||||||
|
addDic (data) {
|
||||||
|
return request({
|
||||||
|
url: '/api/sys/dict/add',
|
||||||
|
method: 'post',
|
||||||
|
data
|
||||||
|
})
|
||||||
|
},
|
||||||
|
editDic (data) {
|
||||||
|
return request({
|
||||||
|
url: '/api/sys/dict/edit',
|
||||||
|
method: 'put',
|
||||||
|
data
|
||||||
|
})
|
||||||
|
},
|
||||||
|
getDic (data) {
|
||||||
|
return request({
|
||||||
|
url: '/api/sys/dict/page',
|
||||||
|
method: 'get',
|
||||||
|
params:data
|
||||||
|
})
|
||||||
|
},
|
||||||
|
delDic (data) {
|
||||||
|
return request({
|
||||||
|
url: '/api/sys/dict/'+data,
|
||||||
|
method: 'get',
|
||||||
|
})
|
||||||
|
},
|
||||||
|
}
|
||||||
@@ -0,0 +1,190 @@
|
|||||||
|
<template>
|
||||||
|
<div class="el-transfer ">
|
||||||
|
<transfer-panel v-bind="$props" ref="leftPanel" :data="sourceData" :title="titles[0] || t('el.transfer.titles.0')"
|
||||||
|
:default-checked="leftDefaultChecked" :placeholder="filterPlaceholder || t('el.transfer.filterPlaceholder')"
|
||||||
|
@checked-change="onSourceCheckedChange"
|
||||||
|
@scroll.a.native="load"
|
||||||
|
>
|
||||||
|
<slot name="left-footer">
|
||||||
|
<!-- <el-pagination @current-change="handleLogCurrentChange"-->
|
||||||
|
<!-- :current-page="q.pageNo" :page-size="q.pageSize"-->
|
||||||
|
<!-- layout="total, prev, pager, next" :total="total" />-->
|
||||||
|
</slot>
|
||||||
|
</transfer-panel>
|
||||||
|
<div class="el-transfer__buttons">
|
||||||
|
<div>
|
||||||
|
<el-button type="primary" :class="['el-transfer__button', hasButtonTexts ? 'is-with-texts' : '']"
|
||||||
|
@click.native="addToLeft" :disabled="listTwoChecked.length === 0 && rightChecked.length === 0">
|
||||||
|
<i class="el-icon-arrow-left"></i>
|
||||||
|
<span v-if="buttonTexts[0] !== undefined">{{ buttonTexts[0] }}</span>
|
||||||
|
</el-button>
|
||||||
|
</div>
|
||||||
|
<div>
|
||||||
|
<el-button type="primary" :class="['el-transfer__button', hasButtonTexts ? 'is-with-texts' : '']"
|
||||||
|
@click.native="addToRight" :disabled="leftChecked.length === 0">
|
||||||
|
<span v-if="buttonTexts[1] !== undefined">{{ buttonTexts[1] }}</span>
|
||||||
|
<i class="el-icon-arrow-right"></i>
|
||||||
|
</el-button>
|
||||||
|
</div>
|
||||||
|
<div>
|
||||||
|
<!-- 新增的button -->
|
||||||
|
<el-button type="primary" :class="['el-transfer__button', hasButtonTexts ? 'is-with-texts' : '']"
|
||||||
|
@click.native="addToListTwo" :disabled="leftChecked.length === 0">
|
||||||
|
<span v-if="buttonTexts[1] !== undefined">{{ buttonTexts[2] }}</span>
|
||||||
|
<i class="el-icon-arrow-right"></i>
|
||||||
|
</el-button>
|
||||||
|
</div>
|
||||||
|
<slot name="buttons"></slot>
|
||||||
|
</div>
|
||||||
|
<transfer-panel v-bind="$props" ref="rightPanel" :data="targetData" :title="titles[1] || t('el.transfer.titles.1')"
|
||||||
|
:default-checked="rightDefaultChecked" :placeholder="filterPlaceholder || t('el.transfer.filterPlaceholder')"
|
||||||
|
@checked-change="onTargetCheckedChange">
|
||||||
|
<slot name="right-footer">
|
||||||
|
|
||||||
|
</slot>
|
||||||
|
</transfer-panel>
|
||||||
|
<!-- 新增的list -->
|
||||||
|
<transfer-panel class="m-l-20 list2" v-bind="$props" ref="rightPanel" :data="listTwoData"
|
||||||
|
:title="titles[2] || t('el.transfer.titles.1')" :default-checked="listTwoDefaultChecked"
|
||||||
|
:placeholder="filterPlaceholder || t('el.transfer.filterPlaceholder')"
|
||||||
|
@checked-change="onlistTwoCheckedChange">
|
||||||
|
<slot name="right-footer"></slot>
|
||||||
|
</transfer-panel>
|
||||||
|
</div>
|
||||||
|
|
||||||
|
</template>
|
||||||
|
|
||||||
|
<script>
|
||||||
|
import { Transfer } from 'element-ui'
|
||||||
|
|
||||||
|
export default {
|
||||||
|
extends: Transfer,
|
||||||
|
props: {
|
||||||
|
loadingMore:{
|
||||||
|
type: Boolean,
|
||||||
|
default: false
|
||||||
|
},
|
||||||
|
listTwo: {
|
||||||
|
type: Array,
|
||||||
|
default: () => []
|
||||||
|
},
|
||||||
|
listTwoDefaultChecked: {
|
||||||
|
type: Array,
|
||||||
|
default: () => []
|
||||||
|
},
|
||||||
|
},
|
||||||
|
data() {
|
||||||
|
return {
|
||||||
|
total:0,
|
||||||
|
// 列表2选中的数据
|
||||||
|
listTwoChecked: []
|
||||||
|
};
|
||||||
|
},
|
||||||
|
computed: {
|
||||||
|
listTwoData() {
|
||||||
|
if (this.targetOrder === 'original') {
|
||||||
|
return this.data.filter(item => this.listTwo.indexOf(item[this.props.key]) > -1);
|
||||||
|
} else {
|
||||||
|
return this.listTwo.reduce((arr, cur) => {
|
||||||
|
const val = this.dataObj[cur];
|
||||||
|
if (val) {
|
||||||
|
arr.push(val);
|
||||||
|
}
|
||||||
|
return arr;
|
||||||
|
}, []);
|
||||||
|
}
|
||||||
|
},
|
||||||
|
sourceData() {
|
||||||
|
return this.data.filter(item => this.value.indexOf(item[this.props.key]) === -1
|
||||||
|
&& this.listTwo.indexOf(item[this.props.key]) === -1);
|
||||||
|
},
|
||||||
|
},
|
||||||
|
methods: {
|
||||||
|
|
||||||
|
//触发父组件下一页
|
||||||
|
load(){
|
||||||
|
// if(!this.loadingMore){
|
||||||
|
// this.loadingMore=true
|
||||||
|
// this.$emit("loadMore")
|
||||||
|
// }
|
||||||
|
alert("hhhh")
|
||||||
|
},
|
||||||
|
addToListTwo() {
|
||||||
|
debugger
|
||||||
|
let currentValue = this.listTwo.slice();
|
||||||
|
const itemsToBeMoved = [];
|
||||||
|
const key = this.props.key;
|
||||||
|
this.data.forEach(item => {
|
||||||
|
const itemKey = item[key];
|
||||||
|
if (
|
||||||
|
this.leftChecked.indexOf(itemKey) > -1 &&
|
||||||
|
this.listTwo.indexOf(itemKey) === -1
|
||||||
|
) {
|
||||||
|
itemsToBeMoved.push(itemKey);
|
||||||
|
}
|
||||||
|
});
|
||||||
|
currentValue = this.targetOrder === 'unshift'
|
||||||
|
? itemsToBeMoved.concat(currentValue)
|
||||||
|
: currentValue.concat(itemsToBeMoved);
|
||||||
|
|
||||||
|
// 更新列表2
|
||||||
|
this.$emit('update:listTwo', currentValue);
|
||||||
|
console.log(this.listTwo,"listTwo")
|
||||||
|
},
|
||||||
|
// 列表2设备选择
|
||||||
|
onlistTwoCheckedChange(val, movedKeys) {
|
||||||
|
this.listTwoChecked = val;
|
||||||
|
if (movedKeys === undefined) return;
|
||||||
|
this.$emit('right-check-change', val, movedKeys);
|
||||||
|
},
|
||||||
|
addToLeft() {
|
||||||
|
// 列表1
|
||||||
|
let currentValue = this.value.slice();
|
||||||
|
// 列表2
|
||||||
|
let listTwo = this.listTwo.slice();
|
||||||
|
this.rightChecked.forEach(item => {
|
||||||
|
const index = currentValue.indexOf(item);
|
||||||
|
if (index > -1) {
|
||||||
|
currentValue.splice(index, 1);
|
||||||
|
}
|
||||||
|
});
|
||||||
|
this.listTwoChecked.forEach(item => {
|
||||||
|
const index = listTwo.indexOf(item);
|
||||||
|
if (index > -1) {
|
||||||
|
listTwo.splice(index, 1);
|
||||||
|
}
|
||||||
|
});
|
||||||
|
// 更新列表1
|
||||||
|
this.$emit('input', currentValue);
|
||||||
|
// 更新列表2
|
||||||
|
this.$emit('update:listTwo', listTwo);
|
||||||
|
this.$emit('change', currentValue, 'left', this.rightChecked);
|
||||||
|
},
|
||||||
|
},
|
||||||
|
watch: {
|
||||||
|
listTwo(val) {
|
||||||
|
this.dispatch('ElFormItem', 'el.form.change', val);
|
||||||
|
},
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
|
</script>
|
||||||
|
|
||||||
|
<style lang="scss" scoped>
|
||||||
|
::v-deep .el-transfer{
|
||||||
|
position: relative;
|
||||||
|
width: 100%;
|
||||||
|
height: 500px !important;
|
||||||
|
|
||||||
|
}
|
||||||
|
::v-deep .el-transfer-panel{
|
||||||
|
height: 400px;
|
||||||
|
width: 220px;
|
||||||
|
}
|
||||||
|
::v-deep .el-transfer-panel__list.is-filterable{
|
||||||
|
height: 255px;
|
||||||
|
}
|
||||||
|
.list2{
|
||||||
|
margin-left: 10px;
|
||||||
|
}
|
||||||
|
</style>
|
||||||
@@ -8,9 +8,9 @@
|
|||||||
<el-col :span="20">
|
<el-col :span="20">
|
||||||
<div class="search-box-left">
|
<div class="search-box-left">
|
||||||
<label>数据字典编码:</label>
|
<label>数据字典编码:</label>
|
||||||
<el-input v-model="q.account" placeholder="请输入数据字典编码"></el-input>
|
<el-input v-model="q.dicCode" placeholder="请输入数据字典编码"></el-input>
|
||||||
<label>数据字典名称:</label>
|
<label>数据字典名称:</label>
|
||||||
<el-input v-model="q.account" placeholder="请输入数据字典名称"></el-input>
|
<el-input v-model="q.dicName" placeholder="请输入数据字典名称"></el-input>
|
||||||
</div>
|
</div>
|
||||||
</el-col>
|
</el-col>
|
||||||
<el-col :span="4" align="right">
|
<el-col :span="4" align="right">
|
||||||
@@ -36,9 +36,9 @@
|
|||||||
{{ rowIndex + (q.pageNo - 1) * q.pageSize + 1 }}
|
{{ rowIndex + (q.pageNo - 1) * q.pageSize + 1 }}
|
||||||
</template>
|
</template>
|
||||||
</vxe-column>
|
</vxe-column>
|
||||||
<vxe-column show-overflow show-header-overflow field="ACCOUNT" title="数据字典编码"></vxe-column>
|
<vxe-column show-overflow show-header-overflow field="dicCode" title="数据字典编码"></vxe-column>
|
||||||
<vxe-column show-overflow show-header-overflow field="CELLPHONE_NUMBER" title="数据字典名称"></vxe-column>
|
<vxe-column show-overflow show-header-overflow field="dicName" title="数据字典名称"></vxe-column>
|
||||||
<vxe-column show-overflow show-header-overflow field="CREATEDATE" title="创建时间"></vxe-column>
|
<vxe-column show-overflow show-header-overflow field="description" title="描述"></vxe-column>
|
||||||
<vxe-column show-overflow show-header-overflow title="操作" width="200" fixed="right">
|
<vxe-column show-overflow show-header-overflow title="操作" width="200" fixed="right">
|
||||||
<template #default="{ row }">
|
<template #default="{ row }">
|
||||||
<el-button type="text" @click="openRowData('view', row)">查看</el-button>
|
<el-button type="text" @click="openRowData('view', row)">查看</el-button>
|
||||||
@@ -57,12 +57,12 @@
|
|||||||
:total="total"/>
|
:total="total"/>
|
||||||
</div>
|
</div>
|
||||||
<!-- 新增/编辑/查看 用户 -->
|
<!-- 新增/编辑/查看 用户 -->
|
||||||
<el-dialog :title="dialogTitle " :visible.sync="dialogUser" width="750px" :close-on-click-modal="false"
|
<el-dialog :title="dialogTitle" :visible.sync="dialogUser" width="750px" :close-on-click-modal="false"
|
||||||
:close-on-press-escape="false" modal-append-to-body append-to-body>
|
:close-on-press-escape="false" modal-append-to-body append-to-body>
|
||||||
<div class="user-form">
|
<div class="user-form">
|
||||||
<el-form :model="form" label-width="186px" :disabled="mode === 'view'">
|
<el-form :model="form" label-width="186px" :disabled="mode === 'view'">
|
||||||
<el-form-item label="数据字典编码:" required>
|
<el-form-item label="数据字典编码:" required>
|
||||||
<el-input v-model="form.account" maxlength="20" show-word-limit placeholder="请输入数据字典编码"></el-input>
|
<el-input v-model="form.dicCode" :disabled="mode === 'view' || mode === 'modify' " maxlength="20" show-word-limit placeholder="请输入数据字典编码"></el-input>
|
||||||
</el-form-item>
|
</el-form-item>
|
||||||
<!--<el-form-item label="密码:" :required="mode === 'add'" v-if="mode !== 'view'">-->
|
<!--<el-form-item label="密码:" :required="mode === 'add'" v-if="mode !== 'view'">-->
|
||||||
<!--<el-input v-model="form.password" maxlength="20" type="password" placeholder="请输入密码"></el-input>-->
|
<!--<el-input v-model="form.password" maxlength="20" type="password" placeholder="请输入密码"></el-input>-->
|
||||||
@@ -71,11 +71,11 @@
|
|||||||
<!--<el-input v-model="repassword" maxlength="20" type="password" placeholder="请确认密码"></el-input>-->
|
<!--<el-input v-model="repassword" maxlength="20" type="password" placeholder="请确认密码"></el-input>-->
|
||||||
<!--</el-form-item>-->
|
<!--</el-form-item>-->
|
||||||
<el-form-item label="数据字典名称:">
|
<el-form-item label="数据字典名称:">
|
||||||
<el-input v-model="form.cellPhoneNumber" placeholder="请输入数据字典名称"></el-input>
|
<el-input v-model="form.dicName" placeholder="请输入数据字典名称"></el-input>
|
||||||
</el-form-item>
|
</el-form-item>
|
||||||
|
|
||||||
<el-form-item label="姓名:" required>
|
<el-form-item label="描述:" required>
|
||||||
<el-input v-model="form.usname" maxlength="20" show-word-limit placeholder="请输入姓名"></el-input>
|
<el-input v-model="form.description" maxlength="20" show-word-limit placeholder="请输入描述"></el-input>
|
||||||
</el-form-item>
|
</el-form-item>
|
||||||
</el-form>
|
</el-form>
|
||||||
<div class="done">
|
<div class="done">
|
||||||
@@ -93,8 +93,8 @@ export default {
|
|||||||
data () {
|
data () {
|
||||||
return {
|
return {
|
||||||
q: {
|
q: {
|
||||||
account: '', // 用户名
|
dicCode: '', // 用户名
|
||||||
roleName: '', // 角色名称
|
dicName: '', // 角色名称
|
||||||
pageNo: 1,
|
pageNo: 1,
|
||||||
pageSize: 10
|
pageSize: 10
|
||||||
},
|
},
|
||||||
@@ -103,14 +103,9 @@ export default {
|
|||||||
mode: '',
|
mode: '',
|
||||||
dialogUser: false,
|
dialogUser: false,
|
||||||
form: {
|
form: {
|
||||||
account: '', // 用户名
|
dicCode:'',
|
||||||
cellPhoneNumber: '', // 手机号
|
dicName:'',
|
||||||
department: '', // 部门
|
description:''
|
||||||
email: '', // 邮箱
|
|
||||||
password: '', // 密码
|
|
||||||
usid: '',
|
|
||||||
usname: '', // 姓名
|
|
||||||
roleIdList: [''] // 角色
|
|
||||||
},
|
},
|
||||||
repassword: '',
|
repassword: '',
|
||||||
roleList: []
|
roleList: []
|
||||||
@@ -123,7 +118,10 @@ export default {
|
|||||||
},
|
},
|
||||||
// 获取所有字典
|
// 获取所有字典
|
||||||
sysUserList () {
|
sysUserList () {
|
||||||
|
this.$api.dictionary.getDic(this.q).then((res)=>{
|
||||||
|
this.tableData = res.data.records
|
||||||
|
this.total=res.data.total
|
||||||
|
})
|
||||||
},
|
},
|
||||||
// 重置
|
// 重置
|
||||||
reset () {
|
reset () {
|
||||||
@@ -152,14 +150,9 @@ export default {
|
|||||||
add () {
|
add () {
|
||||||
this.mode = 'add'
|
this.mode = 'add'
|
||||||
this.form = {
|
this.form = {
|
||||||
account: '', // 用户名
|
dicCode:'',
|
||||||
cellPhoneNumber: '', // 手机号
|
dicName:'',
|
||||||
department: '', // 部门
|
description:''
|
||||||
email: '', // 邮箱
|
|
||||||
password: '', // 密码
|
|
||||||
usid: '',
|
|
||||||
usname: '', // 姓名
|
|
||||||
roleIdList: [''] // 角色
|
|
||||||
}
|
}
|
||||||
this.repassword = ''
|
this.repassword = ''
|
||||||
this.dialogUser = true
|
this.dialogUser = true
|
||||||
@@ -181,22 +174,27 @@ export default {
|
|||||||
// },
|
// },
|
||||||
// 删除
|
// 删除
|
||||||
deleteRow (row) {
|
deleteRow (row) {
|
||||||
this.deleteUser(row.USID)
|
this.deleteUser(row.id)
|
||||||
},
|
},
|
||||||
// 新增用户
|
// 新增用户
|
||||||
sysUserAddUser () {
|
sysUserAddUser () {
|
||||||
const data = JSON.parse(JSON.stringify(this.form))
|
if(this.mode=='add'){
|
||||||
data.account = this.$JSEncrypt(data.account)
|
this.$api.dictionary.addDic(this.form).then((res)=>{
|
||||||
data.password = this.$JSEncrypt(data.password)
|
this.$message.success("新增成功")
|
||||||
const jsonData = JSON.stringify(data)
|
this.sysUserList()
|
||||||
this.$api.user.sysUserAddUser(Base64.encodeURI(jsonData)).then(_ => {
|
})
|
||||||
this.$message.success('操作成功')
|
}else{
|
||||||
this.dialogUser = false
|
this.$api.dictionary.editDic(this.form).then((res)=>{
|
||||||
this.reset()
|
this.$message.success("编辑成功")
|
||||||
})
|
this.sysUserList()
|
||||||
|
})
|
||||||
|
}
|
||||||
|
|
||||||
|
this.dialogUser = false
|
||||||
},
|
},
|
||||||
// 编辑查看用户
|
// 编辑查看用户
|
||||||
openRowData (mode, row) {
|
openRowData (mode, row) {
|
||||||
|
this.mode = mode
|
||||||
if(mode=='view'){
|
if(mode=='view'){
|
||||||
this.$router.push({
|
this.$router.push({
|
||||||
path:'/system/dicdeatil',
|
path:'/system/dicdeatil',
|
||||||
@@ -205,19 +203,16 @@ export default {
|
|||||||
pId:row.id
|
pId:row.id
|
||||||
}
|
}
|
||||||
})
|
})
|
||||||
}else{
|
}else if(mode=='add'){
|
||||||
this.mode = mode
|
|
||||||
this.form = {
|
this.form = {
|
||||||
account: row.ACCOUNT, // 用户名
|
description:'',
|
||||||
cellPhoneNumber: row.CELLPHONE_NUMBER, // 手机号
|
dicName:'',
|
||||||
department: row.DEPARTMENT, // 部门
|
dicCode:''
|
||||||
email: row.EMAIL, // 邮箱
|
|
||||||
password: '', // 密码
|
|
||||||
usid: row.USID, // 用户ID
|
|
||||||
usname: row.USNAME, // 姓名
|
|
||||||
roleIdList: [row.ROLEID] // 角色
|
|
||||||
}
|
}
|
||||||
this.repassword = ''
|
this.dialogUser = true
|
||||||
|
}else{
|
||||||
|
this.form = JSON.parse(JSON.stringify(row))
|
||||||
this.dialogUser = true
|
this.dialogUser = true
|
||||||
}
|
}
|
||||||
|
|
||||||
@@ -229,7 +224,7 @@ export default {
|
|||||||
if (!users.length) {
|
if (!users.length) {
|
||||||
return this.$message.warning('请选择数据后在进行操作')
|
return this.$message.warning('请选择数据后在进行操作')
|
||||||
}
|
}
|
||||||
const ids = users.map(item => item.USID).join(',')
|
const ids = users.map(item => item.id).join(',')
|
||||||
this.deleteUser(ids)
|
this.deleteUser(ids)
|
||||||
},
|
},
|
||||||
// 删除用户
|
// 删除用户
|
||||||
@@ -239,10 +234,10 @@ export default {
|
|||||||
cancelButtonText: '取消',
|
cancelButtonText: '取消',
|
||||||
type: 'warning'
|
type: 'warning'
|
||||||
}).then(() => {
|
}).then(() => {
|
||||||
// this.$api.user.sysUserDelete({ ids }).then(_ => {
|
this.$api.dictionary.delDic(ids ).then(_ => {
|
||||||
this.$message.success('操作成功')
|
this.$message.success('操作成功')
|
||||||
this.sysUserList()
|
this.sysUserList()
|
||||||
// })
|
})
|
||||||
})
|
})
|
||||||
},
|
},
|
||||||
|
|
||||||
|
|||||||
@@ -17,33 +17,37 @@
|
|||||||
placeholder="请输入报告名称"></el-input>
|
placeholder="请输入报告名称"></el-input>
|
||||||
</el-form-item>
|
</el-form-item>
|
||||||
</el-col>
|
</el-col>
|
||||||
<el-col :span="9" :offset="6" >
|
<el-col :span="9" :offset="6">
|
||||||
<el-form-item label="报告年份:" prop="year">
|
<el-form-item label="报告年份:" prop="year">
|
||||||
<el-date-picker :disabled="formControl" v-model="form.year" type="year" value-format="yyyy" placeholder="请选择报告年份"
|
<el-date-picker :disabled="formControl" v-model="form.year" type="year" value-format="yyyy"
|
||||||
prefix-icon="null" :picker-options="pickerOptions" />
|
placeholder="请选择报告年份"
|
||||||
|
prefix-icon="null" :picker-options="pickerOptions"/>
|
||||||
</el-form-item>
|
</el-form-item>
|
||||||
</el-col>
|
</el-col>
|
||||||
</el-row>
|
</el-row>
|
||||||
<el-row>
|
<el-row>
|
||||||
<el-col :span="9">
|
<el-col :span="9">
|
||||||
<el-form-item label="报告所属部门:" prop="department">
|
<el-form-item label="报告所属部门:" prop="department">
|
||||||
<el-input :disabled="formControl" v-model="form.department" placeholder="请选择报告所属部门" maxlength="100" ></el-input>
|
<el-input :disabled="formControl" v-model="form.department" placeholder="请选择报告所属部门"
|
||||||
|
maxlength="100"></el-input>
|
||||||
</el-form-item>
|
</el-form-item>
|
||||||
</el-col>
|
</el-col>
|
||||||
<el-col :span="9" :offset="6">
|
<el-col :span="9" :offset="6">
|
||||||
<el-form-item label="报告涉密等级:" prop="confidentialLevel">
|
<el-form-item label="报告涉密等级:" prop="confidentialLevel">
|
||||||
<el-select :disabled="formControl" v-model="form.confidentialLevel" placeholder="请选择报告涉密等级">
|
<el-select :disabled="formControl" v-model="form.confidentialLevel" placeholder="请选择报告涉密等级">
|
||||||
<el-option v-for="item in confidentialLevelOptions" :key="item.value" :label="item.label" :value="item.value">
|
<el-option v-for="item in confidentialLevelOptions" :key="item.value" :label="item.label"
|
||||||
|
:value="item.value">
|
||||||
</el-option>
|
</el-option>
|
||||||
</el-select>
|
</el-select>
|
||||||
</el-form-item>
|
</el-form-item>
|
||||||
</el-col>
|
</el-col>
|
||||||
</el-row>
|
</el-row>
|
||||||
<el-row>
|
<el-row>
|
||||||
<el-col :span="9">
|
<el-col :span="9">
|
||||||
<el-form-item label="关键词:" prop="tags">
|
<el-form-item label="关键词:" prop="tags">
|
||||||
<vue-tags-input :disabled="formControl" :class="{'is-diable':formControl}" placeholder="请输入关键词" v-model="form.tags" :tags="tags"
|
<vue-tags-input :disabled="formControl" :class="{'is-diable':formControl}" placeholder="请输入关键词"
|
||||||
:avoid-adding-duplicates="false" @tags-changed="newTags =>{
|
v-model="form.tags" :tags="tags"
|
||||||
|
:avoid-adding-duplicates="false" @tags-changed="newTags =>{
|
||||||
if(newTags[newTags.length - 1].text.length <= 20){
|
if(newTags[newTags.length - 1].text.length <= 20){
|
||||||
if(tags.length < 10){
|
if(tags.length < 10){
|
||||||
tags = newTags
|
tags = newTags
|
||||||
@@ -57,10 +61,10 @@
|
|||||||
tags = newTags.slice(0,-1)
|
tags = newTags.slice(0,-1)
|
||||||
}
|
}
|
||||||
|
|
||||||
}" />
|
}"/>
|
||||||
</el-form-item>
|
</el-form-item>
|
||||||
</el-col>
|
</el-col>
|
||||||
<el-col :span="9" :offset="6">
|
<el-col :span="9" :offset="6">
|
||||||
<el-form-item label="报告隐私等级:" prop="privacyLevelOptions">
|
<el-form-item label="报告隐私等级:" prop="privacyLevelOptions">
|
||||||
<el-select :disabled="formControl" v-model="form.privacyLevelOptions" placeholder="请选择报告隐私等级">
|
<el-select :disabled="formControl" v-model="form.privacyLevelOptions" placeholder="请选择报告隐私等级">
|
||||||
<el-option v-for="item in privacyLevelOptions" :key="item.value" :label="item.label" :value="item.value">
|
<el-option v-for="item in privacyLevelOptions" :key="item.value" :label="item.label" :value="item.value">
|
||||||
@@ -70,9 +74,10 @@
|
|||||||
</el-col>
|
</el-col>
|
||||||
</el-row>
|
</el-row>
|
||||||
<el-row>
|
<el-row>
|
||||||
<el-col :span="9">
|
<el-col :span="9">
|
||||||
<el-form-item label="标签:" prop="department">
|
<el-form-item label="标签:" prop="department">
|
||||||
<el-cascader :disabled="formControl" width="100%" v-model="form.labelList" :options="cascaderOptions" filterable
|
<el-cascader :disabled="formControl" width="100%" v-model="form.labelList" :options="cascaderOptions"
|
||||||
|
filterable
|
||||||
:props="{ checkStrictly: true }" clearable placeholder="请选择标签">
|
:props="{ checkStrictly: true }" clearable placeholder="请选择标签">
|
||||||
<template slot-scope="{ node, data }">
|
<template slot-scope="{ node, data }">
|
||||||
<span :title="data.label">{{ data.label }}</span>
|
<span :title="data.label">{{ data.label }}</span>
|
||||||
@@ -82,18 +87,20 @@
|
|||||||
</el-col>
|
</el-col>
|
||||||
</el-row>
|
</el-row>
|
||||||
<el-row>
|
<el-row>
|
||||||
<el-col :span="18">
|
<el-col :span="18">
|
||||||
<el-form-item label="内容摘要:" prop="mainContent">
|
<el-form-item label="内容摘要:" prop="mainContent">
|
||||||
<el-input :disabled="formControl" v-model="form.mainContent" placeholder="请填写内容摘要" type="textarea" maxlength="500"></el-input>
|
<el-input :disabled="formControl" v-model="form.mainContent" placeholder="请填写内容摘要" type="textarea"
|
||||||
|
maxlength="500"></el-input>
|
||||||
</el-form-item>
|
</el-form-item>
|
||||||
</el-col>
|
</el-col>
|
||||||
</el-row>
|
</el-row>
|
||||||
<el-row>
|
<el-row>
|
||||||
<el-col :span="9">
|
<el-col :span="9">
|
||||||
<el-form-item label="上传报告:" required>
|
<el-form-item label="上传报告:" prop="fileId">
|
||||||
<el-upload action="#" :http-request="(params) => uploadFile(params)" :show-file-list="false"
|
<el-upload action="#" :http-request="(params) => uploadFile(params)" :show-file-list="true"
|
||||||
:before-upload="beforeUploadFile">
|
:before-upload="beforeUploadFile" :on-remove="handleRemove"
|
||||||
<el-button :disabled="formControl" >选择文件</el-button>
|
:file-list="fileList">
|
||||||
|
<el-button :disabled="formControl">选择文件</el-button>
|
||||||
</el-upload>
|
</el-upload>
|
||||||
</el-form-item>
|
</el-form-item>
|
||||||
</el-col>
|
</el-col>
|
||||||
@@ -101,181 +108,337 @@
|
|||||||
<el-row>
|
<el-row>
|
||||||
<el-col :span="9">
|
<el-col :span="9">
|
||||||
<el-form-item label="权限设置:" required>
|
<el-form-item label="权限设置:" required>
|
||||||
<el-button :disabled="formControl">选择文件</el-button>
|
<el-button :disabled="formControl" @click="openDialog">权限设置</el-button>
|
||||||
</el-form-item>
|
</el-form-item>
|
||||||
</el-col>
|
</el-col>
|
||||||
</el-row>
|
</el-row>
|
||||||
</el-form>
|
</el-form>
|
||||||
|
<el-dialog title="权限设置" :visible.sync="dialogUser" width="950px" :close-on-click-modal="false"
|
||||||
|
:close-on-press-escape="false" modal-append-to-body append-to-body>
|
||||||
|
<div class="user-form">
|
||||||
|
<div style="text-align: center">
|
||||||
|
<newTranslate
|
||||||
|
@loadMore="loadMore"
|
||||||
|
style="text-align: left; display: inline-block"
|
||||||
|
filterable
|
||||||
|
v-model="listOne"
|
||||||
|
:titles="['全部人员', '预览权限人员','预览和下载权限人员']"
|
||||||
|
:props="{
|
||||||
|
key: 'value',
|
||||||
|
label: 'desc'
|
||||||
|
}"
|
||||||
|
:loadingMore="loadingMore"
|
||||||
|
:data="allUser"
|
||||||
|
:listTwo.sync="listTwo"
|
||||||
|
:button-texts="['全部', '预览', '预览与下载']"
|
||||||
|
></newTranslate>
|
||||||
|
</div>
|
||||||
|
<div class="done">
|
||||||
|
<el-button type="default" @click="closeD">取消</el-button>
|
||||||
|
<el-button type="primary" v-if="!formControl" @click="saveCheck">确定</el-button>
|
||||||
|
|
||||||
|
</div>
|
||||||
|
</div>
|
||||||
|
</el-dialog>
|
||||||
</div>
|
</div>
|
||||||
</template>
|
</template>
|
||||||
<script>
|
<script>
|
||||||
import { fileType } from '@/utils/fileType'
|
import {fileType} from '@/utils/fileType'
|
||||||
|
import newTranslate from "../../../components/newTranslate";
|
||||||
import VueTagsInput from '@johmun/vue-tags-input';
|
import VueTagsInput from '@johmun/vue-tags-input';
|
||||||
export default {
|
|
||||||
components:{
|
|
||||||
VueTagsInput
|
|
||||||
},
|
|
||||||
props:{
|
|
||||||
formControl:{
|
|
||||||
type:Boolean,
|
|
||||||
default:false
|
|
||||||
},
|
|
||||||
formControlname:{
|
|
||||||
type:Boolean,
|
|
||||||
default:false
|
|
||||||
},
|
|
||||||
processForm:{
|
|
||||||
type:Object
|
|
||||||
}
|
|
||||||
},
|
|
||||||
data(){
|
|
||||||
return {
|
|
||||||
confidentialLevelOptions:[],
|
|
||||||
cascaderOptions: [],
|
|
||||||
privacyLevelOptions: [],
|
|
||||||
tags:[],
|
|
||||||
pickerOptions: {
|
|
||||||
disabledDate(time) {
|
|
||||||
return time.getFullYear() > new Date().getFullYear() + 1 || time.getFullYear() < new Date().getFullYear() - 10;
|
|
||||||
},
|
|
||||||
},
|
|
||||||
form:{
|
|
||||||
|
|
||||||
},
|
export default {
|
||||||
processFormRule:{
|
components: {
|
||||||
prcName:[
|
VueTagsInput,
|
||||||
{
|
newTranslate
|
||||||
required:true,
|
},
|
||||||
message:"流程名称不能为空",
|
props: {
|
||||||
trigger:'change'
|
|
||||||
},{
|
|
||||||
max:100,
|
|
||||||
message:"流程名称不能超过100字符",
|
|
||||||
trigger:'change'
|
|
||||||
}
|
|
||||||
],
|
|
||||||
name: [{
|
|
||||||
required:true,
|
|
||||||
message:"报告名称不能为空",
|
|
||||||
trigger:'change'
|
|
||||||
},{
|
|
||||||
max:100,
|
|
||||||
message:"报告名称不能超过100字符",
|
|
||||||
trigger:'change'
|
|
||||||
}],
|
|
||||||
mainContent: [{
|
|
||||||
max:500,
|
|
||||||
message:"内容摘要不能超过500字符",
|
|
||||||
trigger:'change'
|
|
||||||
}],
|
|
||||||
year: [{
|
|
||||||
required:true,
|
|
||||||
message:"报告年份不能为空",
|
|
||||||
trigger:'change'
|
|
||||||
}],
|
|
||||||
reportUserIdList:[
|
|
||||||
{
|
|
||||||
required:true,
|
|
||||||
message:"权限不能为空",
|
|
||||||
trigger:'change'
|
|
||||||
}
|
|
||||||
],
|
|
||||||
fileName:[
|
|
||||||
{
|
|
||||||
required:true,
|
|
||||||
message:"报告文件不能为空", trigger:'change'
|
|
||||||
|
|
||||||
}
|
formControl: {
|
||||||
]
|
type: Boolean,
|
||||||
|
default: false
|
||||||
}
|
|
||||||
}
|
|
||||||
},
|
},
|
||||||
methods:{
|
formControlname: {
|
||||||
//用递归方式去除children
|
type: Boolean,
|
||||||
getTreeData(data) {
|
default: false
|
||||||
for (var i = 0; i < data.length; i++) {
|
|
||||||
if (data[i].children.length < 1) {
|
|
||||||
// children若为空数组,则将children设为undefined
|
|
||||||
data[i].children = undefined;
|
|
||||||
} else {
|
|
||||||
// children若不为空数组,则继续 递归调用 本方法
|
|
||||||
this.getTreeData(data[i].children);
|
|
||||||
}
|
|
||||||
}
|
|
||||||
return data;
|
|
||||||
},
|
|
||||||
updateList(){
|
|
||||||
this.$api.report.labelList().then(res => {
|
|
||||||
this.cascaderOptions=this.getTreeData(res.data)
|
|
||||||
})
|
|
||||||
this.$forceUpdate()
|
|
||||||
},
|
|
||||||
// 上传文件
|
|
||||||
uploadFile(params) {
|
|
||||||
let fd = new FormData();
|
|
||||||
fd.append('file', params.file);
|
|
||||||
this.$api.report.reportUploadFile(fd).then(({ data }) => {
|
|
||||||
this.form.fileName = data.name;
|
|
||||||
this.form.fileId = data.key;
|
|
||||||
})
|
|
||||||
},
|
|
||||||
// 上传文件前
|
|
||||||
beforeUploadFile(file) {
|
|
||||||
let realFileType = file.name.split('.')[file.name.split('.').length - 1];
|
|
||||||
const isType = (
|
|
||||||
file.type === fileType.pdf || file.type === fileType.xls || file.type === fileType.xlsx || file.type === fileType.doc || file.type === fileType.docx || file.type === fileType.ppt || file.type === fileType.pptx
|
|
||||||
|| realFileType === 'pdf' || realFileType === 'xls' || realFileType === 'xlsx' || realFileType === 'doc' || realFileType === 'docx' || realFileType === 'ppt' || realFileType === 'pptx'
|
|
||||||
);
|
|
||||||
const isSize = file.size / 1024 / 1024 < 200;
|
|
||||||
if (!isType) {
|
|
||||||
this.$message.error('仅能上传 pdf|xls|xlsx|doc|docx|ppt|pptx 格式文件');
|
|
||||||
}
|
|
||||||
if (!isSize) {
|
|
||||||
this.$message.error('您最大可上传200M文件');
|
|
||||||
}
|
|
||||||
return isType && isSize;
|
|
||||||
},
|
|
||||||
submit(){
|
|
||||||
let flag
|
|
||||||
this.$refs.processFormRef.validate(v=>{
|
|
||||||
flag=v
|
|
||||||
return v
|
|
||||||
})
|
|
||||||
return flag
|
|
||||||
}
|
|
||||||
},
|
},
|
||||||
mounted() {
|
processForm: {
|
||||||
this.updateList()
|
type: Object
|
||||||
}
|
}
|
||||||
|
},
|
||||||
|
data() {
|
||||||
|
return {
|
||||||
|
loadingMore:false,
|
||||||
|
listTwo: [], //存储下载预览的
|
||||||
|
allUser: [], //存储全部的
|
||||||
|
listOne: [1],
|
||||||
|
dialogUser: false,
|
||||||
|
confidentialLevelOptions: [],
|
||||||
|
cascaderOptions: [],
|
||||||
|
privacyLevelOptions: [],
|
||||||
|
tags: [],
|
||||||
|
pickerOptions: {
|
||||||
|
disabledDate(time) {
|
||||||
|
return time.getFullYear() > new Date().getFullYear() + 1 || time.getFullYear() < new Date().getFullYear() - 10;
|
||||||
|
},
|
||||||
|
},
|
||||||
|
form: {},
|
||||||
|
processFormRule: {
|
||||||
|
fileId:[
|
||||||
|
{
|
||||||
|
required: true,
|
||||||
|
message: "上传报告不能为空",
|
||||||
|
trigger: 'change'
|
||||||
|
}
|
||||||
|
],
|
||||||
|
prcName: [
|
||||||
|
{
|
||||||
|
required: true,
|
||||||
|
message: "流程名称不能为空",
|
||||||
|
trigger: 'change'
|
||||||
|
}, {
|
||||||
|
max: 100,
|
||||||
|
message: "流程名称不能超过100字符",
|
||||||
|
trigger: 'change'
|
||||||
|
}
|
||||||
|
],
|
||||||
|
name: [{
|
||||||
|
required: true,
|
||||||
|
message: "报告名称不能为空",
|
||||||
|
trigger: 'change'
|
||||||
|
}, {
|
||||||
|
max: 100,
|
||||||
|
message: "报告名称不能超过100字符",
|
||||||
|
trigger: 'change'
|
||||||
|
}],
|
||||||
|
mainContent: [{
|
||||||
|
max: 500,
|
||||||
|
message: "内容摘要不能超过500字符",
|
||||||
|
trigger: 'change'
|
||||||
|
}],
|
||||||
|
year: [{
|
||||||
|
required: true,
|
||||||
|
message: "报告年份不能为空",
|
||||||
|
trigger: 'change'
|
||||||
|
}],
|
||||||
|
reportUserIdList: [
|
||||||
|
{
|
||||||
|
required: true,
|
||||||
|
message: "权限不能为空",
|
||||||
|
trigger: 'change'
|
||||||
|
}
|
||||||
|
],
|
||||||
|
fileName: [
|
||||||
|
{
|
||||||
|
required: true,
|
||||||
|
message: "报告文件不能为空", trigger: 'change'
|
||||||
|
|
||||||
|
}
|
||||||
|
]
|
||||||
|
|
||||||
|
},
|
||||||
|
q: {
|
||||||
|
pageNo: 1,
|
||||||
|
pageSize: 10
|
||||||
|
},
|
||||||
|
fileList:[]
|
||||||
|
}
|
||||||
|
},
|
||||||
|
methods: {
|
||||||
|
loadMore(){
|
||||||
|
this.q.pageNo++
|
||||||
|
this.getAllPerson()
|
||||||
|
},
|
||||||
|
closeD() {
|
||||||
|
if (this.$route.query.isBegin || this.$route.query.isDraft) {
|
||||||
|
this.listOne=[]
|
||||||
|
this.listTwo=[]
|
||||||
|
}else{
|
||||||
|
|
||||||
|
}
|
||||||
|
this.dialogUser = false
|
||||||
|
},
|
||||||
|
saveCheck() {
|
||||||
|
// 可以编辑
|
||||||
|
if (!this.formControl) {
|
||||||
|
// 第一次发起与草稿还要区分
|
||||||
|
if (this.$route.query.isBegin || this.$route.query.isDraft) {
|
||||||
|
let list1 = this.listOne.map(item => {
|
||||||
|
let obj = {
|
||||||
|
userId: item.id,
|
||||||
|
power: 1
|
||||||
|
}
|
||||||
|
return obj
|
||||||
|
})
|
||||||
|
let list2 = this.listTwo.map(item => {
|
||||||
|
let obj = {
|
||||||
|
userId: item.id,
|
||||||
|
power: 2
|
||||||
|
}
|
||||||
|
return obj
|
||||||
|
})
|
||||||
|
this.dialogUser = false
|
||||||
|
} else {
|
||||||
|
//如果是发起人编辑节点
|
||||||
|
let list1 = this.listOne.map(item => {
|
||||||
|
let obj = {
|
||||||
|
userId: item.id,
|
||||||
|
power: 1
|
||||||
|
}
|
||||||
|
return obj
|
||||||
|
})
|
||||||
|
let list2 = this.listTwo.map(item => {
|
||||||
|
let obj = {
|
||||||
|
userId: item.id,
|
||||||
|
power: 2
|
||||||
|
}
|
||||||
|
return obj
|
||||||
|
})
|
||||||
|
this.form.powerList = [...list1, ...list2]
|
||||||
|
}
|
||||||
|
}else{}
|
||||||
|
|
||||||
|
},
|
||||||
|
//获取全部人员
|
||||||
|
getAllPerson() {
|
||||||
|
this.$api.user.sysUserList(this.q).then(({data}) => {
|
||||||
|
let newlist = data.records.map(item => {
|
||||||
|
let obj = {
|
||||||
|
key: item.USID,
|
||||||
|
value: item.USNAME,
|
||||||
|
label: item.USNAME
|
||||||
|
}
|
||||||
|
return obj
|
||||||
|
})
|
||||||
|
this.allUser=[...this.allUser,...newlist]
|
||||||
|
this.total = data.total
|
||||||
|
this.q.pageNo = data.current
|
||||||
|
this.q.pageSize = data.size
|
||||||
|
if (!data.records.length && this.q.pageNo !== 1) {
|
||||||
|
this.q.pageNo = 1
|
||||||
|
this.sysUserList()
|
||||||
|
}
|
||||||
|
this.loadingMore=false
|
||||||
|
})
|
||||||
|
},
|
||||||
|
handleChange(value, direction, movedKeys) {
|
||||||
|
console.log(value, direction, movedKeys);
|
||||||
|
},
|
||||||
|
openDialog() {
|
||||||
|
this.dialogUser = true
|
||||||
|
},
|
||||||
|
handleRemove(file, fileList) {
|
||||||
|
console.log(file, fileList);
|
||||||
|
this.form.fileName ='';
|
||||||
|
this.form.fileId = '';
|
||||||
|
this.fileList=[]
|
||||||
|
},
|
||||||
|
//用递归方式去除children
|
||||||
|
getTreeData(data) {
|
||||||
|
for (var i = 0; i < data.length; i++) {
|
||||||
|
if (data[i].children.length < 1) {
|
||||||
|
// children若为空数组,则将children设为undefined
|
||||||
|
data[i].children = undefined;
|
||||||
|
} else {
|
||||||
|
// children若不为空数组,则继续 递归调用 本方法
|
||||||
|
this.getTreeData(data[i].children);
|
||||||
|
}
|
||||||
|
}
|
||||||
|
return data;
|
||||||
|
},
|
||||||
|
updateList() {
|
||||||
|
this.$api.report.labelList().then(res => {
|
||||||
|
this.cascaderOptions = this.getTreeData(res.data)
|
||||||
|
})
|
||||||
|
this.$forceUpdate()
|
||||||
|
},
|
||||||
|
// 上传文件
|
||||||
|
uploadFile(params) {
|
||||||
|
let fd = new FormData();
|
||||||
|
fd.append('file', params.file);
|
||||||
|
this.$api.report.reportUploadFile(fd).then(({data}) => {
|
||||||
|
this.form.fileName = data.name;
|
||||||
|
this.form.fileId = data.key;
|
||||||
|
this.fileList=[data]
|
||||||
|
})
|
||||||
|
},
|
||||||
|
// 上传文件前
|
||||||
|
beforeUploadFile(file) {
|
||||||
|
let realFileType = file.name.split('.')[file.name.split('.').length - 1];
|
||||||
|
const isType = (
|
||||||
|
file.type === fileType.pdf || file.type === fileType.xls || file.type === fileType.xlsx || file.type === fileType.doc || file.type === fileType.docx || file.type === fileType.ppt || file.type === fileType.pptx
|
||||||
|
|| realFileType === 'pdf' || realFileType === 'xls' || realFileType === 'xlsx' || realFileType === 'doc' || realFileType === 'docx' || realFileType === 'ppt' || realFileType === 'pptx'
|
||||||
|
);
|
||||||
|
const isSize = file.size / 1024 / 1024 < 200;
|
||||||
|
if (!isType) {
|
||||||
|
this.$message.error('仅能上传 pdf|xls|xlsx|doc|docx|ppt|pptx 格式文件');
|
||||||
|
}
|
||||||
|
if (!isSize) {
|
||||||
|
this.$message.error('您最大可上传200M文件');
|
||||||
|
}
|
||||||
|
return isType && isSize;
|
||||||
|
},
|
||||||
|
submit() {
|
||||||
|
let flag
|
||||||
|
this.$refs.processFormRef.validate(v => {
|
||||||
|
flag = v
|
||||||
|
return v
|
||||||
|
})
|
||||||
|
return flag
|
||||||
}
|
}
|
||||||
|
},
|
||||||
|
mounted()
|
||||||
|
{
|
||||||
|
this.updateList()
|
||||||
|
this.getAllPerson()
|
||||||
|
}
|
||||||
|
}
|
||||||
</script>
|
</script>
|
||||||
<style lang="scss" scoped>
|
<style lang="scss" scoped>
|
||||||
::v-deep .ti-input {
|
::v-deep .ti-input {
|
||||||
border-radius: 4px;
|
border-radius: 4px;
|
||||||
border: 1px solid #DCDFE6;
|
border: 1px solid #DCDFE6;
|
||||||
min-height: 40px;
|
min-height: 40px;
|
||||||
line-height: 40px;
|
line-height: 40px;
|
||||||
|
|
||||||
.ti-new-tag-input{
|
.ti-new-tag-input {
|
||||||
padding-left: 5px;
|
padding-left: 5px;
|
||||||
|
|
||||||
}
|
}
|
||||||
|
|
||||||
.ti-new-tag-input::placeholder {
|
.ti-new-tag-input::placeholder {
|
||||||
color: #C0C4CC;
|
color: #C0C4CC;
|
||||||
font-size: 14px;
|
font-size: 14px;
|
||||||
}
|
}
|
||||||
|
|
||||||
.ti-new-tag-input:-ms-input-placeholder {
|
.ti-new-tag-input:-ms-input-placeholder {
|
||||||
color: #C0C4CC;
|
color: #C0C4CC;
|
||||||
font-size: 14px;
|
font-size: 14px;
|
||||||
}
|
}
|
||||||
|
|
||||||
.ti-new-tag-input:-moz-placeholder {
|
.ti-new-tag-input:-moz-placeholder {
|
||||||
color: #C0C4CC;
|
color: #C0C4CC;
|
||||||
font-size: 14px;
|
font-size: 14px;
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
::v-deep .vue-tags-input :focus{
|
|
||||||
|
::v-deep .vue-tags-input :focus {
|
||||||
border: 1px solid #1890ff;
|
border: 1px solid #1890ff;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
.user-form {
|
||||||
|
padding-top: 26px;
|
||||||
|
|
||||||
|
.done {
|
||||||
|
text-align: center;
|
||||||
|
padding: 40px 0;
|
||||||
|
|
||||||
|
::v-deep .el-button {
|
||||||
|
width: 80px;
|
||||||
|
height: 36px;
|
||||||
|
padding: 0;
|
||||||
|
}
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
</style>
|
</style>
|
||||||
|
|||||||
@@ -270,7 +270,6 @@ export default {
|
|||||||
// console.log(checkedList)
|
// console.log(checkedList)
|
||||||
const parts = []
|
const parts = []
|
||||||
const partsName = []
|
const partsName = []
|
||||||
console.log(checkedList, '0009999')
|
|
||||||
checkedList.map((item, index) => {
|
checkedList.map((item, index) => {
|
||||||
parts.push(item.userId || item.USID)
|
parts.push(item.userId || item.USID)
|
||||||
partsName.push(item.uname)
|
partsName.push(item.uname)
|
||||||
@@ -304,7 +303,7 @@ export default {
|
|||||||
this.saveLoading = true
|
this.saveLoading = true
|
||||||
|
|
||||||
let submitJson = JSON.stringify({...this.assignForm, userId: this.$store.getters.userInfo.usid,approvalOpinion:this.assignForm.remark})
|
let submitJson = JSON.stringify({...this.assignForm, userId: this.$store.getters.userInfo.usid,approvalOpinion:this.assignForm.remark})
|
||||||
let dataJson = JSON.stringify(this.tableData)
|
let dataJson = JSON.stringify(this.processForm)
|
||||||
let params = {
|
let params = {
|
||||||
prcName: this.processForm.prcName,
|
prcName: this.processForm.prcName,
|
||||||
userId: this.$store.getters.userInfo.usid,
|
userId: this.$store.getters.userInfo.usid,
|
||||||
@@ -335,13 +334,14 @@ export default {
|
|||||||
console.log(this.$store.getters.userInfo.usid, " this.$store.getters.userInfo.USID")
|
console.log(this.$store.getters.userInfo.usid, " this.$store.getters.userInfo.USID")
|
||||||
this.$refs.assignFormRef.validate(async v => {
|
this.$refs.assignFormRef.validate(async v => {
|
||||||
debugger
|
debugger
|
||||||
let z=this.$refs.basMes.submit()
|
this.processForm=this.$refs.basMes.form
|
||||||
|
let z=this.$refs.basMes.submit()
|
||||||
if (v && z) {
|
if (v && z) {
|
||||||
//如果不是第一次
|
//如果不是第一次
|
||||||
if (this.initShow) {
|
if (this.initShow) {
|
||||||
let flag=await this.JuggleSub(this.taskId)
|
let flag=await this.JuggleSub(this.taskId)
|
||||||
if(flag){
|
if(flag){
|
||||||
let dataJson = JSON.stringify(this.tableData)
|
let dataJson = JSON.stringify(this.processForm)
|
||||||
let submitJson = JSON.stringify({...this.assignForm, userId: this.$store.getters.userInfo.usid,approvalOpinion:this.assignForm.remark})
|
let submitJson = JSON.stringify({...this.assignForm, userId: this.$store.getters.userInfo.usid,approvalOpinion:this.assignForm.remark})
|
||||||
this.completeProcess({
|
this.completeProcess({
|
||||||
dataJson,
|
dataJson,
|
||||||
@@ -368,7 +368,7 @@ export default {
|
|||||||
approveData: {
|
approveData: {
|
||||||
...this.processForm, ...this.assignForm,
|
...this.processForm, ...this.assignForm,
|
||||||
userId: this.$store.getters.userInfo.usid
|
userId: this.$store.getters.userInfo.usid
|
||||||
}, dataMsg: this.tableData
|
}, dataMsg: this.processForm
|
||||||
}
|
}
|
||||||
form.approvalOpinion = this.assignForm.remark
|
form.approvalOpinion = this.assignForm.remark
|
||||||
form.prcType = this.prcType
|
form.prcType = this.prcType
|
||||||
|
|||||||
Reference in New Issue
Block a user