Browse Source

feat: [试验管理] 试验操作按钮

master
memorylkf 1 week ago
parent
commit
778089f72f
7 changed files with 182 additions and 34 deletions
  1. +29
    -0
      src/api/business/study/study.js
  2. +10
    -10
      src/lang/en.js
  3. +4
    -1
      src/lang/en/business/study/study.js
  4. +4
    -1
      src/lang/zh/business/study/study.js
  5. +3
    -3
      src/views/business/study/comp/edit.vue
  6. +1
    -1
      src/views/business/study/comp/suject.vue
  7. +131
    -18
      src/views/business/study/list.vue

+ 29
- 0
src/api/business/study/study.js View File

@ -39,3 +39,32 @@ export function study_jcgjList(query) {
params: query params: query
}) })
} }
export function study_gd(data) {
return request({
url: '/system/business/study/gd',
method: 'post',
data: data
})
}
export function study_js(data) {
return request({
url: '/system/business/study/js',
method: 'post',
data: data
})
}
export function study_jd(data) {
return request({
url: '/system/business/study/jd',
method: 'post',
data: data
})
}
export function study_jy(data) {
return request({
url: '/system/business/study/jy',
method: 'post',
data: data
})
}

+ 10
- 10
src/lang/en.js View File

@ -67,8 +67,8 @@ export default {
endDate: 'End Date', endDate: 'End Date',
password: 'Password', password: 'Password',
signer: 'Signer', signer: 'Signer',
signerPsw: '签名人密码',
qmyy: '签名意义',
signerPsw: 'Password',
qmyy: 'Purpose',
signTime: '签名时间', signTime: '签名时间',
remark: 'remark', remark: 'remark',
@ -116,18 +116,18 @@ export default {
}, },
business: { business: {
resource: { resource: {
resource:resource,
zcg:zcg,
mjy:mjy,
yq:yq,
sj:sj,
gyzj:gyzj,
resource: resource,
zcg: zcg,
mjy: mjy,
yq: yq,
sj: sj,
gyzj: gyzj
}, },
study: { study: {
study: study, study: study,
studyEnter: studyEnter, studyEnter: studyEnter,
studyFormPre:studyFormPre,
studyFormFill:studyFormFill
studyFormPre: studyFormPre,
studyFormFill: studyFormFill
}, },
form: form form: form
} }

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

@ -53,6 +53,7 @@ export default {
jssy: 'Unlock Study', jssy: 'Unlock Study',
sqjy: 'Apply for Check-out', sqjy: 'Apply for Check-out',
sqgd: 'Apply for Archiving', sqgd: 'Apply for Archiving',
sqjd: 'Apply for De-archiving',
jjjd: 'Reject De-archiving', jjjd: 'Reject De-archiving',
tyjd: 'Approve De-archiving', tyjd: 'Approve De-archiving',
jjgd: 'Reject Archiving', jjgd: 'Reject Archiving',
@ -63,5 +64,7 @@ export default {
qb: 'All', qb: 'All',
lc: 'Milestone', lc: 'Milestone',
bj: 'Change', bj: 'Change',
ry: 'User'
ry: 'User',
scsy: 'Remove Study'
} }

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

@ -53,6 +53,7 @@ export default {
jssy: '解锁试验', jssy: '解锁试验',
sqjy: '申请借阅', sqjy: '申请借阅',
sqgd: '申请归档', sqgd: '申请归档',
sqjd: '申请解档',
jjjd: '拒绝解档', jjjd: '拒绝解档',
tyjd: '同意解档', tyjd: '同意解档',
jjgd: '拒绝归档', jjgd: '拒绝归档',
@ -63,5 +64,7 @@ export default {
qb: '全部', qb: '全部',
lc: '流程', lc: '流程',
bj: '编辑', bj: '编辑',
ry: '人员'
ry: '人员',
scsy: '删除试验'
} }

+ 3
- 3
src/views/business/study/comp/edit.vue View File

