|
@@ -1,7 +1,8 @@
|
|
|
<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" style="background:#FA8C16" @click="onSubmit">保 存</el-button>
|
|
|
+ <el-button type="warning" size="small" icon="el-icon-s-claim" style="background:#FA8C16" @click="onSubmit">保 存
|
|
|
+ </el-button>
|
|
|
</div>
|
|
|
<div style="overflow-x:hidden">
|
|
|
<el-row :gutter="16">
|
|
@@ -25,22 +26,14 @@
|
|
|
</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"
|
|
|
+ <el-date-picker style="width:100%" v-model="form.begdate" value-format="yyyy-MM-dd" type="date"
|
|
|
placeholder="生效日期">
|
|
|
- </el-date-picker>
|
|
|
+ </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"
|
|
|
+ <el-date-picker style="width:100%" v-model="form.enddate" value-format="yyyy-MM-dd" type="date"
|
|
|
placeholder="截止日期">
|
|
|
</el-date-picker>
|
|
|
</el-form-item>
|
|
@@ -65,12 +58,15 @@
|
|
|
</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>
|
|
|
+ <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" :dataid="$route.query.id" @onChecked="onChecked"></scopeOfauth>
|
|
|
+ <scopeOfauth :defaultData="defaultData" appidname="sat_submiteditmodelid" :dataid="$route.query.id"
|
|
|
+ @onChecked="onChecked"></scopeOfauth>
|
|
|
</el-col>
|
|
|
</el-row>
|
|
|
</div>
|
|
@@ -83,65 +79,66 @@ import upload from '@/components/upload/hw_obs_upload.vue'
|
|
|
import scopeOfauth from '@/components/scopeOfAuthority/index.vue'
|
|
|
import store from '@/store'
|
|
|
export default {
|
|
|
- components:{
|
|
|
+ components: {
|
|
|
attachmentList,
|
|
|
upload,
|
|
|
scopeOfauth
|
|
|
},
|
|
|
- data () {
|
|
|
+ data() {
|
|
|
return {
|
|
|
store,
|
|
|
- folderid:JSON.parse(sessionStorage.getItem('folderid')).appfolderid,
|
|
|
- defaultData:{},
|
|
|
- rules:{
|
|
|
+ folderid: JSON.parse(sessionStorage.getItem('folderid')).appfolderid,
|
|
|
+ defaultData: {},
|
|
|
+ rules: {
|
|
|
title: [
|
|
|
{ required: true, message: '请输入课程名称', trigger: 'blur' },
|
|
|
],
|
|
|
begdate: [
|
|
|
- { required: true, message: '请选择生效日期', trigger: 'change' }
|
|
|
+ { required: true, message: '请选择生效日期', trigger: 'change' }
|
|
|
],
|
|
|
enddate: [
|
|
|
- { required: true, message: '请选择截止日期', trigger: 'change' }
|
|
|
+ { required: true, message: '请选择截止日期', trigger: 'change' }
|
|
|
],
|
|
|
onceonly: [
|
|
|
- { required: true, message: '请选择版块', trigger: 'change' }
|
|
|
+ { required: true, message: '请选择版块', trigger: 'change' }
|
|
|
],
|
|
|
- notes:[
|
|
|
+ notes: [
|
|
|
{ required: true, message: '请输入提报要求', trigger: 'blur' },
|
|
|
],
|
|
|
type: [
|
|
|
{ type: 'array', required: true, message: '请至少选择一个提报形式', trigger: 'change' }
|
|
|
],
|
|
|
},
|
|
|
- form:{
|
|
|
- "title":"",
|
|
|
- "notes":"",
|
|
|
- "istextrequired":1,
|
|
|
- "isattrequired":1,
|
|
|
- "onceonly":1,
|
|
|
- "sat_submiteditmodelid":"0",
|
|
|
- "begdate":"",
|
|
|
- "enddate":"",
|
|
|
- "type":[]
|
|
|
+ form: {
|
|
|
+ "title": "",
|
|
|
+ "notes": "",
|
|
|
+ "istextrequired": 1,
|
|
|
+ "isattrequired": 1,
|
|
|
+ "onceonly": 1,
|
|
|
+ "sat_submiteditmodelid": "0",
|
|
|
+ "begdate": "",
|
|
|
+ "enddate": "",
|
|
|
+ "type": []
|
|
|
}
|
|
|
}
|
|
|
},
|
|
|
- methods:{
|
|
|
- async querySubmitMain () {
|
|
|
+ methods: {
|
|
|
+ async querySubmitMain() {
|
|
|
const res = await this.$api.requested({
|
|
|
"classname": "webmanage.saletool.submitedit.submitedit",
|
|
|
"method": "select_submitdetailed",
|
|
|
- "content": {
|
|
|
- "sat_submiteditmodelid":this.$route.query.id
|
|
|
+ "content": {
|
|
|
+ "sat_submiteditmodelid": this.$route.query.id
|
|
|
}
|
|
|
})
|
|
|
- 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('文字提报')}
|
|
|
+ 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.form.status === '发布' ? store.state.pageOnlyRead = true : store.state.pageOnlyRead = false
|
|
|
},
|
|
|
- onSubmit () {
|
|
|
+ onSubmit() {
|
|
|
this.$refs['form'].validate(async (valid) => {
|
|
|
if (!valid) return false;
|
|
|
const res = await this.$api.requested({
|
|
@@ -154,31 +151,31 @@ export default {
|
|
|
})
|
|
|
},
|
|
|
// 监听提报形式
|
|
|
- onCheckboxChange (val) {
|
|
|
- this.form.isattrequired = val.indexOf('附件提报') === -1?0:1
|
|
|
- this.form.istextrequired = val.indexOf('文字提报') === -1?0:1
|
|
|
+ onCheckboxChange(val) {
|
|
|
+ this.form.isattrequired = val.indexOf('附件提报') === -1 ? 0 : 1
|
|
|
+ this.form.istextrequired = val.indexOf('文字提报') === -1 ? 0 : 1
|
|
|
},
|
|
|
// 获取保存授权范围数据
|
|
|
- onChecked (param) {
|
|
|
+ onChecked(param) {
|
|
|
this.authData = param
|
|
|
console.log(this.authData)
|
|
|
},
|
|
|
// 新增授权范围
|
|
|
- async insertCoursewareauth () {
|
|
|
+ async insertCoursewareauth() {
|
|
|
const res = await this.$api.requested({
|
|
|
"classname": "webmanage.saletool.submitedit.submiteditauth",
|
|
|
"method": "insertOrUpdate",
|
|
|
"content": this.authData
|
|
|
})
|
|
|
- res.code === 0?this.$notify({
|
|
|
- title:'失败',
|
|
|
- message:res.data,
|
|
|
- type:'error'
|
|
|
- }):this.querySubmitMain()
|
|
|
-
|
|
|
+ res.code === 0 ? this.$notify({
|
|
|
+ title: '失败',
|
|
|
+ message: res.data,
|
|
|
+ type: 'error'
|
|
|
+ }) : this.querySubmitMain()
|
|
|
+
|
|
|
},
|
|
|
// 查询授权信息
|
|
|
- async query_auth () {
|
|
|
+ async query_auth() {
|
|
|
const res = await this.$api.requested({
|
|
|
"classname": "webmanage.saletool.submitedit.submiteditauth",
|
|
|
"method": "selectAuth",
|
|
@@ -190,7 +187,7 @@ export default {
|
|
|
},
|
|
|
|
|
|
},
|
|
|
- created () {
|
|
|
+ created() {
|
|
|
this.querySubmitMain()
|
|
|
this.query_auth()
|
|
|
},
|