|
@@ -3,97 +3,100 @@
|
|
|
<el-row>
|
|
|
<el-col :span="24" class="main">
|
|
|
<el-col :span="24" class="down">
|
|
|
- <el-tabs v-model="active" type="card">
|
|
|
- <el-tab-pane label="(一)基本信息" name="first">
|
|
|
- <basic :info="form.basic"></basic>
|
|
|
- </el-tab-pane>
|
|
|
- <el-tab-pane label="(二)内容简介" name="second">
|
|
|
- <brief :info="form.brief"></brief>
|
|
|
- </el-tab-pane>
|
|
|
- <el-tab-pane label="(三)主研人员名单" name="third">
|
|
|
- <research :list="form.research"></research>
|
|
|
- </el-tab-pane>
|
|
|
- <el-tab-pane label="(四)评价委托方提供资料清单" name="fourth">
|
|
|
- <detailed :linkInfo="form.datalist"></detailed>
|
|
|
- </el-tab-pane>
|
|
|
- <el-tab-pane label="(五)资料审核提交" name="fiveth">
|
|
|
- <el-col :span="24" class="fiveth">
|
|
|
- <el-form :model="verify" :rules="rules" ref="form" label-width="100px">
|
|
|
- <el-form-item label="审核评分" prop="score">
|
|
|
- <el-input-number v-model="verify.score" :min="0" :max="10" label="请打分"></el-input-number>
|
|
|
- </el-form-item>
|
|
|
- <el-form-item label="审核建议" prop="content">
|
|
|
- <el-input
|
|
|
- type="textarea"
|
|
|
- placeholder="请输入审核建议"
|
|
|
- v-model="verify.content"
|
|
|
- maxlength="200"
|
|
|
- :autosize="{ minRows: 4, maxRows: 6 }"
|
|
|
- show-word-limit
|
|
|
- >
|
|
|
- </el-input>
|
|
|
- </el-form-item>
|
|
|
- <el-col :span="24" class="btn">
|
|
|
- <el-button type="primary" size="mini" @click="onSubmit('form')">提交审核</el-button>
|
|
|
- </el-col>
|
|
|
- </el-form>
|
|
|
- </el-col>
|
|
|
- </el-tab-pane>
|
|
|
- </el-tabs>
|
|
|
+ <data-table :fields="fields" :opera="opera" :data="list" :total="total" @query="search" @score="toScore">
|
|
|
+ <template #custom="{item,row}">
|
|
|
+ <template v-if="item.prop === 'achieve_name'">
|
|
|
+ <el-link size="mini" type="primary" @click="toApply(row)">{{ getProp(row, 'apply_id.basic.achieve_name') }}</el-link>
|
|
|
+ </template>
|
|
|
+ </template>
|
|
|
+ </data-table>
|
|
|
</el-col>
|
|
|
</el-col>
|
|
|
</el-row>
|
|
|
+ <el-dialog title="成果详情" center width="80%" :close-on-click-modal="false" :visible.sync="applyDialog" destroy-on-close @closed="handleClose">
|
|
|
+ <detail :form="apply"></detail>
|
|
|
+ </el-dialog>
|
|
|
+ <el-dialog title="评分" center width="30%" :visible.sync="scoreDialog" destroy-on-close @closed="handleClose">
|
|
|
+ <el-form :model="verify" :rules="rules" ref="form" label-width="100px">
|
|
|
+ <el-form-item label="审核评分" prop="score">
|
|
|
+ <el-input-number v-model="verify.score" :min="0" :max="100" label="请打分"></el-input-number>
|
|
|
+ </el-form-item>
|
|
|
+ <el-form-item label="审核建议" prop="content">
|
|
|
+ <el-input
|
|
|
+ type="textarea"
|
|
|
+ placeholder="请输入审核建议"
|
|
|
+ v-model="verify.content"
|
|
|
+ maxlength="200"
|
|
|
+ :autosize="{ minRows: 4, maxRows: 6 }"
|
|
|
+ show-word-limit
|
|
|
+ >
|
|
|
+ </el-input>
|
|
|
+ </el-form-item>
|
|
|
+ <el-form-item label="">
|
|
|
+ <el-button type="primary" size="mini" @click="onSubmit('form')">提交审核</el-button>
|
|
|
+ </el-form-item>
|
|
|
+ </el-form>
|
|
|
+ </el-dialog>
|
|
|
</div>
|
|
|
</template>
|
|
|
|
|
|
<script>
|
|
|
-import basic from '@/views/adminCenter/adminExamine/parts/basic.vue';
|
|
|
-import brief from '@/views/adminCenter/adminExamine/parts/brief.vue';
|
|
|
-import research from '@/views/adminCenter/adminExamine/parts/research.vue';
|
|
|
-import detailed from '@/views/adminCenter/adminExamine/parts/detailed.vue';
|
|
|
+const _ = require('lodash');
|
|
|
+import detail from './detail.vue';
|
|
|
+import dataTable from '@common/src/components/frame/filter-page-table.vue';
|
|
|
import { mapState, createNamespacedHelpers } from 'vuex';
|
|
|
-const { mapActions: achieveApply } = createNamespacedHelpers('achieveApply');
|
|
|
-const { mapActions: achieveExpert } = createNamespacedHelpers('achieveExpert');
|
|
|
+const { mapActions: achieveApplyExpert } = createNamespacedHelpers('achieveApplyExpert');
|
|
|
export default {
|
|
|
name: 'index',
|
|
|
props: {},
|
|
|
- components: { basic, brief, research, detailed },
|
|
|
+ components: { dataTable, detail },
|
|
|
data: function() {
|
|
|
return {
|
|
|
- active: 'first',
|
|
|
- form: {
|
|
|
- basic: {},
|
|
|
- brief: {},
|
|
|
- research: [],
|
|
|
- datalist: {},
|
|
|
- status: undefined,
|
|
|
- },
|
|
|
+ list: [],
|
|
|
+ total: 0,
|
|
|
+ // 工作类型:1=>评分;2=>会审
|
|
|
+ type: '1',
|
|
|
+ opera: [
|
|
|
+ {
|
|
|
+ label: '评分',
|
|
|
+ method: 'score',
|
|
|
+ },
|
|
|
+ ],
|
|
|
+ fields: [
|
|
|
+ { label: '成果名称', prop: 'achieve_name', showTip: true, custom: true },
|
|
|
+ { label: '成果类别', prop: 'apply_id.basic.achieve_type', showTip: true },
|
|
|
+ { label: '评分', prop: 'verify.score', showTip: true },
|
|
|
+ { label: '状态', prop: 'verify', format: i => (_.isObject(i) ? '已评分' : '未评分') },
|
|
|
+ ],
|
|
|
+ applyDialog: false,
|
|
|
+ apply: {},
|
|
|
+ scoreDialog: false,
|
|
|
+ use_id: undefined,
|
|
|
verify: {},
|
|
|
- rules: {
|
|
|
- score: [{ required: true, message: '请输入审核评分', trigger: 'blur' }],
|
|
|
- content: [{ required: true, message: '请输入审核意见', trigger: 'change' }],
|
|
|
- },
|
|
|
};
|
|
|
},
|
|
|
created() {
|
|
|
this.search();
|
|
|
- this.toGetExpert();
|
|
|
},
|
|
|
methods: {
|
|
|
- ...achieveApply({ getApply: 'fetch' }),
|
|
|
- ...achieveExpert(['fetch', 'update']),
|
|
|
- async search() {
|
|
|
- const res = await this.getApply(this.user.apply_id);
|
|
|
+ ...achieveApplyExpert(['query', 'update']),
|
|
|
+ async search({ skip = 0, limit = 10, ...info } = {}) {
|
|
|
+ const res = await this.query({ skip, limit, ...info, expert_id: this.user.id, type: '1', apply: true });
|
|
|
if (this.$checkRes(res)) {
|
|
|
- this.$set(this, 'form', res.data);
|
|
|
+ this.$set(this, `list`, res.data);
|
|
|
+ this.$set(this, `total`, res.total);
|
|
|
}
|
|
|
},
|
|
|
- async toGetExpert() {
|
|
|
- const res = await this.fetch(this.user._id);
|
|
|
- if (this.$checkRes(res)) {
|
|
|
- const verify = _.get(res.data, 'verify', { score: 0 });
|
|
|
- this.$set(this, 'verify', verify);
|
|
|
- }
|
|
|
+ async toApply(data) {
|
|
|
+ const apply = _.get(data, 'apply_id');
|
|
|
+ this.$set(this, `apply`, apply);
|
|
|
+ this.applyDialog = true;
|
|
|
+ },
|
|
|
+ toScore({ data }) {
|
|
|
+ this.$set(this, `use_id`, _.get(data, '_id'));
|
|
|
+ const verify = _.get(data, 'verify', { score: 0 });
|
|
|
+ this.$set(this, `verify`, _.cloneDeep(verify));
|
|
|
+ this.scoreDialog = true;
|
|
|
},
|
|
|
onSubmit(formName) {
|
|
|
this.$refs[formName].validate(valid => {
|
|
@@ -107,8 +110,22 @@ export default {
|
|
|
},
|
|
|
async toVerify() {
|
|
|
const verify = _.cloneDeep(this.verify);
|
|
|
- const res = await this.update({ id: this.user.id, verify });
|
|
|
- this.$checkRes(res, '审核成功', res.errmsg || '审核失败');
|
|
|
+ const res = await this.update({ id: this.use_id, verify });
|
|
|
+ if (this.$checkRes(res, '审核成功', res.errmsg || '审核失败')) {
|
|
|
+ this.handleClose();
|
|
|
+ this.search();
|
|
|
+ }
|
|
|
+ },
|
|
|
+
|
|
|
+ getProp(data, prop) {
|
|
|
+ return _.get(data, prop);
|
|
|
+ },
|
|
|
+ handleClose() {
|
|
|
+ this.scoreDialog = false;
|
|
|
+ this.applyDialog = false;
|
|
|
+ this.apply = {};
|
|
|
+ this.use_id = undefined;
|
|
|
+ this.verify = {};
|
|
|
},
|
|
|
},
|
|
|
computed: {
|
|
@@ -123,15 +140,4 @@ export default {
|
|
|
};
|
|
|
</script>
|
|
|
|
|
|
-<style lang="less" scoped>
|
|
|
-.main {
|
|
|
- .down {
|
|
|
- .fiveth {
|
|
|
- padding: 0 20%;
|
|
|
- .btn {
|
|
|
- text-align: center;
|
|
|
- }
|
|
|
- }
|
|
|
- }
|
|
|
-}
|
|
|
-</style>
|
|
|
+<style lang="less" scoped></style>
|