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