986 lines
31 KiB
Vue
986 lines
31 KiB
Vue
<!--标准清单发布/更新流程step3 - 根据会签意见修订-->
|
|
<template>
|
|
<div class="bzqdfb-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="orgName" class="add-form-item form-item-disabled">-->
|
|
<!-- <el-radio-group v-model="listType" @change="selectionList">-->
|
|
<!-- <el-radio label="country">国家/地区清单</el-radio>-->
|
|
<!-- <el-radio label="project">项目清单</el-radio>-->
|
|
<!-- <el-radio label="other">其他清单</el-radio>-->
|
|
<!-- </el-radio-group>-->
|
|
<!-- <el-button size="mini" type="primary" style="margin-left: 40px;" @click="choiceShow">选择清单</el-button>-->
|
|
<!-- </el-form-item>-->
|
|
<el-form-item label="清单名称" prop="listName" class="add-form-item form-item-disabled">
|
|
<el-input
|
|
disabled
|
|
v-model="listForm.listName"
|
|
placeholder="请输入清单名称"
|
|
clearable
|
|
></el-input>
|
|
</el-form-item>
|
|
<!-- <el-form-item label="适用区域" prop="applyRegion" class="add-form-item form-item-disabled">-->
|
|
<!-- <el-input-->
|
|
<!-- v-model="listForm.applyRegion"-->
|
|
<!-- placeholder="请输入适用区域"-->
|
|
<!-- clearable-->
|
|
<!-- ></el-input>-->
|
|
<!-- </el-form-item>-->
|
|
<el-form-item label="清单说明" prop="descriptionList" class="add-form-item form-item-disabled">
|
|
<el-input
|
|
v-model="listForm.descriptionList"
|
|
placeholder="请输入清单说明"
|
|
clearable
|
|
></el-input>
|
|
</el-form-item>
|
|
<el-form-item label="附件" prop="fileName" class="add-form-item form-item-disabled">
|
|
<el-upload
|
|
:action="uploadFileListPath"
|
|
show-file-list
|
|
:file-list="fileInfoList"
|
|
name="file"
|
|
accept=".PDF, .pdf, .doc, .DOC, .docx, .DOCX, .xls, .xlsx, .ppt, .pptx, .PPT, .PPTX, .JPG, .JPEG, .PNG, .jpg, .jpeg, .png"
|
|
:on-remove="delFileInfo"
|
|
:on-success="uploadBackSuccess"
|
|
:before-upload="beforeUpload"
|
|
:on-preview="handleOnPreview"
|
|
>
|
|
<el-button class="common-button-default" size="mini">
|
|
点击上传
|
|
</el-button>
|
|
</el-upload>
|
|
</el-form-item>
|
|
</el-col>
|
|
</el-row>
|
|
</el-form>
|
|
<process-title>
|
|
<template slot="title">填写信息</template>
|
|
</process-title>
|
|
<div class="tableTitle">
|
|
<div class="tableButton">
|
|
<el-button plain class="common-button-primary" size="mini" @click="addList">添加</el-button>
|
|
<el-button plain class="common-button-primary" size="mini" @click="deleteList">批量删除</el-button>
|
|
</div>
|
|
</div>
|
|
<el-table
|
|
:data="dataList"
|
|
border
|
|
height="61.6%"
|
|
style="width: 100%"
|
|
@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="code"
|
|
width="180px"
|
|
label="标准号">
|
|
<template slot-scope="scope">
|
|
<a v-if="scope.row.standYear" class="table-jump"
|
|
@click="handlePreview(scope.row)">{{ scope.row.standSortShow }} {{ scope.row.standNumber
|
|
}}-{{ scope.row.standYear }}</a>
|
|
<a v-else @click="handlePreview(scope.row)" class="table-jump">{{ scope.row.standSortShow }}
|
|
{{ scope.row.standNumber }}</a>
|
|
</template>
|
|
</el-table-column>
|
|
<el-table-column
|
|
prop="standName"
|
|
label="标准名称"
|
|
width="260px"
|
|
>
|
|
<template slot-scope="scope">
|
|
<a @click="handlePreview(scope.row)" class="table-jump">{{ scope.row.standName }}</a>
|
|
</template>
|
|
</el-table-column>
|
|
<el-table-column
|
|
prop="issueTime"
|
|
label="发布日期">
|
|
<template slot-scope="scope">
|
|
<span>{{ scope.row.issueTime ? $moment(scope.row.issueTime).format("YYYY-MM-DD") : "" }}</span>
|
|
</template>
|
|
</el-table-column>
|
|
<el-table-column
|
|
prop="XCXSSRQ"
|
|
label="新车型实施日期">
|
|
</el-table-column>
|
|
<el-table-column
|
|
show-overflow-tooltip
|
|
prop="ZCCSSRQ"
|
|
label="在产车实施日期">
|
|
</el-table-column>
|
|
<el-table-column
|
|
show-overflow-tooltip
|
|
prop="textStatus"
|
|
width="120px"
|
|
label="文本状态">
|
|
<template slot-scope="scope">
|
|
<span>{{ textStatusMap[scope.row.textStatus] }}</span>
|
|
</template>
|
|
</el-table-column>
|
|
</el-table>
|
|
</div>
|
|
<div>
|
|
<el-collapse accordion>
|
|
<el-collapse-item title="回执说明">
|
|
<div style="margin: 10px 0;">
|
|
<el-input
|
|
type="textarea"
|
|
:rows="3"
|
|
resize="none"
|
|
placeholder="请输入意见"
|
|
v-model="commentText">
|
|
</el-input>
|
|
</div>
|
|
</el-collapse-item>
|
|
</el-collapse>
|
|
</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="创建时间"
|
|
align="center">
|
|
<template slot-scope="scope">
|
|
<span>{{ scope.row.createTime ? $moment(scope.row.createTime).format('YYYY-MM-DD HH:mm:ss') : '' }}</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 HH:mm:ss') : '' }}</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>
|
|
<!-- 添加标准抽屉-->
|
|
<el-drawer
|
|
title="添加标准"
|
|
:visible.sync="standModel"
|
|
size="900px"
|
|
custom-class="demo-drawer"
|
|
>
|
|
<div class="demo-drawer-content">
|
|
<div style="position: absolute;bottom: 48px;top:60px;left: 0;right: 0">
|
|
<div style="position: absolute;bottom: 55px;top: 0;right: 0;left: 0">
|
|
<div class="left">
|
|
<el-form :modal="standardSearch" :inline="true" class="label-input-form"
|
|
style="margin-left:10px">
|
|
<el-form-item label="类型" class="search-item search-item-last">
|
|
<el-select
|
|
@change="typeChange"
|
|
v-model="standardSearch.standType"
|
|
placeholder="请选择"
|
|
filterable
|
|
>
|
|
<el-option
|
|
v-for="item in standardTypeOptions"
|
|
:value="item.value"
|
|
:key="item.value"
|
|
:label="item.label"
|
|
>
|
|
</el-option>
|
|
</el-select>
|
|
</el-form-item>
|
|
<el-form-item label="标准号/标准名称" class="search-item search-item-last">
|
|
<el-input
|
|
v-model="standardSearch.standNumber"
|
|
placeholder="请输入标准号或标准名称"
|
|
></el-input>
|
|
</el-form-item>
|
|
<el-form-item class="search-item btn-box">
|
|
<el-button
|
|
:loading="searching"
|
|
type="primary"
|
|
class="common-button-primary"
|
|
size="small"
|
|
v-btn-permission="'072efe80c5459dd47fedd2d14f59ff7f'"
|
|
@click="getStandDataBtn">
|
|
查询
|
|
</el-button>
|
|
</el-form-item>
|
|
<el-form-item class="search-item btn-box">
|
|
<el-button
|
|
class="common-button-default"
|
|
size="small"
|
|
v-btn-permission="'3480a13964a18e000196e4d5bc6ef117'"
|
|
@click="clearStandSearch">清空
|
|
</el-button>
|
|
</el-form-item>
|
|
</el-form>
|
|
</div>
|
|
<el-table
|
|
:data="standardData"
|
|
v-loading="loading"
|
|
tooltip-effect="dark"
|
|
style="width: 100%"
|
|
border
|
|
ref="table"
|
|
class="table-height"
|
|
:header-cell-style="{background: '#f5f1f1', color: '#333333', fontSize: '16px',
|
|
fontWeight: 'bold', height: '48px'}"
|
|
@selection-change="selectThree"
|
|
>
|
|
<el-table-column
|
|
type="selection"
|
|
width="55"
|
|
align="center">
|
|
</el-table-column>
|
|
<el-table-column
|
|
prop="code"
|
|
align="center"
|
|
label="标准号">
|
|
<template slot-scope="scope">
|
|
<a v-if="scope.row.standYear" class="table-jump"
|
|
@click="handlePreview(scope.row)">{{ scope.row.standSortShow }} {{
|
|
scope.row.standNumber
|
|
}}-{{ scope.row.standYear }}</a>
|
|
<a v-else @click="handlePreview(scope.row)" class="table-jump">{{
|
|
scope.row.standSortShow }}
|
|
{{ scope.row.standNumber }}</a>
|
|
</template>
|
|
</el-table-column>
|
|
<el-table-column
|
|
prop="standName"
|
|
align="center"
|
|
label="标准名称"
|
|
>
|
|
<template slot-scope="scope">
|
|
<a @click="handlePreview(scope.row)" class="table-jump">{{ scope.row.standName }}</a>
|
|
</template>
|
|
</el-table-column>
|
|
<el-table-column
|
|
prop="issueTime"
|
|
align="center"
|
|
label="发布日期">
|
|
<template slot-scope="scope">
|
|
<span>{{ scope.row.issueTime ? $moment(scope.row.issueTime).format("YYYY-MM-DD") : "" }}</span>
|
|
</template>
|
|
</el-table-column>
|
|
<el-table-column
|
|
prop="XCXSSRQ"
|
|
align="center"
|
|
label="新车型实施日期">
|
|
</el-table-column>
|
|
<el-table-column
|
|
show-overflow-tooltip
|
|
prop="ZCCSSRQ"
|
|
align="center"
|
|
label="在产车实施日期">
|
|
</el-table-column>
|
|
<el-table-column
|
|
show-overflow-tooltip
|
|
prop="textStatus"
|
|
align="center"
|
|
label="文本状态">
|
|
<template slot-scope="scope">
|
|
<span>{{ textStatusMap[scope.row.textStatus] }}</span>
|
|
</template>
|
|
</el-table-column>
|
|
</el-table>
|
|
</div>
|
|
<pagination
|
|
:page="pageNo"
|
|
:pageSize="pageSizeNo"
|
|
:total="totalNo"
|
|
@pageChange="pageChangeNo"
|
|
@pageSizeChange="pageSizeChangeNo"
|
|
/>
|
|
</div>
|
|
</div>
|
|
<div class="demo-drawer-footer">
|
|
<el-button size="mini" @click="cancelStand">取消</el-button>
|
|
<el-button type="primary" size="mini" @click="okStand">添加</el-button>
|
|
</div>
|
|
</el-drawer>
|
|
|
|
<ProcessFooter
|
|
show-transfer
|
|
show-save
|
|
show-submit
|
|
:submitLoading="isSubmit"
|
|
:transfer-loading="isTransfer"
|
|
:saveLoading="saveLoading"
|
|
@transfer="handleTransfer"
|
|
@save="handleSave"
|
|
@submit="handleSubmit"
|
|
>
|
|
</ProcessFooter>
|
|
<!-- 福田全公司选人解决方案 -->
|
|
<Role-tree
|
|
check-box
|
|
:is-title="drawerTitle"
|
|
:is-visible.sync="drawerModal"
|
|
@checkedRole="checkedRole"
|
|
:nodeList="nodeList"
|
|
></Role-tree>
|
|
</div>
|
|
</template>
|
|
|
|
<script>
|
|
import ProcessHeader from "../../components/ProcessHeader";
|
|
import ProcessFooter from "../../components/ProcessFooter";
|
|
import ProcessTitle from "../../components/ProcessTitle";
|
|
import { inboundLiaisonDetail, saveTaskForPub ,changeAssigneeNew } from "api/process";
|
|
|
|
export default {
|
|
name: "bzqdfbStep3",
|
|
components: {
|
|
ProcessHeader,
|
|
ProcessFooter,
|
|
ProcessTitle
|
|
},
|
|
data() {
|
|
return {
|
|
detailData: [],
|
|
standList: [], //新添加的标准
|
|
// 当前流程类型(1待办/2已办)
|
|
processType: 1,
|
|
searching: false,
|
|
commentText:'',
|
|
nodeList:[],
|
|
isTransfer: false,
|
|
drawerTitle:'',
|
|
// 调整处理人抽屉状态
|
|
drawerModal: false,
|
|
standardTypeOptions: [
|
|
{
|
|
value: "INLAND",
|
|
label: "国内标准法规",
|
|
item: "INLAND"
|
|
},
|
|
{
|
|
value: "FOREIGN",
|
|
label: "海外标准法规",
|
|
item: "FOREIGN"
|
|
}
|
|
],
|
|
//查询添加标准相关数据
|
|
standardSearch: {
|
|
standType: "",
|
|
standNumber: "",
|
|
pageNo: 1,
|
|
pageSizeNo: this.$store.getters.userInfo.configContent
|
|
},
|
|
loading: false,
|
|
userId:this.$store.getters.userInfo.userId,
|
|
taskIds: this.$route.query.taskIds,
|
|
pId: this.$route.query.prcId,
|
|
uploadFileListPath: 'api/att/attFile/upload', // 上传的地址
|
|
fileList:[],
|
|
fileInfoList: [], // 上传的附件
|
|
dataList: [],//清单里的标准数据
|
|
standardData: [], //添加标准数据
|
|
standModel: false, // 选择标准抽屉状态
|
|
active: "1",
|
|
signFlag: "1", //是否会签 1为会签 2为不会签
|
|
isSubmit: false,
|
|
saveLoading: false,
|
|
tabValue: "listOfCountries",
|
|
selectedList: [], //选择清单的选择框
|
|
selectList: [], //选择标准的选择框
|
|
bringData: [],
|
|
page: 1,
|
|
total: 0,
|
|
pageSize: this.$store.getters.userInfo.configContent,
|
|
pageNo: 1,
|
|
totalNo: 0,
|
|
pageSizeNo: this.$store.getters.userInfo.configContent,
|
|
listForm: {
|
|
listName: "", //清单名称
|
|
// applyRegion: "", //适用区域
|
|
descriptionList: "", //清单说明
|
|
enclosure: "", //附件
|
|
signFlag: "1", //是否会签 1为会签 2为不会签
|
|
dataList: [{
|
|
standNumber: "", //标准号
|
|
cnName: "", //中文名称
|
|
enName: "", //英文名称
|
|
isSubTime: "", //发布日期
|
|
XCXSSRQ: "", //新车型实施日期
|
|
ZCCSSRQ: "", //在产车实施日期
|
|
applyCar: "", //适用车型
|
|
textState: "", //文本状态
|
|
id: ""
|
|
}]
|
|
},
|
|
choiceForm: {}, //选择标准清单列表
|
|
// countryOptions: [], //适用区域下拉框数据
|
|
user1: "",
|
|
user2: "",
|
|
user3: "",
|
|
user4: "",
|
|
user5: "",
|
|
standMap: new Map(),
|
|
textStatusMap: {}// 文本状态id与name对应
|
|
};
|
|
},
|
|
methods: {
|
|
//确认转办
|
|
checkedRole (data) {
|
|
this.assigneeNewLoading = true
|
|
changeAssigneeNew({
|
|
taskId: this.$route.query.taskIds, // 任务id
|
|
assignee: data[0].id, // 被委托人
|
|
userId: this.$store.getters.userInfo.userId, // 委托人
|
|
pId: this.$route.query.prcId // 流程实例
|
|
}).then(res => {
|
|
this.isTransfer = false
|
|
if (res.success) {
|
|
this.drawerModal = false
|
|
this.$message.success('调整成功')
|
|
this.$router.push("/processCenter");
|
|
this.processNum()
|
|
} else {
|
|
this.$message.warning(res.message)
|
|
}
|
|
})
|
|
},
|
|
// 请求转换流程图
|
|
processNum (row) {
|
|
axios.request({
|
|
url: '/api/lawss/activiti/getImg?_t=' + new Date().getTime(),
|
|
responseType: 'blob',
|
|
method: 'get',
|
|
params: {
|
|
prcNum: this.$route.query.prcNum
|
|
}
|
|
}).then(res => {
|
|
// let blob = new Blob([res.data], {type: 'image/jpg'})
|
|
// let url = window.URL.createObjectURL(res.data)
|
|
this.processStep = window.URL.createObjectURL(res.data)
|
|
})
|
|
},
|
|
//转办事件
|
|
handleTransfer(){
|
|
this.drawerModal = true
|
|
this.drawerTitle = '转办处理人'
|
|
this.selectPeople = row
|
|
},
|
|
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(name) {
|
|
this.active = name;
|
|
},
|
|
typeChange(type) {
|
|
this.standardSearch.standType = type;
|
|
},
|
|
// 点击查看
|
|
handlePreview(item) {
|
|
let routeUrl = this.$router.resolve({
|
|
name: "OtherStandardDetails",
|
|
params: {
|
|
id: item.id,
|
|
pageType: "INLAND_STAND"
|
|
}
|
|
});
|
|
window.open(routeUrl.href, "_blank");
|
|
},
|
|
clearStandSearch() {
|
|
this.standardSearch = {
|
|
standType: "",
|
|
standNumber: ""
|
|
};
|
|
this.getStandData();
|
|
},
|
|
//标准查询按钮
|
|
getStandDataBtn(){
|
|
this.loading = true
|
|
this.pageNo = 1;
|
|
this.getStandData();
|
|
},
|
|
getStandData() {
|
|
this.$http.get("sarStandardsInfo/sar-standards-info/getSarStandardsInfoPage", {
|
|
standType: this.standardSearch.standType,
|
|
standNumber: this.standardSearch.standNumber,
|
|
page: this.pageNo,
|
|
pageSize: this.pageSizeNo
|
|
}, {
|
|
_this: this
|
|
}, res => {
|
|
this.standardData = res.data.list;
|
|
this.loading = false
|
|
this.standardData.forEach(item => {
|
|
this.$set(item, "ZCCSSRQ", item.zccssrq);
|
|
this.$set(item, "XCXSSRQ", item.xcxssrq);
|
|
})
|
|
this.totalNo = res.data.count;
|
|
}, e => {
|
|
});
|
|
},
|
|
//点击添加事件
|
|
addList() {
|
|
this.standModel = true;
|
|
this.loading = true
|
|
this.getStandDataBtn()
|
|
},
|
|
//添加标准select的改变
|
|
selectThree(data) {
|
|
this.standList = data;
|
|
},
|
|
//添加标准取消事件
|
|
cancelStand() {
|
|
this.standModel = false;
|
|
},
|
|
//添加标准确定事件
|
|
okStand() {
|
|
let _this = this;
|
|
if (this.standList.length < 1) {
|
|
_this.$message.warning("请选择需要添加进清单的数据");
|
|
} else {
|
|
_this.standList.map(item => {
|
|
let newStand = false;
|
|
for (let itemKey of _this.dataList) {
|
|
if (item.id == itemKey.id) {
|
|
newStand = true;
|
|
break;
|
|
}
|
|
}
|
|
if (newStand) {
|
|
_this.$message.warning("请勿重复添加数据");
|
|
} else {
|
|
_this.dataList.push(item);
|
|
}
|
|
});
|
|
this.standardData = []
|
|
_this.standModel = false;
|
|
}
|
|
},
|
|
// 点击批量删除事件
|
|
deleteList() {
|
|
if (this.selectList.length < 1) {
|
|
this.$message.warning("请选择一条数据进行删除");
|
|
} else {
|
|
this.$confirm("您确认删除这些数据?", "提示", {
|
|
confirmButtonText: "确认",
|
|
confirmButtonClass: "common-button-primary",
|
|
cancelButtonText: "取消",
|
|
type: "warning"
|
|
}).then(() => {
|
|
let exits = [];
|
|
this.selectList.map(item => {
|
|
let index;
|
|
index = this.dataList.findIndex(items => {
|
|
return items.id === item;
|
|
});
|
|
if (index > -1) {
|
|
this.dataList.splice(index, 1);
|
|
}
|
|
exits.push(item);
|
|
});
|
|
this.selectList = [];
|
|
}).catch(() => {
|
|
});
|
|
}
|
|
},
|
|
// 请求上传的文件信息
|
|
/* getFileInfo() {
|
|
this.$http.get("att/attFile/getMultiFileInfos", {
|
|
fileIds: this.fileIds
|
|
}, {
|
|
_this: this
|
|
}, res => {
|
|
this.$nextTick(() => {
|
|
res.data.map(item => {
|
|
// 赋值要回显的上传文件内容
|
|
this.fileList.push({
|
|
name: item.oldFileName,
|
|
uid: item.uid,
|
|
status: item.status,
|
|
id: item.id
|
|
});
|
|
});
|
|
});
|
|
}, e => {
|
|
});
|
|
},*/
|
|
/**
|
|
* @Description: 点击下载
|
|
*/
|
|
downloadFile(attId) {
|
|
if (attId != null && attId !== "") {
|
|
window.location.href = "/api/att/attFile/downloadFileForSar?fileId=" + attId;
|
|
} else {
|
|
this.$message.error("请选择要下载的文件");
|
|
}
|
|
},
|
|
downloadFileByWater(attId, fileSuffix) {
|
|
let fileExtension = fileSuffix.substring(fileSuffix.lastIndexOf(".") + 1);
|
|
if (fileExtension !== "pdf" && fileExtension !== "PDF") {
|
|
this.$message.error("水印下载仅支持PDF,pdf格式文件");
|
|
} else {
|
|
if (attId != null && attId !== "") {
|
|
window.location.href = "/api/att/attFile/downloadFileForSarWaterMark?fileId=" + attId;
|
|
} else {
|
|
this.$message.error("请选择要下载的文件");
|
|
}
|
|
}
|
|
},
|
|
// 删除上传的文件
|
|
delFileInfo (file, fileList) {
|
|
this.fileInfoList.forEach((item, index) => {
|
|
if (item.name === file.name || item.id === file.id ) {
|
|
this.fileInfoList.splice(index,1)
|
|
}
|
|
})
|
|
},
|
|
// 上传文件成功回调
|
|
uploadBackSuccess (res, file, fileList) {
|
|
if (res.ok) {
|
|
this.fileInfoList.push(res.data)
|
|
this.listForm.fileName = this.fileInfoList
|
|
this.$message.success('上传成功')
|
|
} else {
|
|
this.$message.error(res.message)
|
|
fileList.pop()
|
|
}
|
|
},
|
|
//上传之前的钩子
|
|
beforeUpload (file) {
|
|
var filename = file.name;
|
|
// this.listForm.fileName = this.listForm.fileName + ',' + file.name
|
|
var index1 = filename.lastIndexOf(".");
|
|
var index2 = filename.length;
|
|
var fileSuffix = filename.substring(index1, index2);
|
|
//把后缀转大写
|
|
if (fileSuffix !== undefined && fileSuffix !== null) {
|
|
fileSuffix = fileSuffix.toUpperCase();
|
|
}
|
|
// 判断上传文件格式
|
|
if (fileSuffix === ".PDF" || fileSuffix === ".DOC" || fileSuffix === ".DOCX" || fileSuffix === ".PPT"
|
|
|| fileSuffix === ".PPTX" || fileSuffix === ".XLS" || fileSuffix === ".XLSX"
|
|
|| fileSuffix === ".PNG" || fileSuffix === ".JPG" || fileSuffix === ".JPEG") {
|
|
return true;
|
|
} else {
|
|
this.$message.error("文件" + file.name + "格式不正确,请上传pdf、doc、docx、ppt、pptx、xls、xlsx、png、jpg、jpeg等文件");
|
|
return false;
|
|
}
|
|
// 判断文件上传大小
|
|
if (file.size / 1024 / 1024 > 300) {
|
|
this.$message.warning("文件" + file.name + "大小不能超过300M");
|
|
return false;
|
|
}
|
|
return true;
|
|
},
|
|
handleOnPreview(file) {
|
|
let attId = file.id
|
|
if (attId != null && attId !== "") {
|
|
window.location.href = "/api/att/attFile/downloadFileForSar?fileId=" + attId;
|
|
}
|
|
},
|
|
getData() {
|
|
return new Promise((resolve, reject) => {
|
|
inboundLiaisonDetail({
|
|
taskIds: this.taskIds,
|
|
pId: this.pId
|
|
}).then(res => {
|
|
if (res) {
|
|
const processForm = JSON.parse(res.mesg)
|
|
this.getFormFieldList(processForm)
|
|
}
|
|
}).catch(e => {
|
|
})
|
|
})
|
|
},
|
|
/**
|
|
* @description: 动态表单读取
|
|
*/
|
|
getFormFieldList (item) {
|
|
this.$nextTick(() => {
|
|
this.listForm = JSON.parse(JSON.stringify(item))
|
|
if(item.form === undefined){
|
|
this.listForm.prcNum = this.prcNum
|
|
this.listForm.prcName = this.prcName
|
|
this.listForm['id'] = item.id
|
|
this.listForm.dataList = item.dataList
|
|
this.dataList = item.dataList
|
|
this.listForm.applyUpdUserId = item.applyUpdUserId
|
|
this.listForm.jlUserId = item.jlUserId
|
|
this.listForm.zrUserId = item.zrUserId
|
|
this.fileInfoList = item.fileName
|
|
this.commentText = item.commentText
|
|
} else {
|
|
this.listForm = item.form
|
|
this.dataList = item.form.dataList
|
|
this.commentText = item.commentText
|
|
this.listForm.dataList = item.form.dataList
|
|
this.fileInfoList = item.form.fileName
|
|
}
|
|
})
|
|
},
|
|
//保存事件
|
|
handleSave() {
|
|
this.saveLoading = true;
|
|
let _formData = new FormData();
|
|
_formData.append("id", this.bpnId || "");
|
|
_formData.append("prcType", "4");
|
|
_formData.append('taskIds', this.taskIds)
|
|
_formData.append("json", JSON.stringify({
|
|
form: this.listForm,
|
|
commentText: this.commentText
|
|
}));
|
|
saveTaskForPub(_formData).then(res => {
|
|
this.saveLoading = false;
|
|
this.$message.success("保存成功");
|
|
this.bpnId = res.result;
|
|
}).catch(e => {
|
|
this.saveLoading = false;
|
|
});
|
|
},
|
|
//提交事件
|
|
handleSubmit() {
|
|
this.listForm.commentText = this.commentText
|
|
const json = JSON.stringify(this.listForm);
|
|
this.isSubmit = true
|
|
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')
|
|
}
|
|
this.isSubmit = false
|
|
});
|
|
},
|
|
//标准表格选择框改变
|
|
selectStandChange(data) {
|
|
this.selectList = [];
|
|
for (let i = 0; i < data.length; i++) {
|
|
this.selectList.push(data[i].id);
|
|
}
|
|
},
|
|
pageChange(page) {
|
|
this.page = page;
|
|
this.searchData();
|
|
},
|
|
pageSizeChange(pageSize) {
|
|
this.pageSize = pageSize;
|
|
this.searchData();
|
|
},
|
|
pageChangeNo(page){
|
|
this.pageNo = page
|
|
this.getStandData();
|
|
},
|
|
pageSizeChangeNo(pageSize){
|
|
this.pageSizeNo = pageSize;
|
|
this.getStandData();
|
|
|
|
},
|
|
// 将文本状态的id与name对应
|
|
setMap(data) {
|
|
data.forEach(item => {
|
|
this.$set(this.textStatusMap, item.value, item.label);
|
|
});
|
|
},
|
|
},
|
|
computed: {
|
|
listNoDataText () {
|
|
return this.processType === 1 ? '暂无待办流程' : '暂无已办流程'
|
|
}
|
|
},
|
|
mounted() {
|
|
//从数据库中查询下拉框数据
|
|
this.$http.get("sys/dictype/getDicTypeListCode", {}, {
|
|
_this: this
|
|
}, res => {
|
|
this.countryOptions = res.data.COUNTRY;
|
|
this.standStateOptions = res.data.WBZTCLASS; // 文本状态
|
|
this.setMap(this.standStateOptions);
|
|
});
|
|
this.getData();
|
|
this.processTable();
|
|
this.getStandData();
|
|
},
|
|
};
|
|
</script>
|
|
|
|
<style lang="less" scoped>
|
|
@import '~@/assets/styles/style';
|
|
|
|
.bzqdfb-step3 {
|
|
/deep/ .el-drawer__container {
|
|
.prc-content-border {
|
|
border: none;
|
|
padding: 0 20px 0;
|
|
}
|
|
}
|
|
p {
|
|
& > a {
|
|
cursor: pointer;
|
|
}
|
|
|
|
& > i {
|
|
display: inline-block;
|
|
margin-left: 3px;
|
|
width: 18px;
|
|
height: 16px;
|
|
background-repeat: no-repeat;
|
|
background-size: 100% 100%;
|
|
background-position: center center;
|
|
vertical-align: sub;
|
|
cursor: pointer;
|
|
}
|
|
|
|
.icon-download {
|
|
background-image: url("~assets/images/shangqi/img/download.png");
|
|
}
|
|
|
|
.icon-download2 {
|
|
background-image: url("~assets/images/shangqi/img/download2.png");
|
|
}
|
|
}
|
|
.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;
|
|
}
|
|
.table-height{
|
|
height: calc(~'100% - 65px');
|
|
overflow: auto;
|
|
}
|
|
}
|
|
</style>
|
|
|