7b9ffcde by 蔡俊立

代码优化

1 parent eb5bf84b
......@@ -155,3 +155,12 @@ export function stopTask (data) {
data
})
}
// 获取用户任务权限
export function judgeUserTaskPermission (params) {
return request({
url: SERVER.SERVERAPI + '/rest/business/workFlow/judgeUserTaskPermission',
method: 'get',
params
})
}
......
......@@ -6,6 +6,8 @@
</div>
<div class="invalid-reson">终止原因:</div>
<el-input v-model="stopMessage" placeholder="请输入终止原因" type="textarea" :rows="4"></el-input>
<el-button style="float:right">取消</el-button>
<el-button type="primary" @click="onSubmit" style="float:right">退件</el-button>
</div>
</template>
......@@ -24,7 +26,7 @@ export default {
}
},
methods: {
childFn () {
onSubmit () {
stopTask({
bsmSlsq: this.formData.bsmSlsq,
bestepid: this.formData.bestepid,
......@@ -32,8 +34,7 @@ export default {
}).then(res => {
this.$message.success('终止成功')
setTimeout(() => {
window.opener = null;
window.open("about:blank", "_self");
window.opener.location.reload(); //刷新父窗口
window.close();
this.$emit('input', false)
}, 1000);
......
......@@ -15,6 +15,10 @@
<el-form-item label="退回意见:">
<el-input class="textArea" type="textarea" v-model="outstepopinion"></el-input>
</el-form-item>
<el-form-item>
<el-button style="float:right">取消</el-button>
<el-button type="primary" @click="onSubmit" style="float:right">退回</el-button>
</el-form-item>
</el-form>
</div>
</div>
......@@ -41,7 +45,7 @@ export default {
this.getBackNode();
},
methods: {
childFn () {
onSubmit () {
this.selectItem.outstepopinion = this.outstepopinion;
sendBackTask({
bsmSlsq: this.formData.bsmSlsq,
......@@ -49,8 +53,7 @@ export default {
}).then(res => {
this.$message.success('退回成功')
setTimeout(() => {
window.opener = null;
window.open("about:blank", "_self");
window.opener.location.reload(); //刷新父窗口
window.close();
this.$emit('input', false)
}, 1000);
......
......@@ -138,7 +138,7 @@ export default {
popupDialog("退回", "workflow/components/th", {
bsmSlsq: this.bsmSlsq,
bestepid: this.bestepid
}, '30%', "200px", true)
}, '800px')
break;
case "transfer": //转件按钮
getNextLinkInfo({
......@@ -158,7 +158,7 @@ export default {
popupDialog("终止", "workflow/components/stop", {
bsmSlsq: this.bsmSlsq,
bestepid: this.bestepid,
}, '30%', "330px", true)
}, '600px')
break;
case "signout":
window.close();
......
......@@ -20,6 +20,15 @@ export default {
},
//切换选项卡内容组件
getFromRouter (tabname) {
//根据tabname获取选中的表单
for(let item of this.tabList){
if(item.value === tabname){
this.currentSelectTab = item
break;
}
}
console.log(this.currentSelectTab);
this.componentTag = getForm(tabname, this.$route.query.sqywbm);
}
}
......
......@@ -100,6 +100,8 @@ export default {
bestepid: this.$route.query.bestepid,
//设置那个表单选中
tabName: "",
//设置那个表单选择
currentSelectTab: {},
//表单集合
tabList: [],
//选择加载哪一个组件
......
......@@ -74,6 +74,7 @@ import table from "@/utils/mixin/table"
import searchMin from "../components/mixin/index"
import { datas, sendThis } from "./dbxdata"
import { searchTaskToDo, deleteFlow, claimTask } from "@/api/ywbl"
import { judgeUserTaskPermission } from "@/api/fqsq"
export default {
name: "dbx",
components: { searchBox },
......@@ -169,11 +170,29 @@ export default {
})
},
ywhClick (item) {
// const { href } = this.$router.resolve('/workFrame?bsmSlsq=' + item.bsmSlsq + '&bestepid=' + item.bestepid + '&bsmBusiness=' + '&sqywbm=' + item.djywbm);
const { href } = this.$router.resolve('/workFramecs?bsmSlsq=' + item.bsmSlsq + '&bestepid=' + item.bestepid + '&bsmBusiness=' + '&sqywbm=' + item.djywbm);
window.open(href, '_blank');
//从待办箱进入的调取任务领取接口
claimTask(item.bsmSlsq, item.bestepid)
//判断用户是否拥有该任务的权限,若有则跳转,无权限则给予提示并刷新页面
judgeUserTaskPermission({
bsmSlsq: item.bsmSlsq,
bestepid: item.bestepid
}).then(res => {
if(res.code == 200){
if(res.result){
//有任务权限
// const { href } = this.$router.resolve('/workFrame?bsmSlsq=' + item.bsmSlsq + '&bestepid=' + item.bestepid + '&bsmBusiness=' + '&sqywbm=' + item.djywbm);
const { href } = this.$router.resolve('/workFramecs?bsmSlsq=' + item.bsmSlsq + '&bestepid=' + item.bestepid + '&bsmBusiness=' + '&sqywbm=' + item.djywbm);
window.open(href, '_blank');
//从待办箱进入的调取任务领取接口
claimTask(item.bsmSlsq, item.bestepid)
}else{
//无任务权限
this.$message.error("无该任务操作权限,或已被他人抢办,请重新操作")
//刷新页面
this.queryClick();
}
}else{
this.$message.error("用户任务权限判断失败,请联系管理员")
}
})
}
}
}
......
......@@ -165,7 +165,7 @@
<el-row :gutter="10">
<el-col>
<el-form-item :class="flag ? 'marginBot0' : ''" label="附记:" prop="fj">
<el-input type="textarea" v-model="ruleForm.nydsyq.fj" :disabled="$route.query.viewtype == 1"></el-input>
<el-input type="textarea" v-model="ruleForm.nydsyq.fj" :disabled="$route.query.viewtype"></el-input>
</el-form-item>
</el-col>
</el-row>
......@@ -176,7 +176,7 @@
<el-row :gutter="10">
<el-col :span="14">
<el-form-item :class="flag ? 'marginBot0' : ''" label="共有方式:">
<el-radio-group :disabled="$route.query.viewtype == 1" v-model="ruleForm.slywxx.gyfs">
<el-radio-group v-model="ruleForm.slywxx.gyfs" :disabled="$route.query.viewtype">
<el-radio label="0">单独所有</el-radio>
<el-radio label="1">共同共有</el-radio>
<el-radio label="2">按份所有</el-radio>
......@@ -216,14 +216,14 @@
<el-row :gutter="10">
<el-col>
<el-form-item :class="flag ? 'marginBot0' : ''" label="登记原因:" prop="djyy">
<el-input class="textArea" type="textarea" :disabled="$route.query.viewtype == 1"
<el-input class="textArea" type="textarea" :disabled="$route.query.viewtype"
v-model="ruleForm.nydsyq.djyy">
</el-input>
</el-form-item>
</el-col>
</el-row>
</div>
<el-row class="btn" v-if="!$route.query.viewtype">
<el-row class="btn" v-if="!$route.query.viewtype && ableOperation">
<el-form-item :class="flag ? 'marginBot0' : ''">
<el-button type="primary" @click="onSubmit">保存</el-button>
</el-form-item>
......@@ -238,6 +238,7 @@ import qlrCommonTable from "@/views/workflow/components/qlrCommonTable"
import JtcyTable from "@/views/workflow/components/JtcyTable"
export default {
created () {
this.ableOperation = this.$parent.currentSelectTab.ableOperation
this.propsParam = this.$attrs;
var formdata = new FormData();
formdata.append("bsmSldy", this.propsParam.bsmSldy);
......@@ -261,10 +262,13 @@ export default {
data () {
return {
disabled: true,
//持证人选项
czrOptions: [],
ruleForm: {},
//传递参数
propsParam: {},
//表单是否可操作
ableOperation: true,
rules: {}
}
},
......