Browse Source

fix:[试验管理][试验方法]关闭

lkf
HanLong 1 month ago
parent
commit
c2deb2f25e
4 changed files with 63 additions and 17 deletions
  1. +3
    -0
      src/lang/en/business/study/studyMethod.js
  2. +2
    -0
      src/lang/zh/business/study/studyMethod.js
  3. +50
    -11
      src/views/business/form/nonTrial/comp/syffList.vue
  4. +8
    -6
      src/views/business/study/comp/syffList.vue

+ 3
- 0
src/lang/en/business/study/studyMethod.js View File

@ -17,6 +17,9 @@ export default {
qmsj: 'Date', qmsj: 'Date',
qmyy: 'Meaning of Signature', qmyy: 'Meaning of Signature',
remark: 'Comment', remark: 'Comment',
ts: '',
gbts: 'This method has been closed, no need to read!',
jcyd: '坚持阅读',
qyd:'Go Read', qyd:'Go Read',
gb: 'Close', gb: 'Close',
sfgb: 'Closed', sfgb: 'Closed',

+ 2
- 0
src/lang/zh/business/study/studyMethod.js View File

@ -20,6 +20,8 @@ export default {
qyd:'去阅读', qyd:'去阅读',
gb: '关闭', gb: '关闭',
sfgb: '是否关闭', sfgb: '是否关闭',
gbts: '该方法已关闭,无需阅读!',
jcyd: '坚持阅读',
s: '是', s: '是',
f: '否', f: '否',
qrgb: '确认关闭?', qrgb: '确认关闭?',

+ 50
- 11
src/views/business/form/nonTrial/comp/syffList.vue View File

@ -40,8 +40,8 @@
</div> </div>
<div class="tbbd-content"> <div class="tbbd-content">
<el-row class="add-box">
<el-col v-ifan class="s">="searchForm.studyStatus < 5">
<el-row class="add-box" v-ifan class="s">="searchForm.studyStatus < 5">
<el-col>
<el-button type="primary" icon="el-icon-plus" @click="add()" v-hasPermi="['business:studyMethod:upload']">{{ <el-button type="primary" icon="el-icon-plus" @click="add()" v-hasPermi="['business:studyMethod:upload']">{{
$t('page.business.study.studyMethod.scff') }}</el-button> $t('page.business.study.studyMethod.scff') }}</el-button>
</el-col> </el-col>
@ -51,13 +51,19 @@
<el-table-column :label="$t('page.business.study.studyMethod.ffmc')" prop="ffmc" /> <el-table-column :label="$t('page.business.study.studyMethod.ffmc')" prop="ffmc" />
<el-table-column :label="$t('page.business.study.studyMethod.cjsj')" prop="createTime" /> <el-table-column :label="$t('page.business.study.studyMethod.cjsj')" prop="createTime" />
<el-table-column :label="$t('page.business.study.studyMethod.cjr')" prop="userMc" /> <el-table-column :label="$t('page.business.study.studyMethod.cjr')" prop="userMc" />
<el-table-column :label="$t('page.business.study.studyMethod.zt')" prop="status" align="center" width="100">
<el-table-column :label="$t('page.business.study.studyMethod.zt')" prop="status" align="center">
<template slot-scope="scope"> <template slot-scope="scope">
<span v-if="scope.row.zt != 0">{{ $t('page.business.study.studyMethod.yidu') }}</span> <span v-if="scope.row.zt != 0">{{ $t('page.business.study.studyMethod.yidu') }}</span>
<span v-if="scope.row.zt === 0">{{ $t('page.business.study.studyMethod.weidu') }}</span> <span v-if="scope.row.zt === 0">{{ $t('page.business.study.studyMethod.weidu') }}</span>
</template> </template>
</el-table-column> </el-table-column>
<el-table-column :label="$t('form.operate')" align="left" fixed="right" width="200">
<el-table-column :label="$t('page.business.study.studyMethod.sfgb')" prop="status" align="center">
<template slot-scope="scope">
<span v-if="scope.row.status === 1">{{ $t('page.business.study.studyMethod.s') }}</span>
<span v-if="scope.row.status === 10">{{ $t('page.business.study.studyMethod.f') }}</span>
</template>
</el-table-column>
<el-table-column :label="$t('form.operate')" align="left" fixed="right">
<template slot-scope="scope" v-if="searchForm.studyStatus < 5"> <template slot-scope="scope" v-if="searchForm.studyStatus < 5">
<!-- 阅读 --> <!-- 阅读 -->
<el-button type="text" @click="detail(scope.row)" v-hasPermi="['business:studyMethod:read']">{{ <el-button type="text" @click="detail(scope.row)" v-hasPermi="['business:studyMethod:read']">{{
@ -65,6 +71,10 @@
<!-- 导出 --> <!-- 导出 -->
<el-button type="text" @click="showExport(scope.row)" v-hasPermi="['business:studyMethod:download']">{{ <el-button type="text" @click="showExport(scope.row)" v-hasPermi="['business:studyMethod:download']">{{
$t('page.business.study.studyMethod.daochu') }}</el-button> $t('page.business.study.studyMethod.daochu') }}</el-button>
<!-- 关闭 -->
<el-button type="text" @click="handleSign(scope.row, 'page.business.study.studyMethod.gb')"
v-if="scope.row.userId == id && scope.row.status == 10">{{
$t('page.business.study.studyMethod.gb') }}</el-button>
</template> </template>
</el-table-column> </el-table-column>
</el-table> </el-table>
@ -76,15 +86,18 @@
<!-- 新增 --> <!-- 新增 -->
<Xz key="Xz" ref="Xz" @callback="search" /> <Xz key="Xz" ref="Xz" @callback="search" />
<!-- 详情 --> <!-- 详情 -->
<Xq key="Xq" ref="Xq" v-show="showDetail" @close="xqClose" />
<Xq key="Xq" ref="Xq" v-show="showDetail" @close="xqClose" />
<!-- 签名 -->
<Sign ref="refSign" @callback="doSign" />
</div> </div>
</template> </template>
<script> <script>
import { studyMethod_list } from '@/api/business/study/studyMethod'
import { studyMethod_list, studyMethod_close } from '@/api/business/study/studyMethod'
import Xz from "./syff/Xz"; import Xz from "./syff/Xz";
import Xq from "./syff/Xq"; import Xq from "./syff/Xq";
import Sign from "@/views/business/comps/common/sign";
import { mapGetters } from 'vuex' import { mapGetters } from 'vuex'
import moment from "moment"; import moment from "moment";
export default { export default {
@ -117,7 +130,7 @@ export default {
deep: true deep: true
} }
}, },
components: { Xz, Xq },
components: { Xz, Xq, Sign },
data() { data() {
return { return {
showDetail: false, showDetail: false,
@ -135,6 +148,9 @@ export default {
startDate: '', startDate: '',
endDate: '' endDate: ''
}, },
form: {
id: null,
},
loading: false, loading: false,
total: 0, total: 0,
list: [], list: [],
@ -143,7 +159,20 @@ export default {
}, },
created() { }, created() { },
methods: { methods: {
handleSign(row, qmyy) {
this.form.id = row.id
let title = this.$t(qmyy)
this.$refs.refSign.show(title, title, false, false, true, false)
},
doSign(val) {
let params = _.merge({}, this.form, val)
this.$modal.loading()
studyMethod_close(params).then(res => {
this.getList()
}).finally(() => {
this.$modal.closeLoading()
})
},
search() { search() {
this.searchForm.pageNum = 1 this.searchForm.pageNum = 1
this.getList() this.getList()
@ -171,9 +200,19 @@ export default {
this.$refs.Xz.show(this.study); this.$refs.Xz.show(this.study);
}, },
detail(row) { detail(row) {
this.showDetail = true
this.$emit('showDetail', this.showDetail)
this.$refs.Xq.show(row)
//
if (row.status == 1) {
this.$modal.confirm(this.$t('page.business.study.studyMethod.gbts')).then(() => {
this.showDetail = true
this.$emit('showDetail', this.showDetail)
this.$refs.Xq.show(row)
}).catch(() => { });
} else {
this.showDetail = true
this.$emit('showDetail', this.showDetail)
this.$refs.Xq.show(row)
}
}, },
showExport(row) { showExport(row) {
this.showDetail = true this.showDetail = true

+ 8
- 6
src/views/business/study/comp/syffList.vue View File

@ -40,7 +40,7 @@
</div> </div>
<div class="tbbd-content"> <div class="tbbd-content">
<el-row class="add-box" v-if="searchForm.studyStatus < 5">
<el-row class="add-box" v-if="searchForm.studyStatus < 5">
<el-col> <el-col>
<el-button type="primary" icon="el-icon-plus" @click="add()" v-hasPermi="['business:studyMethod:upload']">{{ <el-button type="primary" icon="el-icon-plus" @click="add()" v-hasPermi="['business:studyMethod:upload']">{{
$t('page.business.study.studyMethod.scff') }}</el-button> $t('page.business.study.studyMethod.scff') }}</el-button>
@ -51,19 +51,19 @@
<el-table-column :label="$t('page.business.study.studyMethod.ffmc')" prop="ffmc" /> <el-table-column :label="$t('page.business.study.studyMethod.ffmc')" prop="ffmc" />
<el-table-column :label="$t('page.business.study.studyMethod.cjsj')" prop="createTime" /> <el-table-column :label="$t('page.business.study.studyMethod.cjsj')" prop="createTime" />
<el-table-column :label="$t('page.business.study.studyMethod.cjr')" prop="userMc" /> <el-table-column :label="$t('page.business.study.studyMethod.cjr')" prop="userMc" />
<el-table-column :label="$t('page.business.study.studyMethod.zt')" prop="status" align="center" >
<el-table-column :label="$t('page.business.study.studyMethod.zt')" prop="status" align="center">
<template slot-scope="scope"> <template slot-scope="scope">
<span v-if="scope.row.zt != 0">{{ $t('page.business.study.studyMethod.yidu') }}</span> <span v-if="scope.row.zt != 0">{{ $t('page.business.study.studyMethod.yidu') }}</span>
<span v-if="scope.row.zt === 0">{{ $t('page.business.study.studyMethod.weidu') }}</span> <span v-if="scope.row.zt === 0">{{ $t('page.business.study.studyMethod.weidu') }}</span>
</template> </template>
</el-table-column> </el-table-column>
<el-table-column :label="$t('page.business.study.studyMethod.sfgb')" prop="status" align="center" >
<el-table-column :label="$t('page.business.study.studyMethod.sfgb')" prop="status" align="center">
<template slot-scope="scope"> <template slot-scope="scope">
<span v-if="scope.row.status === 1">{{ $t('page.business.study.studyMethod.s') }}</span> <span v-if="scope.row.status === 1">{{ $t('page.business.study.studyMethod.s') }}</span>
<span v-if="scope.row.status === 10">{{ $t('page.business.study.studyMethod.f') }}</span> <span v-if="scope.row.status === 10">{{ $t('page.business.study.studyMethod.f') }}</span>
</template> </template>
</el-table-column> </el-table-column>
<el-table-column :label="$t('form.operate')" align="left" fixed="right" >
<el-table-column :label="$t('form.operate')" align="left" fixed="right">
<template slot-scope="scope" v-if="searchForm.studyStatus < 5"> <template slot-scope="scope" v-if="searchForm.studyStatus < 5">
<!-- 阅读 --> <!-- 阅读 -->
<el-button type="text" @click="detail(scope.row)" v-hasPermi="['business:studyMethod:read']">{{ <el-button type="text" @click="detail(scope.row)" v-hasPermi="['business:studyMethod:read']">{{
@ -202,8 +202,10 @@ export default {
detail(row) { detail(row) {
// //
if (row.status == 1) { if (row.status == 1) {
this.$modal.confirm('该方法已关闭,无需阅读!').then(() => {
this.$modal.confirm(this.$t('page.business.study.studyMethod.gbts')).then(() => {
this.showDetail = true
this.$emit('showDetail', this.showDetail)
this.$refs.Xq.show(row)
}).catch(() => { }); }).catch(() => { });
} else { } else {
this.showDetail = true this.showDetail = true

Loading…
Cancel
Save