Browse Source

feat:[试验管理][试验方法]上传新增方法

master
HanLong 5 days ago
parent
commit
a6ef650484
5 changed files with 198 additions and 23 deletions
  1. +6
    -1
      src/lang/en/business/study/studyMethod.js
  2. +6
    -1
      src/lang/zh/business/study/studyMethod.js
  3. +0
    -1
      src/views/business/study/comp/syff.vue
  4. +168
    -0
      src/views/business/study/comp/syff/Xz.vue
  5. +18
    -20
      src/views/business/study/comp/syffList.vue

+ 6
- 1
src/lang/en/business/study/studyMethod.js View File

@ -2,10 +2,15 @@ export default {
ffmc: '方法名称',
cjr: '创建人',
cjsj: '创建时间',
scff: '上传方法',
scwj: '上传文件',
wjm:'支持扩展名:pdf',
zt: '状态',
yuedu: '阅读',
daochu: '导出',
mc: '名称',
ff: '方法',
qmhz: '签名汇总'
qmhz: '签名汇总',
yidu: '已读',
weidu: '未读',
}

+ 6
- 1
src/lang/zh/business/study/studyMethod.js View File

@ -2,10 +2,15 @@ export default {
ffmc: '方法名称',
cjr: '创建人',
cjsj: '创建时间',
scff: '上传方法',
scwj: '上传文件',
wjm:'支持扩展名:pdf',
zt: '状态',
yuedu: '阅读',
daochu: '导出',
mc: '名称',
ff: '方法',
qmhz: '签名汇总'
qmhz: '签名汇总',
yidu: '已读',
weidu: '未读',
}

+ 0
- 1
src/views/business/study/comp/syff.vue View File

@ -4,7 +4,6 @@
<sbject :study="study" @change="changeSubject" />
</div>
<div class="tbbd-right" v-if="studyInfo.studySubjectId!=''">
试验方法可以参考飞哥其他几个
<syffList :study="studyInfo" @showDetail="showDetailCallback"/>
</div>
</div>

+ 168
- 0
src/views/business/study/comp/syff/Xz.vue View File

@ -0,0 +1,168 @@
G<template>
<div>
<!-- 新增试验间弹窗 -->
<el-dialog :title="$t('page.business.study.studyMethod.scff')" :visible.sync="open" width="400px" append-to-body
:close-on-click-modal="false">
<el-form ref="form" :model="form" :rules="rules" label-width="80px">
<el-row>
<!-- 名称 -->
<el-col :span="24">
<el-form-item :label="$t('page.business.study.studyMethod.mc')" prop="mc">
<SelectTestArea v-model="form.mc" />
</el-form-item>
</el-col>
</el-row>
<el-row>
<!-- 方法 -->
<el-col :span="24">
<el-form-item :label="$t('page.business.study.studyMethod.ff')" prop="mc">
<el-upload class="upload-demo" :before-upload="handleBeforeUpload" :on-error="handleUploadError"
:on-exceed="handleExceed" :on-success="handleUploadSuccess" :show-file-list="false" :headers="headers"
:action="uploadFileUrl" accept=".pdf" :limit="1" :file-list="fileList">
<el-button size="small" type="primary">{{ $t('page.business.study.studyMethod.scwj') }}</el-button>
<div slot="tip" class="el-upload__tip">{{ $t('page.business.study.studyMethod.wjm') }}</div>
</el-upload>
</el-form-item>
</el-col>
</el-row>
<el-row>
<el-col :span="24">
<el-form-item :label="$t('form.qmyy')" prop="qmyy">
<el-input type="text" :value="form.qmyy" maxlength="50" disabled
:placeholder="$t('form.placeholderInput')" />
</el-form-item>
</el-col>
</el-row>
<el-row>
<el-col :span="24">
<el-form-item :label="$t('form.remark')" prop="qmbz">
<el-input type="textarea" v-model="form.qmbz" :rows="2" maxlength="500"
:placeholder="$t('form.placeholderInput')">
</el-input>
</el-form-item>
</el-col>
</el-row>
<el-row>
<el-col :span="24">
<el-form-item :label="$t('form.signer')">
<el-input type="text" v-model="nickName" maxlength="50" disabled
:placeholder="$t('form.placeholderInput')" />
</el-form-item>
</el-col>
</el-row>
<el-row>
<el-col :span="24">
<el-form-item :label="$t('form.password')" prop="qmrmm">
<el-input type="password" v-model="form.qmrmm" maxlength="20"
:placeholder="$t('form.placeholderInput')" />
</el-form-item>
</el-col>
</el-row>
</el-form>
<div slot="footer" class="dialog-footer">
<el-button type="primary" @click="save">{{ $t('form.confirm') }}</el-button>
<el-button @click="cancel">{{ $t('form.cancel') }}</el-button>
</div>
</el-dialog>
</div>
</template>
<script>
import { studyRoom_save } from "@/api/business/study/studyRoom"
import { mapGetters } from 'vuex'
import BusinessSelect from '@/views/business/comps/select/BusinessSelect';
import SelectTestArea from '@/views/business/comps/select/SelectTestArea';
import SelectRoom from '@/views/business/comps/select/SelectRoom';
import SelectAnimalSpecies from '@/views/business/comps/select/SelectAnimalSpecies';
import SelectCage from '@/views/business/comps/select/SelectCage';
export default {
name: "XzSyj",
components: { BusinessSelect, SelectTestArea, SelectRoom, SelectCage, SelectAnimalSpecies },
data() {
return {
open: false,
form: {},
uploadFileUrl: process.env.VUE_APP_BASE_API + "/file/upload",
headers: {
Authorization: "Bearer " + getToken(),
},
fileList: [],
rules: {
syqy: [{
required: true,
message: ' ',
trigger: 'blur'
}],
syjh: [{
required: true,
message: ' ',
trigger: 'blur'
}],
dwzs: [{
required: true,
message: ' ',
trigger: 'blur'
}],
lj: [{
required: true,
message: ' ',
trigger: 'blur'
}],
kssyyl: [{
required: true,
message: ' ',
trigger: 'blur'
}],
qmrmm: [{
required: true,
message: ' ',
trigger: 'blur'
}],
}
}
},
computed: {
...mapGetters([
'nickName'
]),
},
created() {
},
methods: {
cancel() {
this.open = false
},
reset() {
this.form = {
id: null,
syqy: null,
syjh: null,
dwzs: null,
lj: null,
qmrmm: null,
kssyyl: '',
qmyy: '上传文件',
bjbz: ''
}
this.resetForm("form")
},
show(studyId) {
this.reset()
this.form.studyId = studyId
this.open = true
},
save() {
this.$refs["form"].validate(valid => {
if (valid) {
studyRoom_save(this.form).then(response => {
this.open = false
this.$emit('callback')
})
}
})
}
}
}
</script>

