first commit
This commit is contained in:
@@ -0,0 +1,227 @@
|
||||
<!--#
|
||||
layout("/layouts/platform.html"){
|
||||
#-->
|
||||
<!--校工会立项结果-->
|
||||
<div id="app" v-cloak>
|
||||
<guava ref="guava">
|
||||
<syr-table :smm.sync="smm" auditval="提醒" ref="syrTable" request="/platfotm/syr/info/zqtx/pageData">
|
||||
<template slot="right">
|
||||
<el-button size="small" @click="openMany" type="primary"><i class="ti-plus"></i> 一键提醒</el-button>
|
||||
</template>
|
||||
<template slot="operation">
|
||||
<el-table-column label="操作" fixed="right" width="200px">
|
||||
<template slot-scope="{row}">
|
||||
<el-button size="mini" :type="row.state>60?null:'primary'"
|
||||
@click="openView(row,row.state>60)">
|
||||
{{row.state>60?'查看':'设置提醒'}}
|
||||
</el-button>
|
||||
<el-button size="mini" type="primary" v-if="row.state>60 && row.state<=70"
|
||||
@click="doRollBack(row)">
|
||||
撤回
|
||||
</el-button>
|
||||
</template>
|
||||
</el-table-column>
|
||||
</template>
|
||||
</syr-table>
|
||||
|
||||
<template #edit>
|
||||
<syr-info-new ref="auditInfo">
|
||||
<template slot="handle">
|
||||
<el-tab-pane label="中期提醒" name="zqtx">
|
||||
<el-form :model="formData" label-width="100px" ref="Form">
|
||||
<el-form-item label="提醒时间" prop="zqtbtxsj">
|
||||
<el-date-picker
|
||||
:picker-options="pickerOptions"
|
||||
default-time="12:00:00"
|
||||
placeholder="选择提醒时间"
|
||||
type="datetime"
|
||||
v-model="formData.zqtbtxsj"
|
||||
value-format="yyyy-MM-dd HH:mm:ss">
|
||||
</el-date-picker>
|
||||
</el-form-item>
|
||||
<el-form-item label="截止时间" prop="zqtbjzsj">
|
||||
<el-date-picker
|
||||
:picker-options="pickerOptions"
|
||||
default-time="12:00:00"
|
||||
placeholder="选择提醒时间"
|
||||
type="datetime"
|
||||
v-model="formData.zqtbjzsj"
|
||||
value-format="yyyy-MM-dd HH:mm:ss">
|
||||
</el-date-picker>
|
||||
</el-form-item>
|
||||
</el-form>
|
||||
<el-row class="mt20 text-center">
|
||||
<el-button @click="$refs.guava.index()">返 回</el-button>
|
||||
<el-button @click="doHandle(true)" type="primary">提 交</el-button>
|
||||
</el-row>
|
||||
</el-tab-pane>
|
||||
</template>
|
||||
</syr-info-new>
|
||||
</template>
|
||||
|
||||
<template #view>
|
||||
<syr-info-new ref="viewInfo"></syr-info-new>
|
||||
</template>
|
||||
</guava>
|
||||
|
||||
<el-dialog title="设置提醒" :visible.sync="manyDialogVisible">
|
||||
<el-form :model="formData" ref="Form" label-width="100px">
|
||||
<div style="display: flex">
|
||||
<el-form-item label="提醒时间" prop="zqtbtxsj" style="width: 50%">
|
||||
<el-date-picker
|
||||
v-model="formData.zqtbtxsj"
|
||||
value-format="yyyy-MM-dd HH:mm:ss"
|
||||
default-time="12:00:00"
|
||||
:picker-options="pickerOptions"
|
||||
type="datetime"
|
||||
placeholder="选择提醒时间">
|
||||
</el-date-picker>
|
||||
</el-form-item>
|
||||
<el-form-item label="截止时间" prop="zqtbjzsj" style="width: 50%">
|
||||
<el-date-picker
|
||||
v-model="formData.zqtbjzsj"
|
||||
value-format="yyyy-MM-dd HH:mm:ss"
|
||||
default-time="12:00:00"
|
||||
:picker-options="pickerOptions"
|
||||
type="datetime"
|
||||
placeholder="选择截止时间">
|
||||
</el-date-picker>
|
||||
</el-form-item>
|
||||
</div>
|
||||
</el-form>
|
||||
<el-table :data="noSetTableData" @selection-change="handleSelectionChange" max-height="350">
|
||||
<el-table-column type="selection" width="55"></el-table-column>
|
||||
<el-table-column prop="xmmc" label="项目名称" width="400" show-overflow-tooltip></el-table-column>
|
||||
<el-table-column prop="username" label="申报人"></el-table-column>
|
||||
</el-table>
|
||||
<el-row class="el-dialog__footer">
|
||||
<el-button @click="manyDialogVisible=false">取 消</el-button>
|
||||
<el-button type="primary" @click="doHandleMany(true)">提 交</el-button>
|
||||
</el-row>
|
||||
</el-dialog>
|
||||
</div>
|
||||
<script>
|
||||
let vue = new Vue({
|
||||
el: '#app',
|
||||
mixins: [initTableMixins],
|
||||
data() {
|
||||
return {
|
||||
smm: {
|
||||
status: 'table',
|
||||
rowsel: true
|
||||
},
|
||||
formData: {},
|
||||
handleShow: false,
|
||||
pickerOptions: {
|
||||
disabledDate(time) {
|
||||
return time.getTime() < Date.now()
|
||||
}
|
||||
},
|
||||
noSetTableData: [],
|
||||
tab_selection: [],
|
||||
selection: [],
|
||||
manyDialogVisible: false
|
||||
}
|
||||
},
|
||||
components: {
|
||||
'syr-table': httpVueLoader('/components/syr/syrtable.vue'),
|
||||
'syr-info': httpVueLoader('/components/syr/syrinfo.vue'),
|
||||
'sign': httpVueLoader('/components/sign/sign.vue?v=2.0.0'),
|
||||
'syr-info-new': httpVueLoader('/components/syr/SyrInfoNew.vue'),
|
||||
},
|
||||
methods: {
|
||||
openView(row, isView) {
|
||||
if (isView) {
|
||||
this.$refs.guava.view()
|
||||
this.$refs.viewInfo.openView(row.id)
|
||||
} else {
|
||||
// this.$refs.guava.edit()
|
||||
// this.$refs.auditInfo.openView(row.id, 'zqtx')
|
||||
// this.formData = {
|
||||
// id: row.id,
|
||||
// zqtbtxsj: '',
|
||||
// zqtbjzsj: ''
|
||||
// }
|
||||
this.openMany()
|
||||
}
|
||||
},
|
||||
async doHandle() {
|
||||
if (this.formData.zqtbtxsj === '') {
|
||||
this.$message.info('请设置提醒时间')
|
||||
return
|
||||
}
|
||||
if (this.formData.zqtbjzsj === '') {
|
||||
this.$message.info('请设置截止时间')
|
||||
return
|
||||
}
|
||||
if (this.formData.zqtbjzsj < this.formData.zqtbtxsj) {
|
||||
this.$message.info('截止时间不应该小于提醒时间')
|
||||
return
|
||||
}
|
||||
const resp = await $.post('/platfotm/syr/info/zqtx/doHandle', {data: JSON.stringify(this.formData)})
|
||||
if (resp.code === 0) {
|
||||
this.$refs.guava.index()
|
||||
this.notifySuccess(resp.msg)
|
||||
location.reload()
|
||||
}
|
||||
},
|
||||
async doRollBack(row){
|
||||
const resp = await $.get('/platfotm/syr/info/yjsh/doRollBack',{id:row.id,state:row.state})
|
||||
if (resp.code === 0){
|
||||
this.notifySuccess(resp.msg)
|
||||
this.$refs['syrTable'].doSearch()
|
||||
}
|
||||
},
|
||||
async openMany() {
|
||||
this.formData = {
|
||||
zqtbtxsj: '',
|
||||
zqtbjzsj: ''
|
||||
}
|
||||
const {data} = await $.get('/platfotm/syr/info/zqtx/noSetPageData', {})
|
||||
this.noSetTableData = data
|
||||
this.manyDialogVisible = true
|
||||
},
|
||||
async doHandleMany() {
|
||||
if (this.formData.zqtbtxsj === '') {
|
||||
this.$message.info('请设置提醒时间')
|
||||
return
|
||||
}
|
||||
if (this.formData.zqtbjzsj === '') {
|
||||
this.$message.info('请设置截止时间')
|
||||
return
|
||||
}
|
||||
if (this.formData.zqtbjzsj < this.formData.zqtbtxsj) {
|
||||
this.$message.info('截止时间不应该小于提醒时间')
|
||||
return
|
||||
}
|
||||
if (this.selection.length === 0) {
|
||||
this.$message.info('请勾选需要批量设置的数据')
|
||||
return
|
||||
}
|
||||
let p = []
|
||||
for (let o of this.selection) {
|
||||
//p.push(id:o.id,...this.formData})
|
||||
p.push({...{id: o.id}, ...this.formData})
|
||||
}
|
||||
await $.post('/platfotm/syr/info/zqtx/doHandle', {data: p})
|
||||
this.$refs['syrTable'].doSearch()
|
||||
this.manyDialogVisible = false
|
||||
this.selection = []
|
||||
this.tableShow = false
|
||||
setTimeout(() => {
|
||||
this.tableShow = true
|
||||
})
|
||||
|
||||
},
|
||||
handleSelectionChange(val) {
|
||||
this.selection = val
|
||||
}
|
||||
}
|
||||
})
|
||||
</script>
|
||||
|
||||
<!--#
|
||||
}
|
||||
#-->
|
||||
|
||||
|
||||
Reference in New Issue
Block a user