@@ -77,8 +88,8 @@ export default {
processStep: null,
// 当前节点
taskKey: 0,
- // 当前流程类型(1待办/2已办)
- processType: 1,
+ // 当前流程类型
+ prcType: '',
// 流程列表
detailData: [],
taskNames: '',
@@ -90,10 +101,93 @@ export default {
shunxu: '',
paixu: '',
checkIds: [],
- checkList: []
+ checkList: [],
+ tabsName:'',
+
}
},
methods: {
+ exportStandard (){
+ let exportName=''
+ let pramas={prcNum: this.$route.query.prcNum,
+ sortWord: this.shunxu ? this.paixu : '',
+ shunxu: this.shunxu,
+ exportName: exportName}
+ this.processTypeList.some(item=>{
+ if(item.value == this.prcType){
+ exportName=item.label
+ }
+ })
+ this.$api.process.exportStandard(pramas,data=>{
+ const disposition = data.headers['content-disposition'];
+ let fileName = disposition.substring(disposition.indexOf('fileName=') + 9, disposition.length);
+ var userAgent = navigator.userAgent; //取得浏览器的userAgent字符串
+ var isOpera = userAgent.indexOf("Opera") > -1;
+ //判断是否IE浏览器
+ if (userAgent.indexOf("compatible") > -1 && userAgent.indexOf("MSIE") > -1 && !isOpera) {
+ fileName = decodeUtf8(fileName)
+ } else {
+ // iso8859-1的字符转换成中文
+ fileName = decodeURI(escape(fileName));
+ // 去掉双引号
+ fileName = fileName.replace(/\"/g, "");
+ }
+ // console.log(fileName, 666)
+ function decodeUtf8(bytes) {
+ var encoded = "";
+ for (var i = 0; i < bytes.length; i++) {
+ encoded += '%' + bytes[i].toString(16);
+ }
+ return decodeURIComponent(encoded);
+ }
+ if (!data.data || data.data.size === 0) {
+ this.$message.warning("文件下载失败")
+ return
+ }
+ if (typeof window.navigator.msSaveBlob !== 'undefined') {
+ window.navigator.msSaveBlob(new Blob([data.data], {type: 'application/zip'}), fileName)
+ } else {
+ let url = window.URL.createObjectURL(new Blob([data.data], {type: 'application/zip'}))
+ let link = document.createElement('a')
+ link.style.display = 'none'
+ link.href = url
+ link.setAttribute('download', fileName)
+ document.body.appendChild(link)
+ link.click()
+ document.body.removeChild(link) //下载完成移除元素
+ window.URL.revokeObjectURL(url) //释放掉blob对象
+ }
+ })
+ },
+ urgeRow (){
+ if (this.checkList.length === 1 && !this.checkList[0].endTime) {
+ this.$confirm('您确认要催办该任务吗', '提示', {
+ confirmButtonText: '确定',
+ cancelButtonText: '取消',
+ type: 'warning',
+ confirmButtonClass: 'common-button-primary',
+
+ }).then(() => {
+ this.urge(this.checkList[0])
+ })
+ } else {
+ this.$message.warning('请选择一条未完成的数据')
+ }
+ },
+ urge (row) {
+ let params= {
+ msgContent: '流程编号为' + row.prcNum + '的流程,请尽快办理。',
+ msgTitle: '流程编号' + row.prcNum,
+ userId: row.assigneeId,
+ msgType: 'TEXT'
+ }
+ this.$api.process.urgePerson(params,
+ res => {
+ this.processTable()
+ this.$message.success('催办成功')
+ }, e => {
+ })
+ },
selectAllEvent ({ checked }) {
const records = this.$refs.xTable.getCheckboxRecords()
this.checkIds = records.map(item => {
@@ -126,14 +220,9 @@ export default {
}
},
back () {
- this.$router.push({
- path: '/userCenter/processCenter',
- query: {
- id:'AEHJB8YNJ3',
- tabsName: "fourth"
- }
- })
+ this.$store.commit('setActiveTabIndex',this.tabsName=='AlreadyProcess'?"third":"fourth" )
//要返回上一级
+ this.$router.back(-1)
},
// 请求转换流程图
processNum (row) {
@@ -173,6 +262,8 @@ export default {
},
props: {},
mounted () {
+ this.tabsName=this.$route.query.tabsName
+ this.prcType=this.$route.query.prcType
this.processNum()
this.processTable()
}
@@ -231,6 +322,9 @@ export default {
justify-content: center;
align-items: center;
}
+ .alreadbtn{
+ display: flex;
+ }
}
.back{
width: 45px;
diff --git a/src/views/userCenter/processCenter/sentProcess.vue b/src/views/userCenter/processCenter/sentProcess.vue
index 3d588b6..ca121cd 100644
--- a/src/views/userCenter/processCenter/sentProcess.vue
+++ b/src/views/userCenter/processCenter/sentProcess.vue
@@ -10,7 +10,11 @@
-
+
+
+ {{prcName}}
+
+
@@ -22,7 +26,7 @@
-
+
查看
@@ -67,6 +71,35 @@ export default {
this.loadData()
},
methods: {
+ viewDetails(row) {
+ const prcType = row.prcType
+ console.log(prcType);
+ this.loading = true
+ this.$api.getAlreadData({taskIds:row.taskIds})
+ .then(res=>{
+ switch (prcType) {
+ case '1':
+ res.isViewDetails = 1
+ res.prcType = prcType
+ res.prcNum = row.prcNum
+ if (res.taskDefinitionKey == 'aid1' ||
+ res.taskDefinitionKey == 'aid4' ) {
+ this.$router.push({
+ path: '/permission/launch',
+ query: res,
+ })
+ return
+ }
+ else{
+ this.$router.push({
+ path: '/permission/examine',
+ query: res,
+ })
+ }
+ }
+ })
+
+ },
//撤回
withdraw(row){
this.$confirm('确认强制撤回该条数据?', '强制撤回', {
@@ -105,8 +138,16 @@ export default {
this.q.current = val;
this.loadData();
},
- view() {
- alert(111);
+ view(row) {
+ this.$router.push({
+ path: 'monitorViews',
+ query: {
+ id: this.$route.query.id,
+ prcNum: row.prcNum,
+ prcType: row.prcType,
+ tabsName: 'AlreadyProcess'
+ }
+ })
},
back(index, tableData) {
console.log('index', index);
diff --git a/src/views/userCenter/processCenter/tabs.vue b/src/views/userCenter/processCenter/tabs.vue
index de9f011..d46b67a 100644
--- a/src/views/userCenter/processCenter/tabs.vue
+++ b/src/views/userCenter/processCenter/tabs.vue
@@ -45,19 +45,18 @@ export default {
created () {
},
mounted () {
- let tabName=this.$route.query.tabsName?this.$route.query.tabsName:'first'
- this.activeName=tabName
+ this.activeName=this.$store.getters.activeTab ?this.$store.getters.activeTab:'first'
},
methods: {
handleClick(tab, event) {
this.$router.push({
path: '/userCenter/processCenter',
query: {
- id:'AEHJB8YNJ3',
- tabsName: this.activeName
+ id:'AEHJB8YNJ3'
}
})
this.$emit('clearForm')
+ this.$store.commit('setActiveTabIndex','')
}
}
}