+ 18
- 20
src/views/business/study/comp/syffList.vue View File

@ -6,32 +6,30 @@
<el-form :model="searchForm" ref="searchForm" class="search-area" :inline="true" label-width="88px">
<el-row>
<el-col :span="24">
<!-- 饲养间号 -->
<el-form-item :label="$t('page.business.study.studyRoom.syjh')" prop="syjh">
<el-input v-model="searchForm.syjh" :placeholder="$t('form.placeholderInput')" clearable
<!-- 方法名称 -->
<el-form-item :label="$t('page.business.study.studyMethod.ffmc')" prop="ffmc">
<el-input v-model="searchForm.ffmc" :placeholder="$t('form.placeholderInput')" clearable
@keyup.enter.native="search" />
</el-form-item>
<!-- 试验区域 -->
<el-form-item :label="$t('page.business.study.studyRoom.syqy')" prop="syqy">
<el-input v-model="searchForm.syqy" :placeholder="$t('form.placeholderInput')" clearable
<!-- 创建人 -->
<el-form-item :label="$t('page.business.study.studyMethod.cjr')" prop="cjr">
<el-input v-model="searchForm.cjr" :placeholder="$t('form.placeholderInput')" clearable
@keyup.enter.native="search" />
</el-form-item>
<!-- 启用人 -->
<el-form-item :label="$t('page.business.study.studyRoom.qyr')" prop="qyr">
<el-input v-model="searchForm.qyr" :placeholder="$t('form.placeholderInput')" clearable
@keyup.enter.native="search" />
</el-form-item>
<!-- 结束人 -->
<el-form-item :label="$t('page.business.study.studyRoom.jsr')" prop="jsr">
<el-input v-model="searchForm.jsr" :placeholder="$t('form.placeholderInput')" clearable
@keyup.enter.native="search" />
</el-form-item>
<!-- 开始时间 -->
<el-form-item :label="$t('page.business.study.studyRoom.kssj') + ':'">
<!-- 创建时间 -->
<el-form-item :label="$t('page.business.study.studyMethod.cjsj') + ':'">
<el-date-picker v-model="daterange" class="chat-histogram-daterange" type="daterange"
range-separator="-" :start-placeholder="$t('form.startDate')" :end-placeholder="$t('form.endDate')"
value-format="yyyy-MM-dd" @change="search" style="width: 250px;" />
</el-form-item>
<!-- 状态 -->
<el-form-item :label="$t('page.business.study.studyMethod.zt') + ':'" prop="zt">
<el-select v-model="searchForm.zt" :placeholder="$t('form.placeholderSelect')" clearable
@change="search">
<el-option :label="$t('page.business.study.studyMethod.yidu')" :value="1" />
<el-option :label="$t('page.business.study.studyMethod.weidu')" :value="3" />
</el-select>
</el-form-item>
<el-form-item>
<el-button type="primary" icon="el-icon-search" @click="search">{{ $t('form.search') }}</el-button>
<el-button icon="el-icon-refresh" @click="reset">{{ $t('form.reset') }}</el-button>
@ -45,7 +43,7 @@
<el-row class="add-box">
<el-col>
<el-button type="primary" icon="el-icon-plus" @click="add()">{{
$t('page.business.study.studyRoom.xzqy') }}</el-button>
$t('page.business.study.studyMethod.scff') }}</el-button>
</el-col>
</el-row>
@ -99,7 +97,7 @@
<script>
import { studyRoom_list } from '@/api/business/study/studyRoom'
import Xz from "./syj/Xz";
import Xz from "./syff/Xz";
import Bj from "./syj/Bj";
import Js from "./syj/Js";
import Jl from "./syj/Jl";

Loading…
Cancel
Save