feature(标准跟踪清单): 流程下发
This commit is contained in:
@@ -123,11 +123,6 @@ export default {
|
||||
FileList: [], // 用于回显
|
||||
}
|
||||
},
|
||||
watch: {
|
||||
ids (val) {
|
||||
this.initFileList()
|
||||
},
|
||||
},
|
||||
created () {
|
||||
this.initFileList()
|
||||
},
|
||||
|
||||
@@ -210,7 +210,7 @@ export default {
|
||||
<style scoped lang="less">
|
||||
.table{
|
||||
/deep/ .el-date-editor.el-input, .el-date-editor.el-input__inner {
|
||||
width: 145px !important;
|
||||
width: 130px !important;
|
||||
}
|
||||
}
|
||||
</style>
|
||||
|
||||
@@ -8,6 +8,7 @@
|
||||
>
|
||||
<div class="drawer-content">
|
||||
<el-form
|
||||
v-if="reloadForm"
|
||||
ref="form"
|
||||
:model="form"
|
||||
:rules="rules"
|
||||
@@ -22,6 +23,7 @@
|
||||
label="核查清单名称"
|
||||
/>
|
||||
<UploadFormItem
|
||||
v-if="reloadForm"
|
||||
label="模板"
|
||||
:ids.sync="form.checklistTemplate"
|
||||
:names.sync="form.checklistTemplateName"
|
||||
@@ -143,6 +145,7 @@ export default {
|
||||
getById: 'standardTrackingCheckList/getById',
|
||||
},
|
||||
loading: false,
|
||||
reloadForm: true,
|
||||
}
|
||||
},
|
||||
methods: {
|
||||
@@ -154,9 +157,13 @@ export default {
|
||||
// this.form = JSON.parse(JSON.stringify(this.initForm))
|
||||
Object.keys(this.initForm).forEach(key => this.form[key] = this.initForm[key])
|
||||
this.roleForm = JSON.parse(JSON.stringify(this.initRoleForm))
|
||||
this.reloadForm = false
|
||||
this.$nextTick(() => {
|
||||
this.$refs.form.clearValidate()
|
||||
this.$refs['roleForm'].$refs['userForm'].clearValidate()
|
||||
this.reloadForm = true
|
||||
this.$nextTick(() => {
|
||||
this.$refs.form.clearValidate()
|
||||
this.$refs['roleForm'].$refs['userForm'].clearValidate()
|
||||
})
|
||||
})
|
||||
this.showDrawer = true
|
||||
},
|
||||
@@ -168,6 +175,10 @@ export default {
|
||||
if (res.ok) {
|
||||
this.form = res.data
|
||||
this.roleForm = res.data.roleForm
|
||||
this.reloadForm = false
|
||||
this.$nextTick(() => {
|
||||
this.reloadForm = true
|
||||
})
|
||||
}
|
||||
})
|
||||
},
|
||||
|
||||
@@ -139,7 +139,11 @@
|
||||
label="创建人"
|
||||
align="center"
|
||||
sortable="custom"
|
||||
/>
|
||||
>
|
||||
<template slot-scope="{row}">
|
||||
{{ row.createUserName }}({{ row.createUserId }})
|
||||
</template>
|
||||
</el-table-column>
|
||||
<el-table-column
|
||||
prop="modifyTime"
|
||||
label="更新时间"
|
||||
@@ -189,10 +193,28 @@
|
||||
<ImportZip :visible.sync="importModalShowFlag" :action="url.importExcelUrl" @onSuccess="getData" />
|
||||
<!-- 导出 -->
|
||||
<ExportDialog ref="exportDialogRef" @exportName="handleExport" />
|
||||
<el-dialog title="流程下发" :visible="visible" width="600px">
|
||||
<el-dialog title="流程下发" :visible.sync="visible" width="600px" class="processDistributionForm">
|
||||
<el-form
|
||||
ref="processDistributionRef"
|
||||
:model="processDistributionForm"
|
||||
:rules="processDistributionRules"
|
||||
label-width="200px"
|
||||
label-position="left"
|
||||
>
|
||||
<DatePickerFormItem
|
||||
v-model="processDistributionForm.processDeadline"
|
||||
label="流程截止时间"
|
||||
prop="processDeadline"
|
||||
/>
|
||||
<DatePickerFormItem
|
||||
v-model="processDistributionForm.feedbackDeadline"
|
||||
label="责任单位意见反馈截止时间"
|
||||
prop="feedbackDeadline"
|
||||
/>
|
||||
</el-form>
|
||||
<div slot="footer">
|
||||
<el-button size="small" @click="">取消</el-button>
|
||||
<el-button size="small" type="primary" @click="">确定</el-button>
|
||||
<el-button size="small" :loading="processDistributionLoading" @click="visible = false">取消</el-button>
|
||||
<el-button size="small" type="primary" :loading="processDistributionLoading" @click="handleProcessDistribution">确定</el-button>
|
||||
</div>
|
||||
</el-dialog>
|
||||
</div>
|
||||
@@ -202,6 +224,7 @@
|
||||
import addModel from './addModel'
|
||||
import ImportZip from '@/components/hzwlComponents/importZip'
|
||||
import ExportDialog from '@/components/hzwlComponents/exportDialog'
|
||||
import DatePickerFormItem from '@/components/hzwlComponents/DatePickerFormItem'
|
||||
|
||||
export default {
|
||||
name: 'StandardTrackingList',
|
||||
@@ -209,6 +232,7 @@ export default {
|
||||
addModel,
|
||||
ImportZip,
|
||||
ExportDialog,
|
||||
DatePickerFormItem,
|
||||
},
|
||||
data () {
|
||||
const searchForm = {
|
||||
@@ -219,6 +243,19 @@ export default {
|
||||
pageSize: this.$store.getters.userInfo.configContent,
|
||||
total: 0,
|
||||
}
|
||||
const processDistributionForm = {
|
||||
trackingChecklistId: '',
|
||||
processDeadline: '',
|
||||
feedbackDeadline: '',
|
||||
}
|
||||
const processDistributionRules = {
|
||||
processDeadline: [
|
||||
{ required: true, message: '流程截止时间不能为空', trigger: 'change' }
|
||||
],
|
||||
feedbackDeadline: [
|
||||
{ required: true, message: '责任单位意见反馈截止时间不能为空', trigger: 'change' }
|
||||
],
|
||||
}
|
||||
return {
|
||||
searchForm,
|
||||
initSearchForm: JSON.parse(JSON.stringify(searchForm)),
|
||||
@@ -232,12 +269,16 @@ export default {
|
||||
exportTemplateFile: 'api/standardTrackingCheckList/exportTemplateFile',
|
||||
importExcelUrl: 'api/standardTrackingCheckList/importTrackingChecklist',
|
||||
exportTrackingChecklist: 'api/standardTrackingCheckList/exportTrackingChecklist',
|
||||
processDistribution: 'standardTrackingCheckList/processDistribution'
|
||||
},
|
||||
data: [],
|
||||
selectedList: [],
|
||||
// 导入
|
||||
importModalShowFlag: false,
|
||||
visible: false,
|
||||
processDistributionForm,
|
||||
processDistributionRules,
|
||||
processDistributionLoading: false,
|
||||
}
|
||||
},
|
||||
created () {
|
||||
@@ -352,6 +393,31 @@ export default {
|
||||
if (this.selectedList.length === 0) {
|
||||
return this.$message.warning('请选择要下发的数据')
|
||||
}
|
||||
this.visible = true
|
||||
Object.keys(this.processDistributionForm).forEach(key => {
|
||||
this.processDistributionForm[key] = ''
|
||||
})
|
||||
this.$nextTick(() => {
|
||||
// this.$refs.processDistributionRef.resetFields()
|
||||
this.$refs.processDistributionRef.clearValidate()
|
||||
})
|
||||
},
|
||||
handleProcessDistribution () {
|
||||
this.$refs.processDistributionRef.validate(valid => {
|
||||
if (valid) {
|
||||
this.processDistributionForm.trackingChecklistId = this.selectedList.join(',')
|
||||
const config = { _this: this, loading: 'processDistributionLoading' }
|
||||
this.$http._post(this.url.processDistribution, this.processDistributionForm, config).then(res => {
|
||||
if (res.ok) {
|
||||
this.$message.success(res.message)
|
||||
this.visible = false
|
||||
this.getData()
|
||||
} else {
|
||||
this.$message.warning(res.message)
|
||||
}
|
||||
})
|
||||
}
|
||||
})
|
||||
}
|
||||
}
|
||||
}
|
||||
@@ -376,4 +442,29 @@ export default {
|
||||
.container {
|
||||
flex: 1;
|
||||
}
|
||||
|
||||
.processDistributionForm {
|
||||
/deep/ .el-form-item{
|
||||
margin-bottom: 10px;
|
||||
color: #666;
|
||||
.el-form-item__label {
|
||||
line-height: 50px;
|
||||
}
|
||||
.el-form-item__content{
|
||||
line-height: 50px;
|
||||
}
|
||||
.el-input__inner{
|
||||
border: none;
|
||||
}
|
||||
.el-date-editor.el-input, .el-date-editor.el-input__inner {
|
||||
width: 100%;
|
||||
}
|
||||
.el-input__inner{
|
||||
color: #666 !important;
|
||||
}
|
||||
}
|
||||
.form-item-first {
|
||||
|
||||
}
|
||||
}
|
||||
</style>
|
||||
|
||||
Reference in New Issue
Block a user