|
@@ -4,11 +4,11 @@
|
|
|
<el-dialog :title="title" :visible.sync="dialogVisible" width="500px" :before-close="handleClose"
|
|
|
:close-on-click-modal="false">
|
|
|
<el-form :model="form" status-icon :rules="rules" ref="form" label-width="120px" class="demo-ruleForm">
|
|
|
- <el-form-item label="任务名称:" prop="name" >
|
|
|
- <el-input v-model="form.name" placeholder="请输入任务名称" :disabled="form.id?true:false"></el-input>
|
|
|
+ <el-form-item label="任务名称:" prop="name">
|
|
|
+ <el-input v-model="form.name" placeholder="请输入任务名称" :disabled="form.id ? true : false"></el-input>
|
|
|
</el-form-item>
|
|
|
<el-form-item label="任务流程:" prop="processId">
|
|
|
- <el-select v-model="form.processId" placeholder="请选择流程" style="width: 100%;" :disabled="form.id?true:false">
|
|
|
+ <el-select v-model="form.processId" placeholder="请选择流程" style="width: 100%;" :disabled="form.id ? true : false">
|
|
|
<el-option v-for="item in pathOptions" :key="item.value" :label="item.label" :value="item.value">
|
|
|
</el-option>
|
|
|
</el-select>
|
|
@@ -21,8 +21,8 @@
|
|
|
</el-select>
|
|
|
</el-form-item>
|
|
|
<el-form-item label="截止时间:" prop="deadLineTime">
|
|
|
- <el-date-picker style="width: 100%" v-model="form.deadLineTime" type="datetime" value-format="yyyy-MM-dd HH:mm:ss"
|
|
|
- placeholder="请选择截止日期时间">
|
|
|
+ <el-date-picker style="width: 100%" v-model="form.deadLineTime" type="datetime"
|
|
|
+ value-format="yyyy-MM-dd HH:mm:ss" placeholder="请选择截止日期时间">
|
|
|
</el-date-picker>
|
|
|
</el-form-item>
|
|
|
<el-form-item label="备注:">
|
|
@@ -39,9 +39,9 @@
|
|
|
</template>
|
|
|
|
|
|
<script>
|
|
|
-import { personnelLoading ,optionsData} from '../mixins/index2'
|
|
|
+import { personnelLoading, optionsData } from '../mixins/index2'
|
|
|
export default {
|
|
|
- mixins: [personnelLoading,optionsData],
|
|
|
+ mixins: [personnelLoading, optionsData],
|
|
|
components: {},
|
|
|
props: ['id'],
|
|
|
data() {
|
|
@@ -68,18 +68,18 @@ export default {
|
|
|
async open(data) {
|
|
|
if (data.type == 6 || data.type == 5) {//文件分配任务//文件分配审核任务
|
|
|
if (data.type == 6) {
|
|
|
- this.title='编辑文件分配任务'
|
|
|
+ this.title = '编辑文件分配任务'
|
|
|
} else {
|
|
|
- this.title='编辑文件分配审核任务'
|
|
|
+ this.title = '编辑文件分配审核任务'
|
|
|
}
|
|
|
this.form = JSON.parse(JSON.stringify(data))
|
|
|
- // 负责人
|
|
|
+ // 负责人
|
|
|
if (this.form.handler) {
|
|
|
this.personnelList.queryParams.id = this.form.handler
|
|
|
await this.getPermissionPersonnel(1)
|
|
|
this.personnelList.queryParams.id = null
|
|
|
}
|
|
|
- }else {//创建分配任务
|
|
|
+ } else {//创建分配任务
|
|
|
this.title = '创建文件分配任务'
|
|
|
this.form.projectId = this.id//项目id
|
|
|
this.form.type = 6//分配任务
|
|
@@ -98,20 +98,25 @@ export default {
|
|
|
clear() {
|
|
|
this.personnelList.data = []
|
|
|
this.personnelList.queryParams.current = 1
|
|
|
- this.personnelList.queryParams.total=0
|
|
|
+ this.personnelList.queryParams.total = 0
|
|
|
this.personnelList.queryParams.name = null
|
|
|
},
|
|
|
//提交数据
|
|
|
submit() {
|
|
|
this.$refs.form.validate((valid) => {
|
|
|
if (valid) {
|
|
|
- this.$api.addTask(this.form).then(res => {
|
|
|
- if (res.code == 200) {
|
|
|
- this.$message.success('创建文件分配任务成功')
|
|
|
- this.$emit('isCreate','新增成功')
|
|
|
- this.handleClose()
|
|
|
- }
|
|
|
- })
|
|
|
+ if (!this.form.id) {//新增分配任务
|
|
|
+ this.$api.addTask(this.form).then(res => {
|
|
|
+ if (res.code == 200) {
|
|
|
+ this.$message.success('创建文件分配任务成功')
|
|
|
+ this.$emit('isCreate', '新增成功')
|
|
|
+ this.handleClose()
|
|
|
+ }
|
|
|
+ })
|
|
|
+ } else {
|
|
|
+
|
|
|
+ }
|
|
|
+
|
|
|
} else {
|
|
|
this.$message.error('信息未输入完整')
|
|
|
}
|