Merge remote-tracking branch 'origin/develop' into develop
This commit is contained in:
@@ -1,342 +1,356 @@
|
|||||||
<!-- 配置管理 - 链接管理 -->
|
<!-- 配置管理 - 链接管理 -->
|
||||||
<template>
|
<template>
|
||||||
<div id="post-manage">
|
<div id="post-manage">
|
||||||
<!-- 头部操作按钮-->
|
<!-- 头部操作按钮-->
|
||||||
<div class="action-bar">
|
<div class="action-bar">
|
||||||
<el-button type="primary"
|
<el-button type="primary"
|
||||||
class="common-button-primary add-button"
|
class="common-button-primary add-button"
|
||||||
@click="addLink"
|
@click="addLink"
|
||||||
v-btn-permission="'980cb239683de9e29ee5335cec98e5b4'"
|
v-btn-permission="'980cb239683de9e29ee5335cec98e5b4'"
|
||||||
size="mini">新增</el-button>
|
size="mini">新增</el-button>
|
||||||
<el-button type="primary"
|
<!-- <el-button type="primary"-->
|
||||||
class="common-button-primary add-button"
|
<!-- class="common-button-primary add-button"-->
|
||||||
@click="linkOrder"
|
<!-- @click="linkOrder"-->
|
||||||
v-btn-permission="'779665b2e4bb20fc480cf9372a100f69'"
|
<!-- v-btn-permission="'779665b2e4bb20fc480cf9372a100f69'"-->
|
||||||
size="mini">顺序调整</el-button>
|
<!-- size="mini">顺序调整</el-button>-->
|
||||||
<el-button type="primary"
|
<el-button type="primary"
|
||||||
class="common-button-primary add-button"
|
class="common-button-primary add-button"
|
||||||
@click="deleteAllLink"
|
@click="deleteAllLink"
|
||||||
v-btn-permission="'779665b2e4bb20fc480cf9372a100f69'"
|
v-btn-permission="'779665b2e4bb20fc480cf9372a100f69'"
|
||||||
size="mini">删除</el-button>
|
size="mini">删除</el-button>
|
||||||
</div>
|
</div>
|
||||||
<!-- 表格-->
|
<!-- 表格-->
|
||||||
<div class="content">
|
<div class="content">
|
||||||
<el-table
|
<el-table
|
||||||
:data="linkList"
|
:data="linkList"
|
||||||
tooltip-effect="dark"
|
tooltip-effect="dark"
|
||||||
border
|
border
|
||||||
style="width: 100%; flex: auto;"
|
style="width: 100%; flex: auto;"
|
||||||
class="drag-table"
|
class="drag-table"
|
||||||
height="100%"
|
height="100%"
|
||||||
:header-cell-style="{background: '#E8E8E8', color: '#333333', fontSize: '16px',
|
:header-cell-style="{background: '#E8E8E8', color: '#333333', fontSize: '16px',
|
||||||
fontWeight: 'bold', height: '48px'}"
|
fontWeight: 'bold', height: '48px'}"
|
||||||
@selection-change="handleSelectionChange">
|
@selection-change="handleSelectionChange">
|
||||||
<el-table-column
|
<el-table-column
|
||||||
type="selection"
|
type="selection"
|
||||||
width="55"
|
width="55"
|
||||||
align="center">
|
align="center">
|
||||||
</el-table-column>
|
</el-table-column>
|
||||||
<el-table-column
|
<el-table-column
|
||||||
prop="name"
|
prop="orderBy"
|
||||||
label="链接名称"
|
label="序号"
|
||||||
width="220px">
|
align="center"
|
||||||
</el-table-column>
|
width="50px">
|
||||||
<el-table-column
|
</el-table-column>
|
||||||
prop="url"
|
<el-table-column
|
||||||
label="链接">
|
prop="name"
|
||||||
</el-table-column>
|
label="链接名称"
|
||||||
<!-- <el-table-column-->
|
width="220px">
|
||||||
<!-- prop="orderBy"-->
|
</el-table-column>
|
||||||
<!-- label="序号"-->
|
<el-table-column
|
||||||
<!-- sortable-->
|
prop="url"
|
||||||
<!-- width="170px">-->
|
label="链接">
|
||||||
<!-- </el-table-column>-->
|
</el-table-column>
|
||||||
<el-table-column
|
<el-table-column
|
||||||
label="操作"
|
label="操作"
|
||||||
width="50px">
|
width="50px">
|
||||||
<template slot-scope="scope">
|
<template slot-scope="scope">
|
||||||
<div @click.stop style="display: inline-block">
|
<div @click.stop style="display: inline-block">
|
||||||
<el-dropdown trigger="click" @command="handleCommand">
|
<el-dropdown trigger="click" @command="handleCommand">
|
||||||
<i class="iconfont"></i>
|
<i class="iconfont"></i>
|
||||||
<el-dropdown-menu slot="dropdown">
|
<el-dropdown-menu slot="dropdown">
|
||||||
<el-dropdown-item v-btn-permission="'0fbb849e244e07433a90180fb314ad10'" :command="[scope.row, '删除']">删除</el-dropdown-item>
|
<el-dropdown-item v-btn-permission="'0fbb849e244e07433a90180fb314ad10'" :command="[scope.row, '删除']">删除</el-dropdown-item>
|
||||||
<el-dropdown-item v-btn-permission="'fa0846d977aeef07e9cb7faf648f8f7f'" :command="[scope.row, '编辑']">编辑</el-dropdown-item>
|
<el-dropdown-item v-btn-permission="'fa0846d977aeef07e9cb7faf648f8f7f'" :command="[scope.row, '编辑']">编辑</el-dropdown-item>
|
||||||
</el-dropdown-menu>
|
</el-dropdown-menu>
|
||||||
</el-dropdown>
|
</el-dropdown>
|
||||||
</div>
|
</div>
|
||||||
</template>
|
</template>
|
||||||
</el-table-column>
|
</el-table-column>
|
||||||
</el-table>
|
</el-table>
|
||||||
</div>
|
</div>
|
||||||
<loading :loading="Loading">加载中...</loading>
|
<loading :loading="Loading">加载中...</loading>
|
||||||
<!-- 新增链接弹窗-->
|
<!-- 新增链接弹窗-->
|
||||||
<el-dialog
|
<el-dialog
|
||||||
:title="dialogTitle"
|
:title="dialogTitle"
|
||||||
:visible.sync="modalshowflag"
|
:visible.sync="modalshowflag"
|
||||||
:wrapperClosable="false"
|
:wrapperClosable="false"
|
||||||
size="800px"
|
size="800px"
|
||||||
@close="resetForm"
|
@close="resetForm"
|
||||||
>
|
>
|
||||||
<el-form
|
<el-form
|
||||||
ref="sarStandardsInfoForm"
|
ref="sarStandardsInfoForm"
|
||||||
:model="sarStandardsInfoEO"
|
:model="sarStandardsInfoEO"
|
||||||
:rules="sarStandardsInfoRules"
|
:rules="sarStandardsInfoRules"
|
||||||
class="label-input-form"
|
class="label-input-form"
|
||||||
>
|
>
|
||||||
<el-form-item label="链接名称" prop="name" label-width="150px" class="add-form-item">
|
<el-form-item label="链接名称" prop="name" label-width="150px" class="add-form-item">
|
||||||
<el-input v-model="sarStandardsInfoEO.name"
|
<el-input v-model="sarStandardsInfoEO.name"
|
||||||
placeholder="请输入链接名称"
|
placeholder="请输入链接名称"
|
||||||
clearable></el-input>
|
clearable></el-input>
|
||||||
</el-form-item>
|
</el-form-item>
|
||||||
<el-form-item label="链接" prop="url" label-width="150px" class="add-form-item">
|
<el-form-item label="链接" prop="url" label-width="150px" class="add-form-item">
|
||||||
<el-input v-model="sarStandardsInfoEO.url"
|
<el-input v-model="sarStandardsInfoEO.url"
|
||||||
placeholder="请输入链接"
|
placeholder="请输入链接"
|
||||||
clearable></el-input>
|
clearable></el-input>
|
||||||
</el-form-item>
|
</el-form-item>
|
||||||
</el-form>
|
</el-form>
|
||||||
<span slot="footer" class="demo-drawer-footer">
|
<span slot="footer" class="demo-drawer-footer">
|
||||||
<el-button class="common-button-default" size="mini" icon="el-icon-close" @click="resetForm">取消</el-button>
|
<el-button class="common-button-default" size="mini" icon="el-icon-close" @click="resetForm">取消</el-button>
|
||||||
<el-button type="primary" size="mini" class="common-button-primary" icon="el-icon-check" @click="submit">确定</el-button>
|
<el-button type="primary" size="mini" class="common-button-primary" icon="el-icon-check" @click="submit">确定</el-button>
|
||||||
</span>
|
</span>
|
||||||
</el-dialog>
|
</el-dialog>
|
||||||
</div>
|
</div>
|
||||||
</template>
|
</template>
|
||||||
|
|
||||||
<script>
|
<script>
|
||||||
import Sortable from 'sortablejs'
|
import Sortable from 'sortablejs'
|
||||||
export default {
|
export default {
|
||||||
name: "linkManage",
|
name: "linkManage",
|
||||||
data () {
|
data () {
|
||||||
return {
|
return {
|
||||||
editId: '',
|
editId: '',
|
||||||
type: '', // 1为新增 2为编辑
|
type: '', // 1为新增 2为编辑
|
||||||
dialogTitle: '',
|
dialogTitle: '',
|
||||||
submitLoading: false,
|
submitLoading: false,
|
||||||
// 向后台传参使用
|
// 向后台传参使用
|
||||||
data: [],
|
data: [],
|
||||||
Loading: false,
|
Loading: false,
|
||||||
modalshowflag: false,
|
modalshowflag: false,
|
||||||
// 排序
|
// 排序
|
||||||
order:[],
|
order:[],
|
||||||
// 表格选取的
|
// 表格选取的
|
||||||
selectList:[],
|
selectList:[],
|
||||||
selectId:[],
|
selectId:[],
|
||||||
ids:'',
|
ids:'',
|
||||||
// 向后台传参使用
|
// 向后台传参使用
|
||||||
sarStandardsInfoEO: {
|
sarStandardsInfoEO: {
|
||||||
name: '',
|
name: '',
|
||||||
url: '',
|
url: '',
|
||||||
// sortId: ''
|
// sortId: ''
|
||||||
},
|
},
|
||||||
//新增链接未输入时提示
|
//新增链接未输入时提示
|
||||||
sarStandardsInfoRules: {
|
sarStandardsInfoRules: {
|
||||||
name: [
|
name: [
|
||||||
{ required: true, message: '请输入链接名称', trigger: 'blur' }
|
{ required: true, message: '请输入链接名称', trigger: 'blur' }
|
||||||
],
|
],
|
||||||
url: [
|
url: [
|
||||||
{ required: true, message: '请输入链接', trigger: 'blur' }
|
{ required: true, message: '请输入链接', trigger: 'blur' }
|
||||||
]
|
]
|
||||||
},
|
},
|
||||||
|
|
||||||
modalRole: false,
|
modalRole: false,
|
||||||
props: {
|
props: {
|
||||||
label: 'name',
|
label: 'name',
|
||||||
children: 'children'
|
children: 'children'
|
||||||
},
|
},
|
||||||
|
|
||||||
linkList: [],
|
linkList: [],
|
||||||
sortData: [],
|
sortData: [],
|
||||||
}
|
|
||||||
},
|
|
||||||
methods: {
|
|
||||||
//头部新增按钮
|
|
||||||
addLink () {
|
|
||||||
this.type = 1
|
|
||||||
this.dialogTitle = '新增链接'
|
|
||||||
this.modalshowflag = true
|
|
||||||
},
|
|
||||||
|
|
||||||
//头部顺序调整按钮
|
|
||||||
linkOrder () {
|
|
||||||
this.order=[]
|
|
||||||
for (var i=0;i<this.linkList.length;i++){
|
|
||||||
this.order.push({
|
|
||||||
urlId:this.linkList[i].id,
|
|
||||||
sortId:this.linkList[i].sortId
|
|
||||||
})
|
|
||||||
}
|
|
||||||
this.$http.postData('sarUrl/tsUrl/order',this.order, {}, res => {
|
|
||||||
if (res.ok) {
|
|
||||||
}else {
|
|
||||||
this.$message.warning(res.message)
|
|
||||||
}
|
|
||||||
})
|
|
||||||
},
|
|
||||||
|
|
||||||
//头部删除按钮
|
|
||||||
deleteAllLink() {
|
|
||||||
this.selectId=[]
|
|
||||||
for (var i=0;i<this.selectList.length;i++){
|
|
||||||
this.selectId.push(this.selectList[i].id)
|
|
||||||
}
|
|
||||||
this.ids=this.selectId.join(",")
|
|
||||||
if (this.selectList.length === 0) {
|
|
||||||
this.$message.warning('请选择要删除的链接')
|
|
||||||
} else {
|
|
||||||
this.modalRole = true
|
|
||||||
// this.nodeList = this.selectList[0].idList
|
|
||||||
this.$http.delete('sarUrl/tsUrl/deleteBatch', {
|
|
||||||
ids: this.ids
|
|
||||||
}, {}, res => {
|
|
||||||
if (res.ok) {
|
|
||||||
this.$message.success('删除成功')
|
|
||||||
this.getLink()
|
|
||||||
}else {
|
|
||||||
this.$message.warning(res.message)
|
|
||||||
}
|
}
|
||||||
})
|
},
|
||||||
}
|
methods: {
|
||||||
},
|
//头部新增按钮
|
||||||
|
addLink () {
|
||||||
//弹窗关闭操作
|
this.type = 1
|
||||||
resetForm () {
|
this.dialogTitle = '新增链接'
|
||||||
this.$refs['sarStandardsInfoForm'].resetFields();
|
this.modalshowflag = true
|
||||||
this.modalshowflag = false
|
},
|
||||||
},
|
//表格中操作列删除操作弹窗
|
||||||
|
deleteLink (row) {
|
||||||
//弹窗确认操作
|
this.$http.delete('sarUrl/tsUrl/delete', {
|
||||||
submit () {
|
id: row.id
|
||||||
this.$refs['sarStandardsInfoForm'].validate((valid) => {
|
}, {
|
||||||
if (valid) {
|
_this: this,
|
||||||
if (this.type === 1) {
|
loading: 'Loading'
|
||||||
this.$http.postData('/sarUrl/tsUrl/add', {
|
}, res => {
|
||||||
...this.sarStandardsInfoEO,
|
if (res.ok) {
|
||||||
}, {
|
this.$message.success('删除成功')
|
||||||
_this: this,
|
let arr = []
|
||||||
loading: 'Loading'
|
for (let a = 0; a < this.linkList.length; a++) {
|
||||||
}, res=> {
|
if (this.linkList[a].id === row.id) {
|
||||||
if (res.ok) {
|
this.linkList.splice(a, 1)
|
||||||
this.$message.success('新增成功')
|
}
|
||||||
this.modalshowflag = false
|
}
|
||||||
this.getLink()
|
this.linkList.forEach((item, index) => {
|
||||||
} else {
|
let json = {}
|
||||||
this.$message.warning(res.message)
|
json.id = item.id
|
||||||
|
json.orderBy = index + 1
|
||||||
|
arr.push(json)
|
||||||
|
})
|
||||||
|
this.$http.putData('sarUrl/tsUrl/updateOrder', JSON.stringify(arr), {}, res => {
|
||||||
|
this.getLink()
|
||||||
|
})
|
||||||
|
}else {
|
||||||
|
this.$message.warning(res.message)
|
||||||
|
}
|
||||||
|
})
|
||||||
|
},
|
||||||
|
//头部删除按钮
|
||||||
|
deleteAllLink() {
|
||||||
|
this.selectId=[]
|
||||||
|
for (var i=0;i<this.selectList.length;i++){
|
||||||
|
this.selectId.push(this.selectList[i].id)
|
||||||
}
|
}
|
||||||
})
|
this.ids = this.selectId.join(",")
|
||||||
} else {
|
if (this.selectList.length === 0) {
|
||||||
// 编辑
|
this.$message.warning('请选择要删除的链接')
|
||||||
this.$http.putData('/sarUrl/tsUrl/edit', {
|
|
||||||
id: this.editId,
|
|
||||||
name: this.sarStandardsInfoEO.name,
|
|
||||||
url: this.sarStandardsInfoEO.url,
|
|
||||||
}, {
|
|
||||||
_this: this,
|
|
||||||
loading: 'Loading'
|
|
||||||
}, res=> {
|
|
||||||
if (res.ok) {
|
|
||||||
this.$message.success('修改成功')
|
|
||||||
this.modalshowflag = false
|
|
||||||
this.getLink()
|
|
||||||
} else {
|
} else {
|
||||||
this.$message.warning(res.message)
|
this.modalRole = true
|
||||||
}
|
this.$http.delete('sarUrl/tsUrl/deleteBatch', {
|
||||||
})
|
ids: this.ids
|
||||||
}
|
}, {}, res => {
|
||||||
} else {
|
if (res.ok) {
|
||||||
return false;
|
this.$message.success('删除成功')
|
||||||
}
|
let arr = this.linkList.filter(items => {
|
||||||
});
|
if (!this.ids.includes(items.id)) return items;
|
||||||
},
|
})
|
||||||
|
let newArr = []
|
||||||
//表格中操作列
|
arr.forEach((item, index) => {
|
||||||
handleCommand (command) {
|
let json = {}
|
||||||
switch (command[1]) {
|
json.id = item.id
|
||||||
case '删除':
|
json.orderBy = index + 1
|
||||||
this.deleteLink(command[0])
|
newArr.push(json)
|
||||||
break
|
})
|
||||||
case '编辑':
|
this.$http.putData('sarUrl/tsUrl/updateOrder', JSON.stringify(newArr), {}, res => {
|
||||||
this.editLink(command[0])
|
this.getLink()
|
||||||
break
|
})
|
||||||
}
|
}else {
|
||||||
},
|
this.$message.warning(res.message)
|
||||||
|
}
|
||||||
//表格中操作列删除操作弹窗
|
|
||||||
deleteLink (row) {
|
|
||||||
this.$http.delete('sarUrl/tsUrl/delete', {
|
|
||||||
id: row.id
|
|
||||||
}, {
|
|
||||||
_this: this,
|
|
||||||
loading: 'Loading'
|
|
||||||
}, res => {
|
|
||||||
if (res.ok) {
|
|
||||||
this.$message.success('删除成功')
|
|
||||||
this.getLink()
|
|
||||||
}else {
|
|
||||||
this.$message.warning(res.message)
|
|
||||||
}
|
|
||||||
})
|
|
||||||
},
|
|
||||||
|
|
||||||
//表格中操作列编辑操作弹窗
|
|
||||||
editLink (row) {
|
|
||||||
this.type = 2
|
|
||||||
this.editId = row.id
|
|
||||||
this.sarStandardsInfoEO.name = row.name
|
|
||||||
this.sarStandardsInfoEO.url = row.url
|
|
||||||
this.sarStandardsInfoEO.sortId = row.sortId
|
|
||||||
this.dialogTitle = '修改链接'
|
|
||||||
this.modalshowflag = true
|
|
||||||
},
|
|
||||||
|
|
||||||
//多选框选择
|
|
||||||
handleSelectionChange (val) {
|
|
||||||
this.selectList = val
|
|
||||||
},
|
|
||||||
|
|
||||||
// 获取链接数据
|
|
||||||
getLink () {
|
|
||||||
this.$http.get('sarUrl/tsUrl', {
|
|
||||||
}, {
|
|
||||||
_this: this,
|
|
||||||
loading: 'Loading'
|
|
||||||
}, res=> {
|
|
||||||
this.linkList = res.data
|
|
||||||
this.initSortable()
|
|
||||||
})
|
|
||||||
},
|
|
||||||
initSortable () {
|
|
||||||
this.sortData = [...this.linkList]
|
|
||||||
const el = document.querySelector('.el-table__body-wrapper tbody')
|
|
||||||
//创建拖拽对象
|
|
||||||
this.sortable = Sortable.create(el, {
|
|
||||||
sort: true, //是否可进行拖拽排序
|
|
||||||
animation: 150,
|
|
||||||
onEnd: ({newIndex, oldIndex}) => {
|
|
||||||
const val = this.sortData[oldIndex]
|
|
||||||
this.sortData.splice(oldIndex, 1)
|
|
||||||
this.sortData.splice(newIndex, 0, val)
|
|
||||||
this.sortData.forEach((item, index) => {
|
|
||||||
item.orderBy = index + 1
|
|
||||||
})
|
})
|
||||||
}
|
}
|
||||||
})
|
},
|
||||||
|
//弹窗关闭操作
|
||||||
|
resetForm () {
|
||||||
|
this.$refs['sarStandardsInfoForm'].resetFields();
|
||||||
|
this.modalshowflag = false
|
||||||
|
},
|
||||||
|
//弹窗确认操作
|
||||||
|
submit () {
|
||||||
|
this.$refs['sarStandardsInfoForm'].validate((valid) => {
|
||||||
|
if (valid) {
|
||||||
|
if (this.type === 1) {
|
||||||
|
this.$http.postData('/sarUrl/tsUrl/add', {
|
||||||
|
...this.sarStandardsInfoEO,
|
||||||
|
}, {
|
||||||
|
_this: this,
|
||||||
|
loading: 'Loading'
|
||||||
|
}, res=> {
|
||||||
|
if (res.ok) {
|
||||||
|
this.$message.success('新增成功')
|
||||||
|
this.modalshowflag = false
|
||||||
|
this.getLink()
|
||||||
|
} else {
|
||||||
|
this.$message.warning(res.message)
|
||||||
|
}
|
||||||
|
})
|
||||||
|
} else {
|
||||||
|
// 编辑
|
||||||
|
this.$http.putData('/sarUrl/tsUrl/edit', {
|
||||||
|
id: this.editId,
|
||||||
|
name: this.sarStandardsInfoEO.name,
|
||||||
|
url: this.sarStandardsInfoEO.url,
|
||||||
|
}, {
|
||||||
|
_this: this,
|
||||||
|
loading: 'Loading'
|
||||||
|
}, res=> {
|
||||||
|
if (res.ok) {
|
||||||
|
this.$message.success('修改成功')
|
||||||
|
this.modalshowflag = false
|
||||||
|
this.getLink()
|
||||||
|
} else {
|
||||||
|
this.$message.warning(res.message)
|
||||||
|
}
|
||||||
|
})
|
||||||
|
}
|
||||||
|
} else {
|
||||||
|
return false;
|
||||||
|
}
|
||||||
|
});
|
||||||
|
},
|
||||||
|
//表格中操作列
|
||||||
|
handleCommand (command) {
|
||||||
|
switch (command[1]) {
|
||||||
|
case '删除':
|
||||||
|
this.deleteLink(command[0])
|
||||||
|
break
|
||||||
|
case '编辑':
|
||||||
|
this.editLink(command[0])
|
||||||
|
break
|
||||||
|
}
|
||||||
|
},
|
||||||
|
//表格中操作列编辑操作弹窗
|
||||||
|
editLink (row) {
|
||||||
|
this.type = 2
|
||||||
|
this.editId = row.id
|
||||||
|
this.sarStandardsInfoEO.name = row.name
|
||||||
|
this.sarStandardsInfoEO.url = row.url
|
||||||
|
this.sarStandardsInfoEO.sortId = row.sortId
|
||||||
|
this.dialogTitle = '修改链接'
|
||||||
|
this.modalshowflag = true
|
||||||
|
},
|
||||||
|
//多选框选择
|
||||||
|
handleSelectionChange (val) {
|
||||||
|
this.selectList = val
|
||||||
|
},
|
||||||
|
// 获取链接数据
|
||||||
|
getLink () {
|
||||||
|
this.$http.get('sarUrl/tsUrl', {
|
||||||
|
}, {
|
||||||
|
_this: this,
|
||||||
|
loading: 'Loading'
|
||||||
|
}, res=> {
|
||||||
|
this.linkList = res.data
|
||||||
|
this.initSortable()
|
||||||
|
})
|
||||||
|
},
|
||||||
|
initSortable () {
|
||||||
|
this.sortData = [...this.linkList]
|
||||||
|
const el = document.querySelector('.el-table__body-wrapper tbody')
|
||||||
|
//创建拖拽对象
|
||||||
|
this.sortable = Sortable.create(el, {
|
||||||
|
sort: true, //是否可进行拖拽排序
|
||||||
|
animation: 150,
|
||||||
|
onEnd: ({newIndex, oldIndex}) => {
|
||||||
|
const val = this.sortData[oldIndex]
|
||||||
|
this.sortData.splice(oldIndex, 1)
|
||||||
|
this.sortData.splice(newIndex, 0, val)
|
||||||
|
this.sortData.forEach((item, index) => {
|
||||||
|
item.orderBy = index + 1
|
||||||
|
})
|
||||||
|
let arr = []
|
||||||
|
this.sortData.forEach(item => {
|
||||||
|
let json = {}
|
||||||
|
json.id = item.id
|
||||||
|
json.orderBy = item.orderBy
|
||||||
|
arr.push(json)
|
||||||
|
})
|
||||||
|
this.$http.putData('sarUrl/tsUrl/updateOrder', JSON.stringify(arr), {}, res => {
|
||||||
|
if (res.ok) {
|
||||||
|
this.$message.success('保存成功')
|
||||||
|
} else {
|
||||||
|
this.$message.warning('保存失败!')
|
||||||
|
}
|
||||||
|
})
|
||||||
|
}
|
||||||
|
})
|
||||||
|
},
|
||||||
},
|
},
|
||||||
},
|
mounted() {
|
||||||
mounted() {
|
this.getLink();
|
||||||
this.getLink();
|
}
|
||||||
}
|
}
|
||||||
}
|
|
||||||
</script>
|
</script>
|
||||||
|
|
||||||
<style lang="less" scoped>
|
<style lang="less" scoped>
|
||||||
@import '~@/assets/styles/mixins';
|
@import '~@/assets/styles/mixins';
|
||||||
#post-manage {
|
#post-manage {
|
||||||
height: 100%;
|
height: 100%;
|
||||||
.content {
|
.content {
|
||||||
height: calc(~'100% - 53px')
|
height: calc(~'100% - 53px')
|
||||||
|
}
|
||||||
|
.filter-tree {
|
||||||
|
height: calc(~'100% - 50px')
|
||||||
|
}
|
||||||
}
|
}
|
||||||
.filter-tree {
|
|
||||||
height: calc(~'100% - 50px')
|
|
||||||
}
|
|
||||||
}
|
|
||||||
</style>
|
</style>
|
||||||
|
|||||||
File diff suppressed because it is too large
Load Diff
@@ -336,34 +336,13 @@
|
|||||||
>
|
>
|
||||||
</ProcessFooter>
|
</ProcessFooter>
|
||||||
<!-- 选择责任人-->
|
<!-- 选择责任人-->
|
||||||
<el-drawer
|
<Role-tree
|
||||||
:title="drawerTitle"
|
check-box
|
||||||
:visible.sync="modalshowflag"
|
:is-title="drawerTitle"
|
||||||
:wrapperClosable="false"
|
:is-visible.sync="modalshowflag"
|
||||||
size="800px">
|
@checkedRole="checkedRole"
|
||||||
<el-tree
|
:nodeList="nodeList"
|
||||||
v-if="modalshowflag"
|
></Role-tree>
|
||||||
style="height: 100%; overflow: auto;"
|
|
||||||
node-key="id"
|
|
||||||
class="filter-tree"
|
|
||||||
:data="treeData"
|
|
||||||
:props="defaultProps"
|
|
||||||
:default-checked-keys="nodeList"
|
|
||||||
highlight-current
|
|
||||||
check-strictly
|
|
||||||
@check="drawerCheck"
|
|
||||||
default-expand-all
|
|
||||||
:expand-on-click-node="false"
|
|
||||||
show-checkbox
|
|
||||||
ref="tree">
|
|
||||||
</el-tree>
|
|
||||||
<div id="roleFormButton" class="demo-drawer-footer">
|
|
||||||
<el-button class="common-button-primary" size="mini" icon="el-icon-check" type="primary" @click="saveUserInfo">
|
|
||||||
确定
|
|
||||||
</el-button>
|
|
||||||
<el-button class="common-button-default" size="mini" icon="el-icon-close" @click="cancleUserInfo">取消</el-button>
|
|
||||||
</div>
|
|
||||||
</el-drawer>
|
|
||||||
</div>
|
</div>
|
||||||
</template>
|
</template>
|
||||||
|
|
||||||
@@ -507,25 +486,25 @@ export default {
|
|||||||
};
|
};
|
||||||
},
|
},
|
||||||
methods: {
|
methods: {
|
||||||
saveUserInfo() {
|
checkedRole(data) {
|
||||||
if (this.type === "dockUser") {
|
if (this.type === "dockUser") {
|
||||||
this.roleForm.dockUser = this.roleRow.id;
|
this.roleForm.dockUser = data[0].id;
|
||||||
this.roleForm.dockUserName = this.roleRow.name;
|
this.roleForm.dockUserName = data[0].name;
|
||||||
} else if (this.type === "ministerUser") {
|
} else if (this.type === "ministerUser") {
|
||||||
this.roleForm.ministerUser = this.roleRow.id;
|
this.roleForm.ministerUser = data[0].id;
|
||||||
this.roleForm.ministerUserName = this.roleRow.name;
|
this.roleForm.ministerUserName = data[0].name;
|
||||||
} else if (this.type === "qualityEngineer") {
|
} else if (this.type === "qualityEngineer") {
|
||||||
this.roleForm.qualityEngineer = this.roleRow.id;
|
this.roleForm.qualityEngineer = data[0].id;
|
||||||
this.roleForm.qualityEngineerName = this.roleRow.name;
|
this.roleForm.qualityEngineerName = data[0].name;
|
||||||
this.listForm.qualityEngineer = this.roleForm.qualityEngineer;
|
this.listForm.qualityEngineer = this.roleForm.qualityEngineer;
|
||||||
this.listForm.qualityEngineerName = this.roleForm.qualityEngineerName;
|
this.listForm.qualityEngineerName = this.roleForm.qualityEngineerName;
|
||||||
} else if (this.type === "certifiedEngineer") {
|
} else if (this.type === "certifiedEngineer") {
|
||||||
this.roleForm.certifiedEngineer = this.roleRow.id;
|
this.roleForm.certifiedEngineer = data[0].id;
|
||||||
this.roleForm.certifiedEngineerName = this.roleRow.name;
|
this.roleForm.certifiedEngineerName = data[0].name;
|
||||||
this.listForm.certifiedEngineer = this.roleForm.certifiedEngineer;
|
this.listForm.certifiedEngineer = this.roleForm.certifiedEngineer;
|
||||||
this.listForm.certifiedEngineerName = this.roleForm.certifiedEngineerName;
|
this.listForm.certifiedEngineerName = this.roleForm.certifiedEngineerName;
|
||||||
} else if (this.type === "distributePerson") {
|
} else if (this.type === "distributePerson") {
|
||||||
this.listForm.distributePerson = this.roleRow.name;
|
this.listForm.distributePerson = data[0].name;
|
||||||
this.listForm.dataList[this.dsadadadsada].distributePersonId=this.roleRow.id
|
this.listForm.dataList[this.dsadadadsada].distributePersonId=this.roleRow.id
|
||||||
this.listForm.dataList[this.dsadadadsada].distributePerson=this.roleRow.name
|
this.listForm.dataList[this.dsadadadsada].distributePerson=this.roleRow.name
|
||||||
this.showColumn = false;
|
this.showColumn = false;
|
||||||
|
|||||||
@@ -51,8 +51,6 @@
|
|||||||
row-key= "id"
|
row-key= "id"
|
||||||
height="70%"
|
height="70%"
|
||||||
border
|
border
|
||||||
lazy
|
|
||||||
:load="load"
|
|
||||||
@selection-change="selectStandChange"
|
@selection-change="selectStandChange"
|
||||||
:header-cell-style="{background: '#e8e8e8', color: '#333333', fontSize: '16px',
|
:header-cell-style="{background: '#e8e8e8', color: '#333333', fontSize: '16px',
|
||||||
fontWeight: 'bold', height: '48px'}"
|
fontWeight: 'bold', height: '48px'}"
|
||||||
@@ -224,13 +222,6 @@ export default {
|
|||||||
};
|
};
|
||||||
},
|
},
|
||||||
methods: {
|
methods: {
|
||||||
load(tree, treeNode, resolve) {
|
|
||||||
setTimeout(() => {
|
|
||||||
resolve(
|
|
||||||
this.listForm.children
|
|
||||||
)
|
|
||||||
}, 1000)
|
|
||||||
},
|
|
||||||
processTable() {
|
processTable() {
|
||||||
this.$http.get("lawss/activiti/get_list_by_instance", {
|
this.$http.get("lawss/activiti/get_list_by_instance", {
|
||||||
prcNum: this.$route.query.prcNum,
|
prcNum: this.$route.query.prcNum,
|
||||||
@@ -266,32 +257,50 @@ export default {
|
|||||||
},
|
},
|
||||||
//动态表单读取
|
//动态表单读取
|
||||||
getFormFieldList(item) {
|
getFormFieldList(item) {
|
||||||
this.$nextTick(() => {
|
const listForm = JSON.parse(JSON.stringify(item));
|
||||||
this.listForm = JSON.parse(JSON.stringify(item));
|
const { breakdownList, dataList } = listForm
|
||||||
item.dataList.forEach(item => {
|
listForm.prcNum = this.prcNum;
|
||||||
item.hasChildren = true
|
listForm.prcName = this.prcName;
|
||||||
})
|
this.listForm = listForm
|
||||||
this.listForm.prcNum = this.prcNum;
|
listForm["id"] = item.id;
|
||||||
this.listForm.prcName = this.prcName;
|
listForm.dataList = item.dataList;
|
||||||
this.listForm["id"] = item.id;
|
dataList.forEach(stand => {
|
||||||
this.listForm.dataList = item.dataList;
|
stand.hasChildren = true
|
||||||
this.dataList = item.dataList;
|
console.log(stand);
|
||||||
this.dataList.distributePerson = item.dataList[0].distributePerson;
|
const children = []
|
||||||
this.listForm.breakdownList = item.breakdownList;
|
breakdownList.forEach(childItem => {
|
||||||
this.listForm.children = item.breakdownList;
|
if (stand.standId === childItem.standId) {
|
||||||
let children = []
|
const childItemData = {
|
||||||
item.breakdownList.forEach(
|
id: childItem.id,
|
||||||
item=>{
|
standId: '条款号: '+ childItem.itemsNum,
|
||||||
let aa = {
|
standName: '条款名称: '+ childItem.itemsName
|
||||||
id:item.id,
|
|
||||||
standId:'条款号: '+ item.itemsNum,
|
|
||||||
standName:'条款名称: '+ item.itemsName,
|
|
||||||
}
|
}
|
||||||
children.push(aa)
|
children.push(childItemData)
|
||||||
}
|
}
|
||||||
)
|
})
|
||||||
this.listForm.children = children;
|
if (children.length) {
|
||||||
});
|
stand.children = children
|
||||||
|
stand.hasChildren = true
|
||||||
|
}
|
||||||
|
})
|
||||||
|
|
||||||
|
// dataList.distributePerson = item.dataList[0].distributePerson;
|
||||||
|
// listForm.breakdownList = item.breakdownList;
|
||||||
|
// listForm.children = item.breakdownList;
|
||||||
|
// let children = []
|
||||||
|
// item.breakdownList.forEach(
|
||||||
|
// item=>{
|
||||||
|
// let aa = {
|
||||||
|
// id:item.id,
|
||||||
|
// standId:'条款号: '+ item.itemsNum,
|
||||||
|
// standName:'条款名称: '+ item.itemsName,
|
||||||
|
// }
|
||||||
|
// children.push(aa)
|
||||||
|
// }
|
||||||
|
// )
|
||||||
|
// this.listForm.children = children;
|
||||||
|
this.dataList = dataList
|
||||||
|
console.log(this.dataList)
|
||||||
},
|
},
|
||||||
//保存事件
|
//保存事件
|
||||||
handleSave() {
|
handleSave() {
|
||||||
@@ -377,7 +386,8 @@ export default {
|
|||||||
return this.processType === 1 ? "暂无待办流程" : "暂无已办流程";
|
return this.processType === 1 ? "暂无待办流程" : "暂无已办流程";
|
||||||
}
|
}
|
||||||
},
|
},
|
||||||
mounted() {
|
async mounted() {
|
||||||
|
// const res = await xx()
|
||||||
this.processTable();
|
this.processTable();
|
||||||
this.getData();
|
this.getData();
|
||||||
this.getTree();
|
this.getTree();
|
||||||
|
|||||||
@@ -1,13 +1,586 @@
|
|||||||
<template>
|
<template>
|
||||||
|
<div class="xmpg-step3">
|
||||||
|
<ProcessHeader toggle>
|
||||||
|
<template slot="proName">项目合规评估流程-项目</template>
|
||||||
|
<template slot="proNode">责任人填写评估反馈</template>
|
||||||
|
</ProcessHeader>
|
||||||
|
<div class="headerTabs">
|
||||||
|
<div class="headerTabsItem" :class="active === '1' ? 'active' : ''" @click="handleTabs('1')">基础信息</div>
|
||||||
|
<div class="headerTabsItem" :class="active === '3' ? 'active' : ''" @click="handleTabs('3')">审批历史</div>
|
||||||
|
</div>
|
||||||
|
<div class="content" v-show="active === '1'">
|
||||||
|
<div style="flex: auto; overflow: auto">
|
||||||
|
<process-title>
|
||||||
|
<template slot="title">基础信息</template>
|
||||||
|
</process-title>
|
||||||
|
<el-form
|
||||||
|
:model="listForm"
|
||||||
|
class="label-input-form prc-content-border"
|
||||||
|
label-width="150px"
|
||||||
|
>
|
||||||
|
<el-row :gutter="24">
|
||||||
|
<el-col :span="24">
|
||||||
|
<el-form-item label="项目编号" prop="projectNumber" class="add-form-item form-item-disabled">
|
||||||
|
<el-input
|
||||||
|
v-model="listForm.projectNumber"
|
||||||
|
placeholder="请输入项目编号"
|
||||||
|
clearable
|
||||||
|
></el-input>
|
||||||
|
</el-form-item>
|
||||||
|
<el-form-item label="项目名称" prop="projectName" class="add-form-item form-item-disabled">
|
||||||
|
<el-input
|
||||||
|
v-model="listForm.projectName"
|
||||||
|
placeholder="请输入项目名称"
|
||||||
|
clearable
|
||||||
|
></el-input>
|
||||||
|
</el-form-item>
|
||||||
|
</el-col>
|
||||||
|
</el-row>
|
||||||
|
</el-form>
|
||||||
|
<process-title>
|
||||||
|
<template slot="title">填写信息</template>
|
||||||
|
</process-title>
|
||||||
|
<el-table
|
||||||
|
:data="dataList"
|
||||||
|
border
|
||||||
|
ref="selection"
|
||||||
|
height="70%"
|
||||||
|
style="width: 100%; border:1px solid #ccc"
|
||||||
|
@selection-change="selectStandChange"
|
||||||
|
:header-cell-style="{background: '#e8e8e8', color: '#333333', fontSize: '16px',
|
||||||
|
fontWeight: 'bold', height: '48px'}">
|
||||||
|
<el-table-column
|
||||||
|
type="selection"
|
||||||
|
width="55"
|
||||||
|
align="center">
|
||||||
|
</el-table-column>
|
||||||
|
<el-table-column
|
||||||
|
prop="standId"
|
||||||
|
align="center"
|
||||||
|
width="200"
|
||||||
|
label="标准编号">
|
||||||
|
</el-table-column>
|
||||||
|
<el-table-column
|
||||||
|
prop="standName"
|
||||||
|
align="center"
|
||||||
|
width="200"
|
||||||
|
label="标准名称">
|
||||||
|
</el-table-column>
|
||||||
|
<el-table-column
|
||||||
|
prop="itemNum"
|
||||||
|
align="center"
|
||||||
|
width="200"
|
||||||
|
label="条款号">
|
||||||
|
</el-table-column>
|
||||||
|
<el-table-column
|
||||||
|
prop="itemsName"
|
||||||
|
width="200"
|
||||||
|
align="center"
|
||||||
|
label="条款名称">
|
||||||
|
</el-table-column>
|
||||||
|
<el-table-column
|
||||||
|
prop="xCXSSRQ"
|
||||||
|
width="200"
|
||||||
|
align="center"
|
||||||
|
label="新车型实施日期">
|
||||||
|
<template slot-scope="scope">
|
||||||
|
<span>{{ scope.row.xCXSSRQ ? $moment(scope.row.xCXSSRQ).format("YYYY-MM-DD") : "" }}</span>
|
||||||
|
</template>
|
||||||
|
</el-table-column>
|
||||||
|
<el-table-column
|
||||||
|
prop="zCCSSRQ"
|
||||||
|
width="200"
|
||||||
|
align="center"
|
||||||
|
label="在产车实施日期">
|
||||||
|
<template slot-scope="scope">
|
||||||
|
<span>{{ scope.row.zCCSSRQ ? $moment(scope.row.zCCSSRQ).format("YYYY-MM-DD") : "" }}</span>
|
||||||
|
</template>
|
||||||
|
</el-table-column>
|
||||||
|
<el-table-column
|
||||||
|
prop="productType"
|
||||||
|
align="center"
|
||||||
|
label="在研产品">
|
||||||
|
<el-table-column
|
||||||
|
prop="researchCompliance"
|
||||||
|
align="center"
|
||||||
|
width="160"
|
||||||
|
label="合规">
|
||||||
|
<template slot-scope="scope">
|
||||||
|
<el-input
|
||||||
|
v-model="dataList[scope.$index].complianceReasons"
|
||||||
|
placeholder="请输入合规原因"
|
||||||
|
>
|
||||||
|
</el-input>
|
||||||
|
</template>
|
||||||
|
</el-table-column>
|
||||||
|
<el-table-column
|
||||||
|
align="center"
|
||||||
|
width="160"
|
||||||
|
prop="researchNonCompliance"
|
||||||
|
label="不合规">
|
||||||
|
<el-table-column
|
||||||
|
prop="researchNonCompliance"
|
||||||
|
align="center"
|
||||||
|
width="160"
|
||||||
|
label="不合规项目">
|
||||||
|
<template slot-scope="scope">
|
||||||
|
<el-input
|
||||||
|
v-model="dataList[scope.$index].noCompliance"
|
||||||
|
placeholder="请输入不合规项目"
|
||||||
|
>
|
||||||
|
</el-input>
|
||||||
|
</template>
|
||||||
|
</el-table-column>
|
||||||
|
<el-table-column
|
||||||
|
prop="researchCountermeasures"
|
||||||
|
align="center"
|
||||||
|
width="160"
|
||||||
|
label="应对措施">
|
||||||
|
<template slot-scope="scope">
|
||||||
|
<el-input
|
||||||
|
v-model="dataList[scope.$index].countermeasures"
|
||||||
|
placeholder="请输入应对措施"
|
||||||
|
>
|
||||||
|
</el-input>
|
||||||
|
</template>
|
||||||
|
</el-table-column>
|
||||||
|
<el-table-column
|
||||||
|
prop="researchCompletionTime"
|
||||||
|
align="center"
|
||||||
|
width="160"
|
||||||
|
label="完成时间">
|
||||||
|
<template slot-scope="scope">
|
||||||
|
<el-date-picker
|
||||||
|
v-model="dataList[scope.$index].completionTime"
|
||||||
|
type="date"
|
||||||
|
placeholder="选择日期">
|
||||||
|
</el-date-picker>
|
||||||
|
</template>
|
||||||
|
</el-table-column>
|
||||||
|
</el-table-column>
|
||||||
|
</el-table-column>
|
||||||
|
<el-table-column
|
||||||
|
align="center"
|
||||||
|
label="在产产品">
|
||||||
|
<el-table-column
|
||||||
|
prop="productionCompliance"
|
||||||
|
align="center"
|
||||||
|
width="160"
|
||||||
|
label="合规(具体情况)">
|
||||||
|
<template slot-scope="scope">
|
||||||
|
<el-input
|
||||||
|
v-model="dataList[scope.$index].zcComplianceReasons"
|
||||||
|
placeholder="请输入合规原因"
|
||||||
|
>
|
||||||
|
</el-input>
|
||||||
|
</template>
|
||||||
|
</el-table-column>
|
||||||
|
<el-table-column
|
||||||
|
align="center"
|
||||||
|
width="160"
|
||||||
|
label="不合规">
|
||||||
|
<el-table-column
|
||||||
|
prop="productionNonCompliance"
|
||||||
|
align="center"
|
||||||
|
width="160"
|
||||||
|
label="不合规项目">
|
||||||
|
<template slot-scope="scope">
|
||||||
|
<el-input
|
||||||
|
v-model="dataList[scope.$index].zcNoCompliance"
|
||||||
|
placeholder="请输入不合规项目"
|
||||||
|
>
|
||||||
|
</el-input>
|
||||||
|
</template>
|
||||||
|
</el-table-column>
|
||||||
|
<el-table-column
|
||||||
|
prop="productionCountermeasures"
|
||||||
|
align="center"
|
||||||
|
width="160"
|
||||||
|
label="应对措施">
|
||||||
|
<template slot-scope="scope">
|
||||||
|
<el-input
|
||||||
|
v-model="dataList[scope.$index].zcCountermeasures"
|
||||||
|
placeholder="请输入应对措施"
|
||||||
|
>
|
||||||
|
</el-input>
|
||||||
|
</template>
|
||||||
|
</el-table-column>
|
||||||
|
<el-table-column
|
||||||
|
prop="productionCompletionTime"
|
||||||
|
align="center"
|
||||||
|
width="160"
|
||||||
|
label="完成时间">
|
||||||
|
<template slot-scope="scope">
|
||||||
|
<el-date-picker
|
||||||
|
v-model="dataList[scope.$index].zcCompletionTime"
|
||||||
|
type="date"
|
||||||
|
placeholder="选择日期">
|
||||||
|
</el-date-picker>
|
||||||
|
</template>
|
||||||
|
</el-table-column>
|
||||||
|
</el-table-column>
|
||||||
|
</el-table-column>
|
||||||
|
<el-table-column
|
||||||
|
fixed="right"
|
||||||
|
align="center"
|
||||||
|
width="150"
|
||||||
|
prop="implementer"
|
||||||
|
label="落实人">
|
||||||
|
</el-table-column>
|
||||||
|
</el-table>
|
||||||
|
</div>
|
||||||
|
</div>
|
||||||
|
<div class="content" v-show="active === '3'">
|
||||||
|
<div class="flow-list" style="height: 100%">
|
||||||
|
<el-table
|
||||||
|
height="100%"
|
||||||
|
ref="selection"
|
||||||
|
:data="detailData"
|
||||||
|
tooltip-effect="dark"
|
||||||
|
style="width: 100%"
|
||||||
|
border
|
||||||
|
row-key="id"
|
||||||
|
:no-data-text="listNoDataText"
|
||||||
|
:header-cell-style="{background: '#f8f8f9', color: '#515a6e'}"
|
||||||
|
>
|
||||||
|
<el-table-column
|
||||||
|
type="selection"
|
||||||
|
width="55"
|
||||||
|
align="center">
|
||||||
|
</el-table-column>
|
||||||
|
<el-table-column
|
||||||
|
prop="name"
|
||||||
|
label="任务步骤"
|
||||||
|
align="center"
|
||||||
|
>
|
||||||
|
</el-table-column>
|
||||||
|
<el-table-column
|
||||||
|
prop="assignee"
|
||||||
|
label="任务受理人"
|
||||||
|
align="center"
|
||||||
|
>
|
||||||
|
</el-table-column>
|
||||||
|
<el-table-column
|
||||||
|
prop="createTime"
|
||||||
|
label="创建时间"
|
||||||
|
sortable="custom"
|
||||||
|
align="center">
|
||||||
|
<template slot-scope="scope">
|
||||||
|
<span>{{ scope.row.createTime ? $moment(scope.row.createTime).format("YYYY-MM-DD") : "" }}</span>
|
||||||
|
</template>
|
||||||
|
</el-table-column>
|
||||||
|
<el-table-column
|
||||||
|
prop="endTime"
|
||||||
|
label="完成时间"
|
||||||
|
align="center">
|
||||||
|
<template slot-scope="scope">
|
||||||
|
<span>{{ scope.row.endTime ? $moment(scope.row.endTime).format("YYYY-MM-DD") : "" }}</span>
|
||||||
|
</template>
|
||||||
|
</el-table-column>
|
||||||
|
<el-table-column
|
||||||
|
prop="comment"
|
||||||
|
label="审批意见"
|
||||||
|
align="center">
|
||||||
|
<template slot-scope="scope">
|
||||||
|
<span>{{ scope.row.commentText }}</span>
|
||||||
|
</template>
|
||||||
|
</el-table-column>
|
||||||
|
<el-table-column
|
||||||
|
prop="completeFlag"
|
||||||
|
label="状态"
|
||||||
|
align="center">
|
||||||
|
<template slot-scope="scope">
|
||||||
|
<span>{{ scope.row.endTime ? "已完成" : "未完成" }}</span>
|
||||||
|
</template>
|
||||||
|
</el-table-column>
|
||||||
|
</el-table>
|
||||||
|
<loading :loading="loading">流程列表加载中</loading>
|
||||||
|
</div>
|
||||||
|
</div>
|
||||||
|
<ProcessFooter
|
||||||
|
show-save
|
||||||
|
show-submit
|
||||||
|
:submitLoading="isSubmit"
|
||||||
|
:saveLoading="saveLoading"
|
||||||
|
@save="handleSave"
|
||||||
|
@submit="handleSubmit"
|
||||||
|
>
|
||||||
|
</ProcessFooter>
|
||||||
|
<!-- 选择责任人-->
|
||||||
|
<Role-tree
|
||||||
|
check-box
|
||||||
|
:is-title="drawerTitle"
|
||||||
|
:is-visible.sync="modalshowflag"
|
||||||
|
@checkedRole="checkedRole"
|
||||||
|
:nodeList="nodeList"
|
||||||
|
></Role-tree>
|
||||||
|
</div>
|
||||||
</template>
|
</template>
|
||||||
|
|
||||||
<script>
|
<script>
|
||||||
|
import ProcessHeader from "../../components/ProcessHeader";
|
||||||
|
import ProcessFooter from "../../components/ProcessFooter";
|
||||||
|
import ProcessTitle from "../../components/ProcessTitle";
|
||||||
|
import { inboundLiaisonDetail, queryDetail } from "api/process";
|
||||||
|
|
||||||
export default {
|
export default {
|
||||||
name: "xmpg2Step6"
|
name: "xmpg2Step6",
|
||||||
|
components: {
|
||||||
|
ProcessTitle,
|
||||||
|
ProcessHeader,
|
||||||
|
ProcessFooter
|
||||||
|
},
|
||||||
|
data() {
|
||||||
|
return {
|
||||||
|
hasChildren: true,
|
||||||
|
active: "1",
|
||||||
|
loading: false,
|
||||||
|
// 当前流程类型(1待办/2已办)
|
||||||
|
processType: 1,
|
||||||
|
isSubmit: false,
|
||||||
|
saveLoading: false,
|
||||||
|
showColumn: true,
|
||||||
|
drawerTitle: "", //drawer标题
|
||||||
|
modalshowflag: false, // drawer开关
|
||||||
|
selectList: [],
|
||||||
|
treeData: [], // 人员数据
|
||||||
|
roleForm: {
|
||||||
|
liablePeople: ""
|
||||||
|
},
|
||||||
|
peopleFlag: true,
|
||||||
|
nodeList: [],
|
||||||
|
defaultProps: {
|
||||||
|
children: "children",
|
||||||
|
label: "name"
|
||||||
|
},
|
||||||
|
//表单的数据
|
||||||
|
listForm: {
|
||||||
|
projectNumber: "", //项目编号
|
||||||
|
projectName: "", //项目名称
|
||||||
|
dataList: [], //项目下的标准数据
|
||||||
|
children: [], //标准下的分解单数据
|
||||||
|
},
|
||||||
|
dataList: [], //展示的标准数据
|
||||||
|
commentText: "", //审批意见
|
||||||
|
detailData: [], //流程历史数据
|
||||||
|
userId: this.$store.getters.userInfo.userId,
|
||||||
|
taskIds: this.$route.query.taskIds,
|
||||||
|
pId: this.$route.query.prcId
|
||||||
|
};
|
||||||
|
},
|
||||||
|
methods: {
|
||||||
|
processTable() {
|
||||||
|
this.$http.get("lawss/activiti/get_list_by_instance", {
|
||||||
|
prcNum: this.$route.query.prcNum,
|
||||||
|
sortWord: this.shunxu ? this.paixu : "",
|
||||||
|
shunxu: this.shunxu
|
||||||
|
}, {
|
||||||
|
loading: "loading",
|
||||||
|
_this: this
|
||||||
|
}, res => {
|
||||||
|
this.detailData = res;
|
||||||
|
}, e => {
|
||||||
|
});
|
||||||
|
},
|
||||||
|
//tab改变
|
||||||
|
handleTabs(type) {
|
||||||
|
this.active = type;
|
||||||
|
},
|
||||||
|
//获取数据
|
||||||
|
getData() {
|
||||||
|
return new Promise((resolve, reject) => {
|
||||||
|
inboundLiaisonDetail({
|
||||||
|
taskIds: this.taskIds,
|
||||||
|
pId: this.pId
|
||||||
|
}).then(res => {
|
||||||
|
console.log(res.mesg);
|
||||||
|
if (res) {
|
||||||
|
const processForm = JSON.parse(res.mesg);
|
||||||
|
this.getFormFieldList(processForm);
|
||||||
|
}
|
||||||
|
}).catch(e => {
|
||||||
|
});
|
||||||
|
});
|
||||||
|
},
|
||||||
|
//动态表单读取
|
||||||
|
getFormFieldList(item) {
|
||||||
|
this.$nextTick(() => {
|
||||||
|
this.listForm = JSON.parse(JSON.stringify(item));
|
||||||
|
this.listForm.prcNum = this.prcNum;
|
||||||
|
this.listForm.prcName = this.prcName;
|
||||||
|
this.listForm["id"] = item.id;
|
||||||
|
this.listForm.dataList = item.dataList;
|
||||||
|
console.log(item.dataList);
|
||||||
|
this.dataList = item.dataList;
|
||||||
|
this.dataList.distributePerson = item.dataList[0].distributePerson;
|
||||||
|
this.listForm.breakdownList = item.breakdownList;
|
||||||
|
});
|
||||||
|
},
|
||||||
|
//保存事件
|
||||||
|
handleSave() {
|
||||||
|
|
||||||
|
},
|
||||||
|
//提交事件
|
||||||
|
handleSubmit() {
|
||||||
|
this.listForm.dataList.forEach(item => {
|
||||||
|
if (item.liablePeople !== undefined) {
|
||||||
|
this.listForm.commentText = this.commentText;
|
||||||
|
const json = JSON.stringify(this.listForm);
|
||||||
|
console.log(json);
|
||||||
|
this.$http.post("lawss/activiti/completeTask", {
|
||||||
|
taskIds: this.taskIds,
|
||||||
|
userId: this.userId,
|
||||||
|
json: json
|
||||||
|
}, {
|
||||||
|
_this: this
|
||||||
|
}, res => {
|
||||||
|
if (res.success) {
|
||||||
|
this.$message.success(res.message);
|
||||||
|
this.$router.push("/processCenter");
|
||||||
|
}
|
||||||
|
}, e => {
|
||||||
|
});
|
||||||
|
} else {
|
||||||
|
this.$message.warning("请选择分发负责人");
|
||||||
|
}
|
||||||
|
});
|
||||||
|
},
|
||||||
|
//批量操作按钮
|
||||||
|
batchOperation(id) {
|
||||||
|
console.log(this.selectList);
|
||||||
|
if (this.selectList.length === 0) {
|
||||||
|
this.$message.warning("请至少选择一条数据进行批量分发");
|
||||||
|
} else {
|
||||||
|
this.nodeList = [];
|
||||||
|
this.nodeList.push(id);
|
||||||
|
this.modalshowflag = true;
|
||||||
|
}
|
||||||
|
},
|
||||||
|
//标准表格选择框改变
|
||||||
|
selectStandChange(data) {
|
||||||
|
this.selectList = data;
|
||||||
|
},
|
||||||
|
getTree() {
|
||||||
|
this.$http.get("SarInstitution/institution/institutionAndUser", {}, {}, res => {
|
||||||
|
this.treeData = res.data;
|
||||||
|
});
|
||||||
|
},
|
||||||
|
drawerCheck(data) {
|
||||||
|
var getlist = this.$refs.tree.getCheckedNodes().concat(this.$refs.tree.getHalfCheckedNodes());
|
||||||
|
if (getlist.length == 1) {
|
||||||
|
this.roleRow = getlist[0];
|
||||||
|
} else {
|
||||||
|
this.$refs.tree.setCheckedKeys([data.id]);
|
||||||
|
this.roleRow = this.$refs.tree.getCheckedNodes()[0];
|
||||||
|
}
|
||||||
|
},
|
||||||
|
checkedRole(data) {
|
||||||
|
// 选取负责人时的操作
|
||||||
|
let mis = [];
|
||||||
|
this.selectList.forEach(item => {
|
||||||
|
item.liablePeople = data[0].name;
|
||||||
|
item.liablePeopleId = data[0].id;
|
||||||
|
mis.push(item.standId);
|
||||||
|
});
|
||||||
|
this.dataList.forEach(item => {
|
||||||
|
if (!mis.includes(item.standId)) {
|
||||||
|
this.selectList.push(item);
|
||||||
|
}
|
||||||
|
});
|
||||||
|
this.dataList = this.selectList;
|
||||||
|
this.$refs.selection.clearSelection();
|
||||||
|
this.modalshowflag = false;
|
||||||
|
},
|
||||||
|
cancleUserInfo() {
|
||||||
|
this.modalshowflag = false;
|
||||||
|
}
|
||||||
|
},
|
||||||
|
computed: {
|
||||||
|
listNoDataText() {
|
||||||
|
return this.processType === 1 ? "暂无待办流程" : "暂无已办流程";
|
||||||
|
}
|
||||||
|
},
|
||||||
|
mounted() {
|
||||||
|
this.processTable();
|
||||||
|
this.getData();
|
||||||
|
this.getTree();
|
||||||
|
}
|
||||||
};
|
};
|
||||||
</script>
|
</script>
|
||||||
|
|
||||||
<style scoped>
|
<style lang="less" scoped>
|
||||||
|
@import '~@/assets/styles/style';
|
||||||
|
|
||||||
|
.xmpg-step3 {
|
||||||
|
/deep/ .el-drawer__container {
|
||||||
|
.prc-content-border {
|
||||||
|
border: none;
|
||||||
|
padding: 0 20px 0;
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
|
.choiceBtn {
|
||||||
|
.el-button--primary {
|
||||||
|
width: 150px;
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
|
position: relative;
|
||||||
|
height: 100%;
|
||||||
|
|
||||||
|
.headerTabs {
|
||||||
|
height: 52px;
|
||||||
|
display: flex;
|
||||||
|
align-items: center;
|
||||||
|
position: absolute;
|
||||||
|
top: 0;
|
||||||
|
right: 10px;
|
||||||
|
|
||||||
|
.headerTabsItem {
|
||||||
|
border: 1px solid #c1c1c1;
|
||||||
|
padding: 0 5px;
|
||||||
|
height: 30px;
|
||||||
|
line-height: 30px;
|
||||||
|
cursor: pointer;
|
||||||
|
}
|
||||||
|
|
||||||
|
.active {
|
||||||
|
border: 1px solid #E6A23C;
|
||||||
|
color: #fff;
|
||||||
|
background: #E6A23C;
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
|
.content {
|
||||||
|
display: flex;
|
||||||
|
flex-direction: column;
|
||||||
|
justify-content: space-between;
|
||||||
|
height: calc(~'100% - 103px');
|
||||||
|
overflow: auto;
|
||||||
|
|
||||||
|
.tableTitle {
|
||||||
|
margin-bottom: 10px;
|
||||||
|
height: 30px;
|
||||||
|
line-height: 30px;
|
||||||
|
position: relative;
|
||||||
|
font-size: 13px;
|
||||||
|
font-weight: bold;
|
||||||
|
|
||||||
|
.tableButton {
|
||||||
|
position: absolute;
|
||||||
|
right: 0;
|
||||||
|
top: 0;
|
||||||
|
}
|
||||||
|
|
||||||
|
.accessStandardsAndRegulations {
|
||||||
|
height: 100%;
|
||||||
|
}
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
|
.demo-drawer-content {
|
||||||
|
margin-top: 10px;
|
||||||
|
}
|
||||||
|
}
|
||||||
</style>
|
</style>
|
||||||
|
|
||||||
|
|||||||
@@ -658,6 +658,7 @@ import CustomRoleTree from '@/components/CustomFormComponents/roleTree'
|
|||||||
import stand from "../../../config/pages/attributeCustom/components/stand";
|
import stand from "../../../config/pages/attributeCustom/components/stand";
|
||||||
import { mapGetters } from 'vuex'
|
import { mapGetters } from 'vuex'
|
||||||
import { editDataInfo } from '@/api/unqualProcess'
|
import { editDataInfo } from '@/api/unqualProcess'
|
||||||
|
import {interfaceUrl} from "@/sysConfig";
|
||||||
export default {
|
export default {
|
||||||
name: 'ListOfStandardsAndRegulationsDetails',
|
name: 'ListOfStandardsAndRegulationsDetails',
|
||||||
components: {
|
components: {
|
||||||
@@ -1512,7 +1513,6 @@ export default {
|
|||||||
// 数据搜索 table select事件
|
// 数据搜索 table select事件
|
||||||
sarAccessInfoSearchSelect (val) {
|
sarAccessInfoSearchSelect (val) {
|
||||||
this.selectedAccInfoSearchList = val
|
this.selectedAccInfoSearchList = val
|
||||||
console.log(val)
|
|
||||||
},
|
},
|
||||||
// 数据搜索 清单类型 table select事件
|
// 数据搜索 清单类型 table select事件
|
||||||
accessSarTypeSelect (selectData) {
|
accessSarTypeSelect (selectData) {
|
||||||
@@ -1531,8 +1531,13 @@ export default {
|
|||||||
},
|
},
|
||||||
// 点击 导出、全部导出按钮事件
|
// 点击 导出、全部导出按钮事件
|
||||||
exportAccessInfo (type) {
|
exportAccessInfo (type) {
|
||||||
this.exportTestItemNameFlag = true
|
if (this.sarAccessInfoListArry.length > 0) {
|
||||||
this.exportName = ''
|
this.exportTestItemNameFlag = true
|
||||||
|
this.exportName = ''
|
||||||
|
}else {
|
||||||
|
this.$message.warning('请选择数据进行导出')
|
||||||
|
}
|
||||||
|
|
||||||
},
|
},
|
||||||
// 导出确定功能
|
// 导出确定功能
|
||||||
exportTestItem () {
|
exportTestItem () {
|
||||||
@@ -1548,10 +1553,9 @@ export default {
|
|||||||
for (var accessInfo in exportList) {
|
for (var accessInfo in exportList) {
|
||||||
accIdAndrestype.push(exportList[accessInfo].id)
|
accIdAndrestype.push(exportList[accessInfo].id)
|
||||||
}
|
}
|
||||||
window.location.href = '/api/lawss/sarSarAccessInfo/exportSarSarAccessInfo?idAndSartypeList=' + accIdAndrestype.join(',') + '&exportType=apart' + '&exportName=' + exportNames
|
const exportURL = interfaceUrl + 'sarLawsAttrDetailedList/sar-laws-attr-detailed-list/ExportLawsById?'+ '&exportType=apart'+ '&ids=' + accIdAndrestype.join(',')+ '&exportName=' + this.exportName
|
||||||
|
window.open(exportURL)
|
||||||
this.$message.success('导出信息成功')
|
this.$message.success('导出信息成功')
|
||||||
} else {
|
|
||||||
this.$message.warning('当前没有需要导出的数据')
|
|
||||||
}
|
}
|
||||||
this.exportTestItemNameFlag = false
|
this.exportTestItemNameFlag = false
|
||||||
},
|
},
|
||||||
|
|||||||
@@ -488,6 +488,7 @@ import CustomInputForPolicy from '@/components/CustomFormComponents/InputForPoli
|
|||||||
import CustomRoleTree from '@/components/CustomFormComponents/roleTree'
|
import CustomRoleTree from '@/components/CustomFormComponents/roleTree'
|
||||||
import stand from "../../../config/pages/attributeCustom/components/stand";
|
import stand from "../../../config/pages/attributeCustom/components/stand";
|
||||||
import { mapGetters } from 'vuex'
|
import { mapGetters } from 'vuex'
|
||||||
|
import {interfaceUrl} from "@/sysConfig";
|
||||||
export default {
|
export default {
|
||||||
name: 'OtherAddEit',
|
name: 'OtherAddEit',
|
||||||
components: {
|
components: {
|
||||||
@@ -1284,8 +1285,12 @@ export default {
|
|||||||
},
|
},
|
||||||
// 点击 导出、全部导出按钮事件
|
// 点击 导出、全部导出按钮事件
|
||||||
exportAccessInfo (type) {
|
exportAccessInfo (type) {
|
||||||
this.exportTestItemNameFlag = true
|
if (this.sarAccessInfoListArry.length > 0) {
|
||||||
this.exportName = ''
|
this.exportTestItemNameFlag = true
|
||||||
|
this.exportName = ''
|
||||||
|
}else {
|
||||||
|
this.$message.warning('请选择数据进行导出')
|
||||||
|
}
|
||||||
},
|
},
|
||||||
// 导出确定功能
|
// 导出确定功能
|
||||||
exportTestItem () {
|
exportTestItem () {
|
||||||
@@ -1301,10 +1306,10 @@ export default {
|
|||||||
for (var accessInfo in exportList) {
|
for (var accessInfo in exportList) {
|
||||||
accIdAndrestype.push(exportList[accessInfo].id)
|
accIdAndrestype.push(exportList[accessInfo].id)
|
||||||
}
|
}
|
||||||
window.location.href = '/api/lawss/sarSarAccessInfo/exportSarSarAccessInfo?idAndSartypeList=' + accIdAndrestype.join(',') + '&exportType=apart' + '&exportName=' + exportNames
|
const exportURL = interfaceUrl + 'sarLawsAttrDetailedList/sar-laws-attr-detailed-list/ExportLawsById?'+ '&exportType=apart'+ '&ids=' + accIdAndrestype.join(',')+ '&exportName=' + this.exportName
|
||||||
|
window.open(exportURL)
|
||||||
|
// window.location.href = '/api/lawss/sarSarAccessInfo/exportSarSarAccessInfo?idAndSartypeList=' + accIdAndrestype.join(',') + '&exportType=apart' + '&exportName=' + exportNames
|
||||||
this.$message.success('导出信息成功')
|
this.$message.success('导出信息成功')
|
||||||
} else {
|
|
||||||
this.$message.warning('当前没有需要导出的数据')
|
|
||||||
}
|
}
|
||||||
this.exportTestItemNameFlag = false
|
this.exportTestItemNameFlag = false
|
||||||
},
|
},
|
||||||
|
|||||||
+10
-3
@@ -488,6 +488,7 @@ import CustomInputForPolicy from '@/components/CustomFormComponents/InputForPoli
|
|||||||
import CustomRoleTree from '@/components/CustomFormComponents/roleTree'
|
import CustomRoleTree from '@/components/CustomFormComponents/roleTree'
|
||||||
import stand from "../../../config/pages/attributeCustom/components/stand";
|
import stand from "../../../config/pages/attributeCustom/components/stand";
|
||||||
import { mapGetters } from 'vuex'
|
import { mapGetters } from 'vuex'
|
||||||
|
import {interfaceUrl} from "@/sysConfig";
|
||||||
export default {
|
export default {
|
||||||
name: 'OtherAddEit',
|
name: 'OtherAddEit',
|
||||||
components: {
|
components: {
|
||||||
@@ -1285,8 +1286,12 @@ export default {
|
|||||||
},
|
},
|
||||||
// 点击 导出、全部导出按钮事件
|
// 点击 导出、全部导出按钮事件
|
||||||
exportAccessInfo (type) {
|
exportAccessInfo (type) {
|
||||||
this.exportTestItemNameFlag = true
|
if (this.sarAccessInfoListArry.length > 0) {
|
||||||
this.exportName = ''
|
this.exportTestItemNameFlag = true
|
||||||
|
this.exportName = ''
|
||||||
|
}else {
|
||||||
|
this.$message.warning('请选择数据进行导出')
|
||||||
|
}
|
||||||
},
|
},
|
||||||
// 导出确定功能
|
// 导出确定功能
|
||||||
exportTestItem () {
|
exportTestItem () {
|
||||||
@@ -1302,7 +1307,9 @@ export default {
|
|||||||
for (var accessInfo in exportList) {
|
for (var accessInfo in exportList) {
|
||||||
accIdAndrestype.push(exportList[accessInfo].id)
|
accIdAndrestype.push(exportList[accessInfo].id)
|
||||||
}
|
}
|
||||||
window.location.href = '/api/lawss/sarSarAccessInfo/exportSarSarAccessInfo?idAndSartypeList=' + accIdAndrestype.join(',') + '&exportType=apart' + '&exportName=' + exportNames
|
const exportURL = interfaceUrl + 'sarLawsAttrDetailedList/sar-laws-attr-detailed-list/ExportLawsById?'+ '&exportType=apart'+ '&ids=' + accIdAndrestype.join(',')+ '&exportName=' + this.exportName
|
||||||
|
window.open(exportURL)
|
||||||
|
// window.location.href = '/api/lawss/sarSarAccessInfo/exportSarSarAccessInfo?idAndSartypeList=' + accIdAndrestype.join(',') + '&exportType=apart' + '&exportName=' + exportNames
|
||||||
this.$message.success('导出信息成功')
|
this.$message.success('导出信息成功')
|
||||||
} else {
|
} else {
|
||||||
this.$message.warning('当前没有需要导出的数据')
|
this.$message.warning('当前没有需要导出的数据')
|
||||||
|
|||||||
@@ -30,10 +30,11 @@
|
|||||||
</div>
|
</div>
|
||||||
</el-card>
|
</el-card>
|
||||||
<div class="action-bar">
|
<div class="action-bar">
|
||||||
<el-button plain class="common-button-primary" size="mini" @click="addList">调取</el-button>
|
<el-button plain class="common-button-primary" v-btn-permission="'2c4366e07a5b707bf3d3f4985fb82662'" size="mini" @click="addList">调取</el-button>
|
||||||
<el-button plain class="common-button-primary" size="mini" @click="deleteList">批量删除</el-button>
|
<el-button plain class="common-button-primary" v-btn-permission="'63d9a5a8f7b6a4095511394a60013eac'" size="mini" @click="deleteList">批量删除</el-button>
|
||||||
<el-button class="common-button-default export-button"
|
<el-button class="common-button-default export-button"
|
||||||
size="mini" @click="exportStandard"
|
size="mini" @click="exportStandard"
|
||||||
|
v-btn-permission="'ec6b73db0edd6a379d3ea90af3849861'"
|
||||||
title="不勾选时默认导出所有筛选项;勾选时仅导出勾选项"
|
title="不勾选时默认导出所有筛选项;勾选时仅导出勾选项"
|
||||||
icon="export"
|
icon="export"
|
||||||
>导出</el-button>
|
>导出</el-button>
|
||||||
|
|||||||
Reference in New Issue
Block a user