|
@@ -1,75 +1,95 @@
|
|
|
<template>
|
|
|
- <div>
|
|
|
- <div v-if="!store.state.pageOnlyRead" class="container normal-panel normal-margin">
|
|
|
- <el-button type="warning" size="small" icon="el-icon-s-claim" @click="onSubmit((res)=>tool.showMessage(res))">保 存
|
|
|
- </el-button>
|
|
|
- </div>
|
|
|
- <div style="overflow-x:hidden">
|
|
|
- <el-row :gutter="16">
|
|
|
- <el-col :span="13">
|
|
|
- <div class="container normal-panel normal-margin">
|
|
|
- <p class="normal-title normal-margin">提报设置</p>
|
|
|
- <el-row :gutter="16">
|
|
|
- <el-form ref="form" :model="form" :rules="rules" label-width="80px" label-position="left" size="small">
|
|
|
- <el-col :span="24">
|
|
|
- <el-form-item label="标题" prop="title">
|
|
|
- <el-input v-model="form.title" placeholder="标题"></el-input>
|
|
|
- </el-form-item>
|
|
|
- </el-col>
|
|
|
- <el-col :span="8">
|
|
|
- <el-form-item label="提报类型" prop="onceonly">
|
|
|
- <el-select v-model="form.onceonly" placeholder="选择提报类型">
|
|
|
- <el-option label="一事一报" :value="1"></el-option>
|
|
|
- <el-option label="一事多报" :value="0"></el-option>
|
|
|
- </el-select>
|
|
|
- </el-form-item>
|
|
|
- </el-col>
|
|
|
- <el-col :span="8">
|
|
|
- <el-form-item label="生效日期" prop="begdate">
|
|
|
- <el-date-picker style="width:100%" v-model="form.begdate" value-format="yyyy-MM-dd" type="date"
|
|
|
- placeholder="生效日期">
|
|
|
- </el-date-picker>
|
|
|
- </el-form-item>
|
|
|
- </el-col>
|
|
|
- <el-col :span="8">
|
|
|
- <el-form-item label="截止日期" prop="enddate">
|
|
|
- <el-date-picker style="width:100%" v-model="form.enddate" value-format="yyyy-MM-dd" type="date"
|
|
|
- placeholder="截止日期">
|
|
|
- </el-date-picker>
|
|
|
- </el-form-item>
|
|
|
- </el-col>
|
|
|
- <el-col :span="24">
|
|
|
- <el-form-item label="提报要求" prop="notes">
|
|
|
- <el-input v-model="form.notes" placeholder="提报要求"></el-input>
|
|
|
- </el-form-item>
|
|
|
- </el-col>
|
|
|
- <el-col :span="24">
|
|
|
- <el-form-item label="提报形式" prop="type">
|
|
|
- <el-checkbox-group v-model="form.type" @change="onCheckboxChange">
|
|
|
- <el-checkbox label="附件提报" name="isattrequired"></el-checkbox>
|
|
|
- <el-checkbox label="文字提报" name="istextrequired"></el-checkbox>
|
|
|
- </el-checkbox-group>
|
|
|
- <!-- <el-checkbox :true-label="1" :false-label="0" v-model="form.isattrequired">附件提报</el-checkbox>
|
|
|
- <el-checkbox :true-label="1" :false-label="0" v-model="form.istextrequired">文字提报</el-checkbox> -->
|
|
|
- </el-form-item>
|
|
|
- </el-col>
|
|
|
- </el-form>
|
|
|
- </el-row>
|
|
|
- </div>
|
|
|
- <div class="container normal-panel normal-margin">
|
|
|
- <attachmentList :attinfos="form.attinfos" @onSuccess="querySubmitMain" :onlyread="store.state.pageOnlyRead">
|
|
|
- <upload slot="upload" :folderid="folderid"
|
|
|
- :bindData="{ ownertable: 'sat_submiteditmodel', ownerid: form.sat_submiteditmodelid, usetype: 'default' }"
|
|
|
- @onSuccess="onSubmit()"></upload>
|
|
|
- </attachmentList>
|
|
|
- </div>
|
|
|
- </el-col>
|
|
|
- <el-col :span="11">
|
|
|
- <scopeOfauth :defaultData="defaultData" appidname="sat_submiteditmodelid" obiectName="sat_submiteditmodel" :dataid="$route.query.id"
|
|
|
- @onChecked="onChecked"></scopeOfauth>
|
|
|
- </el-col>
|
|
|
- </el-row>
|
|
|
- </div>
|
|
|
+ <div class="inline-16">
|
|
|
+ <el-button size="small" type="text" @click="onshow(drawer=true)">详情</el-button>
|
|
|
+ <el-drawer
|
|
|
+ title="编辑"
|
|
|
+ :visible.sync="drawer"
|
|
|
+ :with-header="false"
|
|
|
+ direction="rtl"
|
|
|
+ size="90%"
|
|
|
+ append-to-body
|
|
|
+ @close="onClose">
|
|
|
+ <div class="detail__panel">
|
|
|
+ <div class="container sticky">
|
|
|
+ <!-- <el-button v-show="save" type="warning" size="small" @click="onSubmit()" >保 存</el-button>-->
|
|
|
+ <el-button class="inline-16" type="primary" size="small" @click="onEdit()" >编 辑</el-button>
|
|
|
+ <release class="inline-16" v-if="edit" :data="form" @onSuccess="onSuccess"></release>
|
|
|
+<!-- <el-button class="inline-16" type="primary" plain v-if="edit" size="mini" @click="$router.push({path:'/submit_detail',query:{id:this.id}})">明 细</el-button>-->
|
|
|
+<!-- <p class="inline-16">编辑</p>-->
|
|
|
+<!-- <release class="inline-16" v-if="tool.checkAuth($route.name,'update') && edit" :data="form" @onSuccess="onSuccess"></release>
|
|
|
+ <topping class="inline-16" v-if="tool.checkAuth($route.name,'update') && edit" :data="form" @onSuccess="onSuccess"></topping>-->
|
|
|
+ </div>
|
|
|
+ <div >
|
|
|
+ <el-row :gutter="16">
|
|
|
+ <el-col :span="13">
|
|
|
+ <div class="container normal-panel normal-margin">
|
|
|
+ <p class="normal-title normal-margin">提报设置</p>
|
|
|
+ <el-row :gutter="16">
|
|
|
+ <el-form ref="form" :model="form" :rules="rules" label-width="80px" label-position="left" size="small" :disabled="edit">
|
|
|
+ <el-col :span="24">
|
|
|
+ <el-form-item label="标题" prop="title">
|
|
|
+ <el-input v-model="form.title" placeholder="标题"></el-input>
|
|
|
+ </el-form-item>
|
|
|
+ </el-col>
|
|
|
+ <el-col :span="8">
|
|
|
+ <el-form-item label="提报类型" prop="onceonly">
|
|
|
+ <el-select v-model="form.onceonly" placeholder="选择提报类型">
|
|
|
+ <el-option label="一事一报" :value="1"></el-option>
|
|
|
+ <el-option label="一事多报" :value="0"></el-option>
|
|
|
+ </el-select>
|
|
|
+ </el-form-item>
|
|
|
+ </el-col>
|
|
|
+ <el-col :span="8">
|
|
|
+ <el-form-item label="生效日期" prop="begdate">
|
|
|
+ <el-date-picker style="width:100%" v-model="form.begdate" value-format="yyyy-MM-dd" type="date"
|
|
|
+ placeholder="生效日期">
|
|
|
+ </el-date-picker>
|
|
|
+ </el-form-item>
|
|
|
+ </el-col>
|
|
|
+ <el-col :span="8">
|
|
|
+ <el-form-item label="截止日期" prop="enddate">
|
|
|
+ <el-date-picker style="width:100%" v-model="form.enddate" value-format="yyyy-MM-dd" type="date"
|
|
|
+ placeholder="截止日期">
|
|
|
+ </el-date-picker>
|
|
|
+ </el-form-item>
|
|
|
+ </el-col>
|
|
|
+ <el-col :span="24">
|
|
|
+ <el-form-item label="提报要求" prop="notes">
|
|
|
+ <el-input v-model="form.notes" placeholder="提报要求"></el-input>
|
|
|
+ </el-form-item>
|
|
|
+ </el-col>
|
|
|
+ <el-col :span="24">
|
|
|
+ <el-form-item label="提报形式" prop="type">
|
|
|
+ <el-checkbox-group v-model="form.type" @change="onCheckboxChange">
|
|
|
+ <el-checkbox label="附件提报" name="isattrequired"></el-checkbox>
|
|
|
+ <el-checkbox label="文字提报" name="istextrequired"></el-checkbox>
|
|
|
+ </el-checkbox-group>
|
|
|
+ </el-form-item>
|
|
|
+ </el-col>
|
|
|
+ </el-form>
|
|
|
+ </el-row>
|
|
|
+ </div>
|
|
|
+ <div class="container normal-panel normal-margin">
|
|
|
+ <attachmentList :attinfos="form.attinfos" @onSuccess="querySubmitMain" :onlyread="store.state.pageOnlyRead">
|
|
|
+ <upload slot="upload" :folderid="folderid"
|
|
|
+ :bindData="{ ownertable: 'sat_submiteditmodel', ownerid: form.sat_submiteditmodelid, usetype: 'default' }"
|
|
|
+ @onSuccess="onSubmit()"></upload>
|
|
|
+ </attachmentList>
|
|
|
+ </div>
|
|
|
+ </el-col>
|
|
|
+ <el-col :span="11" :onlyread="store.state.pageOnlyRead">
|
|
|
+ <scopeOfauth :defaultData="defaultData" appidname="sat_submiteditmodelid" obiectName="sat_submiteditmodel" :dataid="$route.query.id"
|
|
|
+ @onChecked="onChecked"></scopeOfauth>
|
|
|
+ </el-col>
|
|
|
+ </el-row>
|
|
|
+ </div>
|
|
|
+
|
|
|
+ </div>
|
|
|
+ <div class="fixed__btn__panel" >
|
|
|
+ <el-button size="small" @click="onCancel" class="normal-btn-width" v-show="save">取 消</el-button>
|
|
|
+ <el-button size="small" type="primary" @click="onSubmit" class="normal-btn-width" v-show="save">确 定</el-button>
|
|
|
+ </div>
|
|
|
+ </el-drawer>
|
|
|
</div>
|
|
|
</template>
|
|
|
|
|
@@ -78,15 +98,33 @@ import attachmentList from '@/components/attachment_list/index.vue'
|
|
|
import upload from '@/components/upload/hw_obs_upload.vue'
|
|
|
import scopeOfauth from '@/components/scopeOfAuthority/index.vue'
|
|
|
import store from '@/store'
|
|
|
+import release from './release'
|
|
|
export default {
|
|
|
+ props:["id"],
|
|
|
components: {
|
|
|
attachmentList,
|
|
|
upload,
|
|
|
- scopeOfauth
|
|
|
+ scopeOfauth,
|
|
|
+ release
|
|
|
},
|
|
|
data() {
|
|
|
+ var endDate = (rule, value, callback) => {
|
|
|
+ if (value === '') {
|
|
|
+ callback(new Error('截止日期不可为空'));
|
|
|
+ } else {
|
|
|
+ if (value !== '') {
|
|
|
+ if (this.form.begdate > this.form.enddate)
|
|
|
+ callback(new Error('截止日期不可小于生效日期'));
|
|
|
+ }
|
|
|
+ callback();
|
|
|
+ }
|
|
|
+ }
|
|
|
return {
|
|
|
store,
|
|
|
+ drawer:false,
|
|
|
+ edit:true,
|
|
|
+ save:false,
|
|
|
+ status:false,
|
|
|
folderid: JSON.parse(sessionStorage.getItem('folderid')).appfolderid,
|
|
|
defaultData: {},
|
|
|
rules: {
|
|
@@ -97,7 +135,7 @@ export default {
|
|
|
{ required: true, message: '请选择生效日期', trigger: 'change' }
|
|
|
],
|
|
|
enddate: [
|
|
|
- { required: true, message: '请选择截止日期', trigger: 'change' }
|
|
|
+ { required: true,validator: endDate, trigger: 'blur' }
|
|
|
],
|
|
|
onceonly: [
|
|
|
{ required: true, message: '请选择版块', trigger: 'change' }
|
|
@@ -125,29 +163,31 @@ export default {
|
|
|
methods: {
|
|
|
async querySubmitMain() {
|
|
|
const res = await this.$api.requested({
|
|
|
- "classname": "webmanage.saletool.submitedit.submitedit",
|
|
|
- "method": "select_submitdetailed",
|
|
|
+ "id":"20221102093902",
|
|
|
"content": {
|
|
|
- "sat_submiteditmodelid": this.$route.query.id
|
|
|
+ "sat_submiteditmodelid": this.id
|
|
|
}
|
|
|
})
|
|
|
+ console.log("获取数据")
|
|
|
+ console.log(res)
|
|
|
res.data.notes == '初始化数据' + JSON.parse(sessionStorage.getItem('active_account')).userid ? res.data.notes = '' : '';
|
|
|
this.form = Object.assign({}, this.form, res.data)
|
|
|
if (this.form.isattrequired === 1) { this.form.type.push('附件提报') }
|
|
|
if (this.form.istextrequired === 1) { this.form.type.push('文字提报') }
|
|
|
|
|
|
this.form.status !== '新建' ? store.state.pageOnlyRead = true : store.state.pageOnlyRead = false
|
|
|
+ this.status = true
|
|
|
},
|
|
|
- onSubmit(callback) {
|
|
|
+ onSubmit() {
|
|
|
this.$refs['form'].validate(async (valid) => {
|
|
|
if (!valid) return false;
|
|
|
const res = await this.$api.requested({
|
|
|
- "classname": "webmanage.saletool.submitedit.submitedit",
|
|
|
- "method": "insertorupdate",
|
|
|
+ "id":20221102093702,
|
|
|
"content": this.form
|
|
|
})
|
|
|
this.insertCoursewareauth()
|
|
|
- callback?callback(res):''
|
|
|
+ this.drawer = false
|
|
|
+ this.$emit("updateSuccess")
|
|
|
})
|
|
|
},
|
|
|
// 监听提报形式
|
|
@@ -163,8 +203,7 @@ export default {
|
|
|
// 新增授权范围
|
|
|
async insertCoursewareauth() {
|
|
|
const res = await this.$api.requested({
|
|
|
- "classname": "webmanage.saletool.submitedit.submiteditauth",
|
|
|
- "method": "insertOrUpdate",
|
|
|
+ "id":"20221102094302",
|
|
|
"content": this.authData
|
|
|
})
|
|
|
res.code === 0 ? this.$notify({
|
|
@@ -177,19 +216,37 @@ export default {
|
|
|
// 查询授权信息
|
|
|
async query_auth() {
|
|
|
const res = await this.$api.requested({
|
|
|
- "classname": "webmanage.saletool.submitedit.submiteditauth",
|
|
|
- "method": "selectAuth",
|
|
|
+ "id":'20221102094602',
|
|
|
"content": {
|
|
|
"sat_submiteditmodelid": this.$route.query.id,
|
|
|
}
|
|
|
})
|
|
|
this.defaultData = res.data
|
|
|
},
|
|
|
+ onshow(){
|
|
|
+ this.$router.replace({path:'submit_mag',query:{id:this.id}})
|
|
|
+ this.querySubmitMain()
|
|
|
+ this.query_auth()
|
|
|
+ },
|
|
|
+ onClose(){
|
|
|
+ this.drawer = false
|
|
|
+ this.$emit("updateSuccess")
|
|
|
+ },
|
|
|
+ onEdit(){
|
|
|
+ this.edit = false
|
|
|
+ this.save = true
|
|
|
+ },
|
|
|
+ onSuccess(){
|
|
|
+ this.querySubmitMain()
|
|
|
+ },
|
|
|
+ onCancel(){
|
|
|
+ this.edit = true
|
|
|
+ this.save = false
|
|
|
+ }
|
|
|
|
|
|
},
|
|
|
created() {
|
|
|
- this.querySubmitMain()
|
|
|
- this.query_auth()
|
|
|
+ this.status = false
|
|
|
},
|
|
|
}
|
|
|
|