@ -37,7 +37,7 @@
</el-row> </el-row>
</el-form> </el-form>
</div> </div>
<Sign ref="signRef" @callback="doSign" />
<Sign ref="editSignRef" @callback="doSign" />
</div> </div>
</template> </template>
@ -113,7 +113,7 @@ export default {
if (valid) { if (valid) {
this.infoDialog.formData.status = status this.infoDialog.formData.status = status
if(status === 3){ if(status === 3){
this.$refs.signRef.show(this.$t('page.business.study.study.submit'),'创建试验')
this.$refs.editSignRef.show(this.$t('page.business.study.study.submit'),'创建试验')
}else{ }else{
this.doSave({}) this.doSave({})
} }
@ -130,7 +130,7 @@ export default {
sign:sign sign:sign
}).then(() => { }).then(() => {
this.$emit('save') this.$emit('save')
this.$refs.signRef.cancel()
this.$refs.editSignRef.cancel()
}).finally(() => { }).finally(() => {
this.$modal.closeLoading() this.$modal.closeLoading()
}) })

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

@ -17,7 +17,7 @@
<div class="subject-item" :class="selectedSubjectId===item.id?'active':''" v-for="(item,index) in subjectList" :key="index" @click="changeSelectedSubject(item)"> <div class="subject-item" :class="selectedSubjectId===item.id?'active':''" v-for="(item,index) in subjectList" :key="index" @click="changeSelectedSubject(item)">
<div class="subject-item-name">{{item.deptName}}({{item.leaderName}})</div> <div class="subject-item-name">{{item.deptName}}({{item.leaderName}})</div>
<div class="subject-item-add"> <div class="subject-item-add">
<el-button type="primary" plain @click="yq(item)">{{$t('page.business.study.studyEnter.yq')}}</el-button>
<el-button type="primary" plain @click.stop="yq(item)">{{$t('page.business.study.studyEnter.yq')}}</el-button>
</div> </div>
</div> </div>
</div> </div>

+ 131
- 18
src/views/business/study/list.vue View File

