Commit 6d126bb0 authored by 李苏's avatar 李苏 💬

重点任务指定执行人

parent b8261c8e
......@@ -64,6 +64,15 @@ export function doCancelPublish(query) {
})
}
export function apiZdzxr(query) {
return request({
url: '/aqgl/rcgl/zdgzrw/appointZxr',
method: 'post',
data: query||{}
})
}
......
<template>
<div class="min_full">
<Zdzxr :app='this' v-if="showDialog" />
<!-- 查询条件-->
<div class="search" v-condition>
<SearchButton :app='app'></SearchButton>
......@@ -46,7 +47,7 @@
</el-popover>
<el-button size='mini' @click.native="doCancelPublish()" type="primary">取消发布</el-button>
<!-- 表头设置 -->
<el-button size='mini' @click="zdzxr" type="primary">指定执行人</el-button>
<!-- 权限-->
</el-row>
<!-- 表格-->
......@@ -73,6 +74,7 @@
} from '@/api/daily/zdgzrw.js';
/* edit页面*/
import Edit from './edit'
import Zdzxr from './zdzxr.vue'
import {
tableMixin
} from 'common'
......@@ -92,9 +94,9 @@
visible:false,
/*需要的额外参数 */
showDialog: false,
DialogName: '',
DialogName: '指定执行人',
type: '',
DialogTitle: '',
DialogTitle: '指定执行人',
/* 基础url*/
baseUrl: '/aqgl/rcgl/zdgzrw',
/* 查询参数*/
......@@ -116,6 +118,15 @@
}
},
methods: {
zdzxr(){
debugger
if (this.app.selectOne || this.app.clickOne) {
this.showDialog=true
}else{
this.$warning('请选中一行操作');
}
},
doPublish(){
/* 发布调用*/
if (this.app.selectOne || this.app.clickOne) {
......@@ -202,7 +213,7 @@ doCancelPublish(){
}
},
components: {
Edit,
Edit,Zdzxr
}
......
<template>
<DefaultDialog :app='app'>
<div slot="form" style="">
<el-form slot="form" ref="form" :model="form" label-width="100px" :rules="rules">
<el-row :gutter="20" :app="this" class="editRow">
<el-col :span="24">
<el-form-item label="执行人" ref="zxrId" prop="zxrId">
<personSelector :label="form.zxrName||'暂无'" @selected='sbrSelected'></personSelector>
</el-form-item>
</el-col>
<!-- 额外数据 -->
</el-row>
</el-form>
</div>
<div slot="reFooter" class="refooter">
<span slot="footer" class="dialog-footer">
<el-button @click="app.showDialog=false">取 消</el-button>
<el-button type="primary" @click="save()">确 定</el-button>
</span>
</div>
</DefaultDialog>
</template>
<script>
import {
apiZdzxr
} from '@/api/daily/zdgzrw.js';
import {
editMixin,
} from 'common'
export default {
mixins: [editMixin],
props: {
app: {
type: Object,
default: () => {
return {}
}
}
},
async mounted() {
/* 初始化数据 */
this.$post('common/datetime', {}).then(res => {
let nowTime = res.data.data || new Date().getTime()
/* 初始赋值*/
this.nowTime = nowTime
// this.editColItemList[0].value=nowTime-24*60*60*1000
this.editColItemList[0].value = nowTime
this.loading = true
})
},
data() {
return {
form: {
zxrId:'',
zxrName:''
},
rules: {
zxrId: [{
required: true,
trigger: 'blur'
}, ]
}
}
},
methods: {
sbrSelected(row) {
this.form.zxrId = row.id
this.form.zxrName = row.username
},
save() {
this.$refs['form'].validate((valid) => {
if (valid) {
apiZdzxr({
id:this.app.singleItem.id,
zxrId:this.form.zxrId
}).then(res => {
if (res.success) {
this.$success('操作成功')
this.app.showDialog = false
this.app.$refs.TablePager.refresh()
}
}).finally(res => {
})
}
})
}
}
}
</script>
<style scoped>
</style>
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment