Browse Source

fix:[模板管理]优化

luojie
15881625488@163.com 1 week ago
parent
commit
aa725bcdca
2 changed files with 157 additions and 74 deletions
  1. +130
    -50
      src/views/business/comps/common/JcgjList.vue
  2. +27
    -24
      src/views/business/study/comp/tbbd/Fh.vue

+ 130
- 50
src/views/business/comps/common/JcgjList.vue View File

@ -1,11 +1,12 @@
<template>
<div class="jcgjList">
<div class="jcgjList-keywords" v-if="!readonly">
<el-input v-model="queryParams.jcmc" clearable :placeholder="$t('form.placeholderInput')" @keyup.enter.native="handleQuery">
<el-input v-model="queryParams.jcmc" clearable :placeholder="$t('form.placeholderInput')"
@keyup.enter.native="handleQuery">
<el-button slot="append" icon="el-icon-search" @click="handleQuery"></el-button>
</el-input>
</div>
<div class="jcgjList-jcgjlx" v-if="!readonly">
<div class="jcgjList-jcgjlx" v-if="!readonly">
<el-radio-group v-model="queryParams.jcgjlx" @change="handleQuery">
<el-radio-button :label="-1">{{ $t('page.business.study.study.qb') }}</el-radio-button>
<el-radio-button :label="1" v-if="showLc">{{ $t('page.business.study.study.lc') }}</el-radio-button>
@ -18,35 +19,54 @@
</div>
<div class="jcgjList-content ">
<el-timeline style="margin-left: -30px;">
<el-timeline-item placement="top" v-for="(item, index) in list" :key="index" :color="item.color">
<div class="jcgjList-title no-break">
<div class="jcgjList-jcmc" :style="'color:' + item.color">{{ $i18n.locale === 'zh_CN'?item.jcmc:item.jcmcEn }}</div>
<div>{{ item.createTime }}</div>
</div>
<div class="jcglList-jcnr no-break">
<template v-if="$i18n.locale === 'zh_CN'">
<div v-for="(pitem, pindex) in item.jcnrList" :key="pindex">
{{ pitem.name }}{{ pitem.value }}
<el-timeline-item placement="top" v-for="(item, index) in list" :key="index" :color="item.color">
<div class="jcgjList-title no-break">
<div class="jcgjList-jcmc" :style="'color:' + item.color">{{ $i18n.locale === 'zh_CN' ? item.jcmc : item.jcmcEn
}}</div>
<div>{{ item.createTime }}</div>
</div>
<div class="jcglList-jcnr no-break" >
<template v-if="$i18n.locale === 'zh_CN'">
<div v-for="(pitem, pindex) in item.jcnrList" :key="pindex">
<span v-if="pitem.name != 'url' && pitem.name != 'oldUrl'">
{{ pitem.name }}
<template v-if="pitem.value && pitem.value != ''">
<span v-for="(ppitem, ppindex) in pitem.value.split(';')" :key="ppindex"
>
<a v-if="openFile(ppindex, pitem, item)!=''" :href="openFile(ppindex, pitem, item)" target="_black" style="cursor: pointer;text-decoration: underline;color:#1890ff;margin-right: 5px;">{{ ppitem }}</a>
<span v-else >{{ ppitem }};</span>
</span>
</template>
</span>
</div>
</template>
<template v-else>
<div v-for="(pitem, pindex) in item.jcnrListEn" :key="pindex">
<span v-if="pitem.name != 'url' && pitem.name != 'oldUrl'">
{{ pitem.name }}
<template v-if="pitem.value && pitem.value != ''">
<span v-for="(ppitem, ppindex) in pitem.value.split(';')" :key="ppindex"
>
<a v-if="openFileEn(ppindex, pitem, item)!=''" :href="openFileEn(ppindex, pitem, item)" target="_black" style="cursor: pointer;text-decoration: underline;color:#1890ff;margin-right: 5px;">{{ ppitem }}</a>
<span v-else >{{ ppitem }};</span>
</span>
</template>
</span>
</div>
</template>
<div v-if="item.remark && item.remark !== ''">
{{ $t('form.remark') }}{{ item.remark }}
</div>
</template>
<template v-else>
<div v-for="(pitem, pindex) in item.jcnrListEn" :key="pindex">
{{ pitem.name }}{{ pitem.value }}
<div v-if="item.qmrId && item.qmrId > 0">
{{ $t('form.qmyy') }}{{ $i18n.locale === 'zh_CN' ? item.jcmc : item.jcmcEn }}
</div>
<div v-if="item.qmrId && item.qmrId > 0">
<!-- {{$t('form.signer')}}{{ $i18n.locale === 'zh_CN'?item.qmrMc:item.qmrMcEn }} -->
{{ $t('form.signer') }}{{ item.qmrMc }}
</div>
</template>
<div v-if="item.remark&&item.remark!==''">
{{$t('form.remark')}}{{ item.remark }}
</div>
<div v-if="item.qmrId&&item.qmrId>0">
{{$t('form.qmyy')}}{{ $i18n.locale === 'zh_CN'?item.jcmc:item.jcmcEn }}
</div>
<div v-if="item.qmrId&&item.qmrId>0">
<!-- {{$t('form.signer')}}{{ $i18n.locale === 'zh_CN'?item.qmrMc:item.qmrMcEn }} -->
{{$t('form.signer')}}{{ item.qmrMc }}
</div>
</div>
</el-timeline-item>
</el-timeline>
</el-timeline-item>
</el-timeline>
</div>
</div>
</template>
@ -55,35 +75,35 @@
export default {
name: "JcgjList",
components: {},
props:{
showRy:{
type:Boolean,
default:false
props: {
showRy: {
type: Boolean,
default: false
},
showXg:{
type:Boolean,
default:false
showXg: {
type: Boolean,
default: false
},
showLc:{
type:Boolean,
default:true
showLc: {
type: Boolean,
default: true
},
showBj:{
type:Boolean,
default:true
showBj: {
type: Boolean,
default: true
},
showBcsm:{
type:Boolean,
default:false
showBcsm: {
type: Boolean,
default: false
},
//
showLj: {
type:Boolean,
default:false
type: Boolean,
default: false
},
readonly: {
type:Boolean,
default:false
type: Boolean,
default: false
},
},
data() {
@ -96,11 +116,71 @@ export default {
};
},
mounted() {
this.list=[]
this.list = []
},
methods: {
openFileEn(ppindex, pitem, item) {
let result=''
if (pitem.name == 'Old Value') {
let _oldUrl = ""
for (var i = 0; i < item.jcnrList.length; i++) {
if (item.jcnrList[i].name == 'oldUrl') {
_oldUrl = item.jcnrList[i].value
break;
}
}
if (_oldUrl && _oldUrl != '') {
let oldUrl = _oldUrl.split(";")
result=process.env.VUE_APP_FILE_DOMAIN +oldUrl[ppindex]
}
}
if (pitem.name == 'New Value') {
let _url = ""
for (var i = 0; i < item.jcnrList.length; i++) {
if (item.jcnrList[i].name == 'url') {
_url = item.jcnrList[i].value
break;
}
}
if (_url && _url != '') {
let url = _url.split(";")
result=process.env.VUE_APP_FILE_DOMAIN +url[ppindex];
}
}
return result;
},
openFile(ppindex, pitem, item) {
let result=''
if (pitem.name == '原值') {
let _oldUrl = ""
for (var i = 0; i < item.jcnrList.length; i++) {
if (item.jcnrList[i].name == 'oldUrl') {
_oldUrl = item.jcnrList[i].value
break;
}
}
if (_oldUrl && _oldUrl != '') {
let oldUrl = _oldUrl.split(";")
result=process.env.VUE_APP_FILE_DOMAIN +oldUrl[ppindex]
}
}
if (pitem.name == '新值') {
let _url = ""
for (var i = 0; i < item.jcnrList.length; i++) {
if (item.jcnrList[i].name == 'url') {
_url = item.jcnrList[i].value
break;
}
}
if (_url && _url != '') {
let url = _url.split(";")
result=process.env.VUE_APP_FILE_DOMAIN +url[ppindex];
}
}
return result;
},
handleQuery() {
this.$emit('handleQuery',this.queryParams)
this.$emit('handleQuery', this.queryParams)
},
init(val) {
let that = this

+ 27
- 24
src/views/business/study/comp/tbbd/Fh.vue View File

@ -48,18 +48,17 @@
<div class="line"></div>
<div class="subtitle"> {{ $t('page.business.study.studyFormFill.jcgj') }}</div>
</div>
<JcgjList ref="jcgjList" @handleQuery="getJjcgjList" :showXg="true"/>
<JcgjList ref="jcgjList" @handleQuery="getJjcgjList" :showXg="true" />
<pagination v-show="jcgjTotal > 0" small layout="prev, pager, next" :total="jcgjTotal"
@pagination="getJjcgjList" :page.sync="queryParamsJcgj.pageNum"
:limit.sync="queryParamsJcgj.pageSize"/>
@pagination="getJjcgjList" :page.sync="queryParamsJcgj.pageNum" :limit.sync="queryParamsJcgj.pageSize" />
</div>
</div>
</div>
<el-dialog :title="$t(openTitle)" :visible.sync="openApprove" width="500px" append-to-body
:close-on-click-modal="false">
<el-form ref="formApprove" :model="formApprove" :rules="rulesApprove" label-width="120px" v-if="openApprove">
<div class="sbzdtcma"> <input type="text"> <input type="password" > </div>
<div class="sbzdtcma"> <input type="text"> <input type="password"> </div>
<el-row>
<el-col :span="24">
<el-form-item :label="$t('form.qmyy')" prop="qmyy">
@ -97,8 +96,8 @@
<el-row>
<el-col :span="24">
<el-form-item :label="$t('form.password')" prop="qmrmm">
<el-input type="password" @contextmenu.native.prevent @copy.native.prevent @cut.native.prevent show-password v-model="formApprove.qmrmm" maxlength="20"
:placeholder="$t('form.placeholderInput')" />
<el-input type="password" @contextmenu.native.prevent @copy.native.prevent @cut.native.prevent
show-password v-model="formApprove.qmrmm" maxlength="20" :placeholder="$t('form.placeholderInput')" />
</el-form-item>
</el-col>
</el-row>
@ -191,8 +190,8 @@ export default {
},
getJjcgjList(val) {
this.$modal.loading()
if(val){
this.queryParamsJcgj=_.merge({}, this.queryParamsJcgj, val)
if (val) {
this.queryParamsJcgj = _.merge({}, this.queryParamsJcgj, val)
}
studyFormFill_jcgj(this.queryParamsJcgj).then(response => {
this.jcgjList = response.rows
@ -234,22 +233,26 @@ export default {
})
},
async showApprove(qmyy) {
let content = await this.$refs.templateTable.getFormData()
if (content) {
this.openApprove = true
this.resetApprove()
this.formApprove.id = this.form.id
this.formApprove.bdnr = JSON.stringify(content)
this.formApprove.qmyy = qmyy
if (qmyy == '复核通过') {
this.openTitle = 'page.business.study.studyFormFill.fhtg'
this.formApprove.qmyyMc = this.$t('page.business.study.studyFormFill.fhtg')
} else if (qmyy == '复核拒绝') {
this.openTitle = 'page.business.study.studyFormFill.fhjj'
this.formApprove.qmyyMc = this.$t('page.business.study.studyFormFill.fhjj')
} else if (qmyy == '通过') {
this.openTitle = 'page.business.study.studyFormFill.tongguo'
this.formApprove.qmyyMc = this.$t('page.business.study.studyFormFill.mfhtg')
if (!this.$refs.templateTable.isReply()) {
this.$modal.msgError("还有疑问项未回复");
} else {
let content = await this.$refs.templateTable.getFormData()
if (content) {
this.openApprove = true
this.resetApprove()
this.formApprove.id = this.form.id
this.formApprove.bdnr = JSON.stringify(content)
this.formApprove.qmyy = qmyy
if (qmyy == '复核通过') {
this.openTitle = 'page.business.study.studyFormFill.fhtg'
this.formApprove.qmyyMc = this.$t('page.business.study.studyFormFill.fhtg')
} else if (qmyy == '复核拒绝') {
this.openTitle = 'page.business.study.studyFormFill.fhjj'
this.formApprove.qmyyMc = this.$t('page.business.study.studyFormFill.fhjj')
} else if (qmyy == '通过') {
this.openTitle = 'page.business.study.studyFormFill.tongguo'
this.formApprove.qmyyMc = this.$t('page.business.study.studyFormFill.mfhtg')
}
}
}
},

Loading…
Cancel
Save