@ -90,11 +90,11 @@
<!-- 归档 --> <!-- 归档 -->
<el-button type="text" @click="gd(scope.row)" v-hasPermi="['business:study:gd']" v-if="scope.row.status===5">{{$t('page.business.study.study.gd')}}</el-button> <el-button type="text" @click="gd(scope.row)" v-hasPermi="['business:study:gd']" v-if="scope.row.status===5">{{$t('page.business.study.study.gd')}}</el-button>
<!-- 解锁 --> <!-- 解锁 -->
<el-button type="text" @click="jd(scope.row)" v-hasPermi="['business:study:js']" v-if="scope.row.status===5">{{$t('page.business.study.study.js')}}</el-button>
<el-button type="text" @click="js(scope.row)" v-hasPermi="['business:study:js']" v-if="scope.row.status===5">{{$t('page.business.study.study.js')}}</el-button>
<!-- 解档 --> <!-- 解档 -->
<el-button type="text" @click="jd(scope.row)" v-hasPermi="['business:study:jd']" v-if="scope.row.status===9 && scope.row.borrowStatus===1">{{$t('page.business.study.study.jd')}}</el-button> <el-button type="text" @click="jd(scope.row)" v-hasPermi="['business:study:jd']" v-if="scope.row.status===9 && scope.row.borrowStatus===1">{{$t('page.business.study.study.jd')}}</el-button>
<!-- 借阅 --> <!-- 借阅 -->
<el-button type="text" @click="jd(scope.row)" v-hasPermi="['business:study:jy']" v-if="scope.row.status===9 && scope.row.borrowStatus===1">{{$t('page.business.study.study.jy')}}</el-button>
<el-button type="text" @click="jy(scope.row)" v-hasPermi="['business:study:jy']" v-if="scope.row.status===9 && scope.row.borrowStatus===1">{{$t('page.business.study.study.jy')}}</el-button>
</template> </template>
</el-table-column> </el-table-column>
</el-table> </el-table>
@ -142,15 +142,16 @@
<Edit ref="edit" v-show="showType==='edit'" @cancel="showType='list'" @save="save" /> <Edit ref="edit" v-show="showType==='edit'" @cancel="showType='list'" @save="save" />
<Enter ref="enter" v-show="showType==='enter'" @cancel="showType='list'" /> <Enter ref="enter" v-show="showType==='enter'" @cancel="showType='list'" />
<Detail ref="detail" v-show="showType==='detail'" @cancel="showType='list'" /> <Detail ref="detail" v-show="showType==='detail'" @cancel="showType='list'" />
<Sign ref="signRef" @callback="doSign" />
</div> </div>
</template> </template>
<script> <script>
import { study_list,study_info,study_save,study_delete} from "@/api/business/study/study";
import { study_list,study_delete,study_gd,study_js,study_jd,study_jy} from "@/api/business/study/study";
import Edit from './comp/edit.vue' import Edit from './comp/edit.vue'
import Enter from './comp/enter.vue' import Enter from './comp/enter.vue'
import Detail from './comp/detail.vue' import Detail from './comp/detail.vue'
import Sign from './comp/sign.vue'
export default { export default {
name: "Study", name: "Study",
props:{ props:{
@ -158,7 +159,8 @@ export default {
components:{ components:{
Edit, Edit,
Enter, Enter,
Detail
Detail,
Sign
}, },
computed: { computed: {
}, },
@ -182,7 +184,10 @@ export default {
total: 0, total: 0,
list: [], list: [],
//线list,edit //线list,edit
showType:'list'
showType:'list',
operate:'',
operateRow:{},
}; };
}, },
created() { created() {
@ -226,17 +231,6 @@ export default {
this.showType = 'list' this.showType = 'list'
this.getList() this.getList()
}, },
del(row) {
this.$modal.confirm(this.$t('form.confirmDelete')).then(function() {
this.$modal.loading()
study_delete({ id: row.id}).then(() => {
this.getList()
})
.finally(() => {
this.$modal.closeLoading()
})
}).catch(() => {})
},
enter(row){ enter(row){
this.showType = 'enter' this.showType = 'enter'
this.$refs.enter.show(row) this.$refs.enter.show(row)
@ -244,7 +238,126 @@ export default {
detail(row){ detail(row){
this.showType = 'detail' this.showType = 'detail'
this.$refs.detail.show(row) this.$refs.detail.show(row)
}
},
del(row) {
this.operate = 'del'
this.operateRow = row
this.$refs.signRef.show(this.$t('page.business.study.study.scsy'),this.$t('page.business.study.study.scsy'))
},
doDel(signInfo) {
this.$modal.loading()
let postData = {
study:this.operateRow,
sign:signInfo
}
study_delete(postData).then(() => {
this.$refs.signRef.cancel()
this.getList()
})
.finally(() => {
this.$modal.closeLoading()
})
},
gd(row) {
this.operate = 'gd'
this.operateRow = row
this.$refs.signRef.show(this.$t('page.business.study.study.sqgd'),this.$t('page.business.study.study.sqgd'))
},
doGd(signInfo) {
this.$modal.loading()
let postData = {
study:this.operateRow,
sign:signInfo
}
study_gd(postData).then(() => {
this.$refs.signRef.cancel()
this.getList()
})
.finally(() => {
this.$modal.closeLoading()
})
},
gs(row) {
this.operate = 'gs'
this.operateRow = row
this.$refs.signRef.show(this.$t('page.business.study.study.jssy'),this.$t('page.business.study.study.jssy'))
},
doJs(signInfo) {
this.$modal.loading()
let postData = {
study:this.operateRow,
sign:signInfo
}
study_js(postData).then(() => {
this.$refs.signRef.cancel()
this.getList()
})
.finally(() => {
this.$modal.closeLoading()
})
},
jd(row) {
this.operate = 'jd'
this.operateRow = row
this.$refs.signRef.show(this.$t('page.business.study.study.sqjd'),this.$t('page.business.study.study.sqjd'))
},
doJd(signInfo) {
this.$modal.loading()
let postData = {
study:this.operateRow,
sign:signInfo
}
study_jd(postData).then(() => {
this.$refs.signRef.cancel()
this.getList()
})
.finally(() => {
this.$modal.closeLoading()
})
},
jy(row) {
this.operate = 'jy'
this.operateRow = row
this.$refs.signRef.show(this.$t('page.business.study.study.sqjy'),this.$t('page.business.study.study.sqjy'))
},
doJy(signInfo) {
this.$modal.loading()
let postData = {
study:this.operateRow,
sign:signInfo
}
study_jy(postData).then(() => {
this.$refs.signRef.cancel()
this.getList()
})
.finally(() => {
this.$modal.closeLoading()
})
},
doSign(val){
if(this.operate==='del'){
this.doDel(val)
}
if(this.operate==='gd'){
this.doGd(val)
}
if(this.operate==='js'){
this.doJs(val)
}
if(this.operate==='jd'){
this.doJd(val)
}
if(this.operate==='jy'){
this.doJy(val)
}
},
} }
}; };
</script> </script>

Loading…
Cancel
Save