数据审核-成果审核页面初始化
This commit is contained in:
@ -39,11 +39,7 @@
|
||||
class="el-upload-list__item ele-upload-list__item-content"
|
||||
v-for="(file, index) in fileList"
|
||||
>
|
||||
<el-link
|
||||
:href="`${baseUrl}${file.url}`"
|
||||
:underline="false"
|
||||
target="_blank"
|
||||
>
|
||||
<el-link :href="`${file.url}`" :underline="false" target="_blank">
|
||||
<span class="el-icon-document"> {{ getFileName(file.name) }} </span>
|
||||
</el-link>
|
||||
<div class="ele-upload-list__item-content-action">
|
||||
@ -167,7 +163,7 @@ export default {
|
||||
// 上传成功回调
|
||||
handleUploadSuccess(res, file) {
|
||||
this.$message.success("上传成功");
|
||||
this.fileList.push({ name: res.fileName, url: res.fileName });
|
||||
this.fileList.push({ name: res.data.filename, url: res.data.url });
|
||||
this.$emit("input", this.listToString(this.fileList));
|
||||
},
|
||||
// 删除文件
|
||||
@ -180,7 +176,7 @@ export default {
|
||||
if (name.lastIndexOf("/") > -1) {
|
||||
return name.slice(name.lastIndexOf("/") + 1).toLowerCase();
|
||||
} else {
|
||||
return "";
|
||||
return name;
|
||||
}
|
||||
},
|
||||
// 对象转成指定字符串分隔
|
||||
|
13
src/main.js
13
src/main.js
@ -20,7 +20,15 @@ import './permission' // permission control
|
||||
import { getDicts } from '@/api/system/dict/data'
|
||||
import { getConfigKey } from '@/api/system/config'
|
||||
import { parseTime, resetForm, addDateRange, selectDictLabel, selectDictLabels, handleTree } from '@/utils/ruoyi'
|
||||
import { modeOptions, educationOptions, enterpriseOptions, patentOptions } from '@/utils/parameter'
|
||||
import {
|
||||
modeOptions,
|
||||
educationOptions,
|
||||
enterpriseOptions,
|
||||
patentOptions,
|
||||
maturityOptions,
|
||||
leadOptions,
|
||||
cooperationOptions,
|
||||
} from '@/utils/parameter'
|
||||
// 分页组件
|
||||
import Pagination from '@/components/Pagination'
|
||||
// 自定义表格工具组件
|
||||
@ -57,6 +65,9 @@ Vue.prototype.modeOptions = modeOptions
|
||||
Vue.prototype.educationOptions = educationOptions
|
||||
Vue.prototype.enterpriseOptions = enterpriseOptions
|
||||
Vue.prototype.patentOptions = patentOptions
|
||||
Vue.prototype.maturityOptions = maturityOptions
|
||||
Vue.prototype.leadOptions = leadOptions
|
||||
Vue.prototype.cooperationOptions = cooperationOptions
|
||||
|
||||
// 全局组件挂载
|
||||
Vue.component('DictTag', DictTag)
|
||||
|
@ -33,9 +33,37 @@ export const enterpriseOptions = [
|
||||
{ key: 102, value: '优质企业' },
|
||||
{ key: 103, value: '普通企业' },
|
||||
]
|
||||
// 成果成熟度 技术
|
||||
export const maturityOptions = [
|
||||
{ key: 1, value: '正在研发' },
|
||||
{ key: 2, value: '小试阶段' },
|
||||
{ key: 3, value: '通过小试' },
|
||||
{ key: 4, value: '中试阶段' },
|
||||
{ key: 5, value: '通过中试' },
|
||||
{ key: 6, value: '可规模生产' },
|
||||
]
|
||||
// 成果领先型 领先标准
|
||||
export const leadOptions = [
|
||||
{ key: 1, value: '国内先进' },
|
||||
{ key: 2, value: '国内领先' },
|
||||
{ key: 3, value: '国际先进' },
|
||||
{ key: 4, value: '国际领先' },
|
||||
]
|
||||
// 专利类型
|
||||
export const patentOptions = [
|
||||
{ key: 1, value: '发明专利' },
|
||||
{ key: 2, value: '外观设计' },
|
||||
{ key: 3, value: '实用新型' },
|
||||
]
|
||||
// 合作模式
|
||||
export const cooperationOptions = [
|
||||
{ key: 101, value: '技术转让' },
|
||||
{ key: 102, value: '技术许可' },
|
||||
{ key: 103, value: '技术入股' },
|
||||
{ key: 104, value: '合作开发' },
|
||||
{ key: 105, value: '融资' },
|
||||
{ key: 106, value: '公司' },
|
||||
{ key: 107, value: '代理加盟' },
|
||||
{ key: 108, value: '市场推广' },
|
||||
{ key: 109, value: '其他' },
|
||||
]
|
||||
|
265
src/views/components/ReleaseForm/index.vue
Normal file
265
src/views/components/ReleaseForm/index.vue
Normal file
@ -0,0 +1,265 @@
|
||||
<template>
|
||||
<el-form
|
||||
ref="formRef"
|
||||
:model="value"
|
||||
:rules="rules"
|
||||
:label-width="labelWidth + 'px'"
|
||||
>
|
||||
<div class="form_title" v-if="showTitle">基本信息</div>
|
||||
|
||||
<el-alert
|
||||
v-if="value.mode == 2"
|
||||
style="margin-bottom: 20px"
|
||||
title="1创新币=1元"
|
||||
type="warning"
|
||||
show-icon
|
||||
:closable="false"
|
||||
></el-alert>
|
||||
|
||||
<el-row v-if="value.mode == 2">
|
||||
<el-col :span="12">
|
||||
<el-form-item label="视频定价:">
|
||||
<el-input v-model="value.title" placeholder="请输入创新币个数">
|
||||
<template #append>创新币</template>
|
||||
</el-input>
|
||||
</el-form-item>
|
||||
</el-col>
|
||||
<el-col :span="12">
|
||||
<el-form-item label="免费观看时长:">
|
||||
<el-input v-model="value.title" placeholder="默认视频的1/3时长">
|
||||
<template #append>min</template>
|
||||
</el-input>
|
||||
</el-form-item>
|
||||
</el-col>
|
||||
</el-row>
|
||||
|
||||
<el-row v-if="value.mode == 2">
|
||||
<el-col :span="24">
|
||||
<el-form-item label="视频文件:">
|
||||
<FileUpload v-model="value.file2" :limit="1" :fileType="['mp4']" />
|
||||
</el-form-item>
|
||||
</el-col>
|
||||
</el-row>
|
||||
|
||||
<el-row>
|
||||
<el-col :span="24">
|
||||
<el-form-item label="成果名称:" prop="title">
|
||||
<el-input
|
||||
v-model="value.title"
|
||||
placeholder="请输入成果名称"
|
||||
></el-input>
|
||||
</el-form-item>
|
||||
</el-col>
|
||||
</el-row>
|
||||
|
||||
<FieldOptions v-model="value" :labelWidth="labelWidth" ref="fieldForm" />
|
||||
|
||||
<InputBoxAdd
|
||||
:labelWidth="labelWidth"
|
||||
v-model="value"
|
||||
title="应用客户"
|
||||
placeholder="请输入应用客户"
|
||||
fieldKey="customer"
|
||||
ref="customerForm"
|
||||
/>
|
||||
|
||||
<el-row>
|
||||
<el-col :span="24">
|
||||
<el-form-item label="成果成熟度:" prop="maturity">
|
||||
<el-select
|
||||
v-model="value.maturity"
|
||||
clearable
|
||||
placeholder="请选择成果成熟度"
|
||||
>
|
||||
<el-option
|
||||
v-for="item in maturityOptions"
|
||||
:key="item.key"
|
||||
:label="item.value"
|
||||
:value="item.key"
|
||||
>
|
||||
</el-option>
|
||||
</el-select>
|
||||
</el-form-item>
|
||||
</el-col>
|
||||
</el-row>
|
||||
<el-row>
|
||||
<el-col :span="24">
|
||||
<el-form-item label="成果领先性:" prop="lead_standard">
|
||||
<el-select
|
||||
v-model="value.lead_standard"
|
||||
clearable
|
||||
placeholder="请选择成果领先性"
|
||||
>
|
||||
<el-option
|
||||
v-for="item in leadOptions"
|
||||
:key="item.key"
|
||||
:label="item.value"
|
||||
:value="item.key"
|
||||
>
|
||||
</el-option>
|
||||
</el-select>
|
||||
</el-form-item>
|
||||
</el-col>
|
||||
</el-row>
|
||||
<el-row>
|
||||
<el-col :span="24">
|
||||
<el-form-item label="合作模式:">
|
||||
<el-select
|
||||
v-model="value.cooperation_mode"
|
||||
clearable
|
||||
placeholder="请选择合作模式"
|
||||
>
|
||||
<el-option
|
||||
v-for="item in cooperationOptions"
|
||||
:key="item.key"
|
||||
:label="item.value"
|
||||
:value="item.key"
|
||||
>
|
||||
</el-option>
|
||||
</el-select>
|
||||
</el-form-item>
|
||||
</el-col>
|
||||
</el-row>
|
||||
|
||||
<InputBoxAdd
|
||||
v-if="value.mode == 2"
|
||||
:labelWidth="labelWidth"
|
||||
v-model="value"
|
||||
title="应用场景"
|
||||
placeholder="请输入应用场景"
|
||||
fieldKey="kws"
|
||||
ref="directionsForm"
|
||||
/>
|
||||
|
||||
<InputBoxAdd
|
||||
:labelWidth="labelWidth"
|
||||
v-model="value"
|
||||
title="关键词"
|
||||
placeholder="请输入关键词"
|
||||
fieldKey="keywords"
|
||||
ref="keywordsForm"
|
||||
/>
|
||||
|
||||
<el-row>
|
||||
<el-col :span="24">
|
||||
<el-form-item label="成果简介:" prop="description">
|
||||
<el-input
|
||||
v-model="value.description"
|
||||
type="textarea"
|
||||
:autosize="{ minRows: 2, maxRows: 8 }"
|
||||
/>
|
||||
</el-form-item>
|
||||
</el-col>
|
||||
</el-row>
|
||||
<el-row>
|
||||
<el-col :span="24">
|
||||
<el-form-item label="成果来源:">
|
||||
<Editor v-model="value.introduce" :minHeight="150" />
|
||||
</el-form-item>
|
||||
</el-col>
|
||||
</el-row>
|
||||
<el-row v-if="value.mode == 1">
|
||||
<el-col :span="24">
|
||||
<el-form-item label="成果图片:" prop="image">
|
||||
<ImageUpload v-model="value.image" :isShowTip="false" :limit="1" />
|
||||
</el-form-item>
|
||||
</el-col>
|
||||
</el-row>
|
||||
<p>
|
||||
<b>图片材料上传</b>
|
||||
</p>
|
||||
<el-row>
|
||||
<el-col :span="24">
|
||||
<el-form-item label="成熟度证明材料:">
|
||||
<FileUpload
|
||||
v-model="value.file"
|
||||
:limit="1"
|
||||
:fileType="['doc', 'xls', 'ppt', 'txt', 'pdf', 'jpg']"
|
||||
/>
|
||||
</el-form-item>
|
||||
</el-col>
|
||||
</el-row>
|
||||
</el-form>
|
||||
</template>
|
||||
<script>
|
||||
import CityOptions from "@/views/components/CityOptions";
|
||||
import FieldOptions from "@/views/components/FieldOptions";
|
||||
import InputBoxAdd from "@/views/components/InputBoxAdd";
|
||||
export default {
|
||||
components: {
|
||||
CityOptions,
|
||||
FieldOptions,
|
||||
InputBoxAdd,
|
||||
},
|
||||
props: {
|
||||
value: Object,
|
||||
isAdd: {
|
||||
type: Boolean,
|
||||
default: true,
|
||||
},
|
||||
showTitle: {
|
||||
type: Boolean,
|
||||
default: false,
|
||||
},
|
||||
labelWidth: {
|
||||
type: Number,
|
||||
default: 120,
|
||||
},
|
||||
},
|
||||
data() {
|
||||
return {
|
||||
rules: {
|
||||
title: [{ required: true, message: "请输入", trigger: "blur" }],
|
||||
maturity: [{ required: true, message: "请选择", trigger: "change" }],
|
||||
lead_standard: [
|
||||
{ required: true, message: "请选择", trigger: "change" },
|
||||
],
|
||||
description: [{ required: true, message: "请输入", trigger: "blur" }],
|
||||
image: [
|
||||
{ required: true, message: "请上传", trigger: ["change", "blur"] },
|
||||
],
|
||||
},
|
||||
};
|
||||
},
|
||||
methods: {
|
||||
submitForm() {
|
||||
let flag = false;
|
||||
this.$refs["formRef"].validate((valid) => {
|
||||
const fieldForm = this.$refs.fieldForm.submitForm();
|
||||
const customerForm = this.$refs.customerForm.submitForm();
|
||||
console.log();
|
||||
const directionsForm =
|
||||
this.value.mode == 2 ? this.$refs.directionsForm.submitForm() : true;
|
||||
const keywordsForm = this.$refs.keywordsForm.submitForm();
|
||||
if (
|
||||
valid &&
|
||||
fieldForm &&
|
||||
customerForm &&
|
||||
directionsForm &&
|
||||
keywordsForm
|
||||
) {
|
||||
flag = !flag;
|
||||
}
|
||||
});
|
||||
return flag;
|
||||
},
|
||||
},
|
||||
};
|
||||
</script>
|
||||
<style lang="scss" scoped>
|
||||
.form_title {
|
||||
font-weight: 700;
|
||||
margin-bottom: 30px;
|
||||
}
|
||||
// 上传图片框限制
|
||||
// ::v-deep .el-upload--picture-card {
|
||||
// width: 120px;
|
||||
// height: 120px;
|
||||
// line-height: 120px;
|
||||
// }
|
||||
.el-select,
|
||||
.el-date-editor {
|
||||
display: block;
|
||||
width: 100%;
|
||||
}
|
||||
</style>
|
93
src/views/dataAudit/achievement/examine.vue
Normal file
93
src/views/dataAudit/achievement/examine.vue
Normal file
@ -0,0 +1,93 @@
|
||||
<template>
|
||||
<div class="app-container">
|
||||
<div style="width: 50%">
|
||||
<ReleaseForm
|
||||
v-model="form"
|
||||
:showTitle="true"
|
||||
:formType="formType"
|
||||
:labelWidth="labelWidth"
|
||||
ref="releaseRef"
|
||||
/>
|
||||
</div>
|
||||
<div :style="{ marginLeft: labelWidth + 'px' }">
|
||||
<el-button @click="submitForm(3)">审核拒绝</el-button>
|
||||
<el-button type="primary" @click="submitForm(2)">通过审核</el-button>
|
||||
</div>
|
||||
</div>
|
||||
</template>
|
||||
<script>
|
||||
import ReleaseForm from "@/views/components/ReleaseForm";
|
||||
export default {
|
||||
components: {
|
||||
ReleaseForm,
|
||||
},
|
||||
data() {
|
||||
return {
|
||||
formType: 2,
|
||||
labelWidth: 140,
|
||||
form: {
|
||||
id: undefined,
|
||||
mode: 1,
|
||||
title: undefined,
|
||||
industrys: [],
|
||||
customer: [],
|
||||
maturity: undefined,
|
||||
lead_standard: undefined,
|
||||
cooperation_mode: undefined,
|
||||
keywords: [],
|
||||
description: undefined,
|
||||
introduce: undefined,
|
||||
image: undefined,
|
||||
file: undefined,
|
||||
},
|
||||
};
|
||||
},
|
||||
methods: {
|
||||
submitForm(status) {
|
||||
console.log(this.form);
|
||||
if (this.$refs["releaseRef"].submitForm()) {
|
||||
const str =
|
||||
status == 2
|
||||
? "<span style='color:green'>通过</span>"
|
||||
: "<span class='el-message-box__errormsg'>拒绝</span>";
|
||||
this.$prompt(`您将 ${str} 该数据审核,请输入处理备注`, "审核", {
|
||||
dangerouslyUseHTMLString: true,
|
||||
confirmButtonText: "确定",
|
||||
cancelButtonText: "取消",
|
||||
closeOnClickModal: false,
|
||||
inputType: "textarea",
|
||||
inputPattern: status == 2 ? "" : /^.{1,30}$/,
|
||||
inputErrorMessage: "请输入拒绝原因",
|
||||
})
|
||||
.then(({ value }) => {
|
||||
expertEdit(this.form).then((res) => {
|
||||
if (res.code == 200) {
|
||||
const query = {
|
||||
id: this.form.id,
|
||||
status,
|
||||
remark: value,
|
||||
};
|
||||
expertExamine(query).then((res) => {
|
||||
this.$store.dispatch("tagsView/delView", this.$route);
|
||||
this.$router.go(-1);
|
||||
this.$modal.msgSuccess("处理成功");
|
||||
});
|
||||
}
|
||||
});
|
||||
})
|
||||
.catch(() => {});
|
||||
} else {
|
||||
console.log("校验未通过");
|
||||
}
|
||||
},
|
||||
},
|
||||
created() {
|
||||
const { id } = this.$route.query;
|
||||
if (id) {
|
||||
agentDetail({ id }).then((res) => {
|
||||
this.form = res.data;
|
||||
});
|
||||
}
|
||||
},
|
||||
};
|
||||
</script>
|
@ -25,7 +25,7 @@
|
||||
>
|
||||
</el-form-item>
|
||||
</el-form>
|
||||
<el-tabs v-model="activeName" @tab-click="handleClick">
|
||||
<el-tabs v-model="queryParams.activeName" @tab-click="handleClick">
|
||||
<el-tab-pane label="待审核" name="1"></el-tab-pane>
|
||||
<el-tab-pane label="已驳回" name="3"></el-tab-pane>
|
||||
<el-tab-pane label="已通过" name="2"></el-tab-pane>
|
||||
@ -37,13 +37,13 @@
|
||||
<el-table-column label="所属专家" align="center" prop="laboratory_name" />
|
||||
<el-table-column label="研究机构" align="center" prop="area" />
|
||||
<el-table-column
|
||||
v-if="activeName == 2"
|
||||
v-if="queryParams.activeName == 2"
|
||||
label="浏览量"
|
||||
align="center"
|
||||
prop="area"
|
||||
/>
|
||||
<el-table-column
|
||||
v-if="activeName == 2"
|
||||
v-if="queryParams.activeName == 2"
|
||||
label="收藏量"
|
||||
align="center"
|
||||
prop="area"
|
||||
@ -55,17 +55,41 @@
|
||||
<el-button
|
||||
size="mini"
|
||||
type="text"
|
||||
icon="el-icon-edit"
|
||||
@click="handleEdit(scope.row.id)"
|
||||
>修改</el-button
|
||||
@click="handleExamine(scope.row.id)"
|
||||
v-if="queryParams.activeName == 1"
|
||||
>
|
||||
审核
|
||||
</el-button>
|
||||
<el-button
|
||||
size="mini"
|
||||
type="text"
|
||||
icon="el-icon-plus"
|
||||
@click="handleClaim(scope.row.id)"
|
||||
>认领专利</el-button
|
||||
@click="handleExamine(scope.row.id)"
|
||||
v-if="queryParams.activeName == 3"
|
||||
>
|
||||
查看
|
||||
</el-button>
|
||||
<!-- <el-button
|
||||
size="mini"
|
||||
type="text"
|
||||
@click="handleClaim(scope.row.id)"
|
||||
v-if="queryParams.activeName == 2"
|
||||
>
|
||||
下架
|
||||
</el-button> -->
|
||||
<el-button
|
||||
size="mini"
|
||||
type="text"
|
||||
@click="handleDelete(scope.row.id)"
|
||||
v-if="queryParams.activeName != 1"
|
||||
>
|
||||
删除
|
||||
</el-button>
|
||||
<div v-if="queryParams.activeName == 2">
|
||||
<el-button size="mini" type="text" @click="handleAdd(scope.row.id)">
|
||||
上传视频
|
||||
</el-button>
|
||||
<el-button size="mini" type="text" @click=""> 删除视频 </el-button>
|
||||
</div>
|
||||
</template>
|
||||
</el-table-column>
|
||||
</el-table>
|
||||
@ -76,6 +100,30 @@
|
||||
:limit.sync="queryParams.page_size"
|
||||
@pagination="getList"
|
||||
/>
|
||||
<!-- 上传视频对话框 -->
|
||||
<el-dialog :title="title" :visible.sync="open" width="520px" append-to-body>
|
||||
<el-form ref="form" :model="form" :rules="rules" label-width="100px">
|
||||
<el-form-item label="视频类型" prop="type">
|
||||
<el-select v-model="form.type" placeholder="请选择">
|
||||
<el-option label="静态视频" value="1"> </el-option>
|
||||
<el-option label="视频地址" value="2"> </el-option>
|
||||
</el-select>
|
||||
</el-form-item>
|
||||
<el-form-item label="视频地址:" prop="file">
|
||||
<FileUpload
|
||||
v-model="form.file"
|
||||
:limit="1"
|
||||
:fileType="['mp4']"
|
||||
v-if="form.type == 1"
|
||||
/>
|
||||
<el-input v-model="form.file" placeholder="请输入视频地址" v-else />
|
||||
</el-form-item>
|
||||
</el-form>
|
||||
<div slot="footer" class="dialog-footer">
|
||||
<el-button type="primary" @click="submitForm">确 定</el-button>
|
||||
<el-button @click="cancel">取 消</el-button>
|
||||
</div>
|
||||
</el-dialog>
|
||||
</div>
|
||||
</template>
|
||||
<script>
|
||||
@ -95,7 +143,21 @@ export default {
|
||||
page_size: 10,
|
||||
activeName: "1",
|
||||
},
|
||||
activeName: "1",
|
||||
// 弹出层标题
|
||||
title: "",
|
||||
// 是否显示弹出层
|
||||
open: false,
|
||||
// 表单参数
|
||||
form: {},
|
||||
rules: {
|
||||
file: [
|
||||
{
|
||||
required: true,
|
||||
message: "视频地址不能为空",
|
||||
trigger: ["blur", "change"],
|
||||
},
|
||||
],
|
||||
},
|
||||
};
|
||||
},
|
||||
methods: {
|
||||
@ -126,6 +188,56 @@ export default {
|
||||
this.$refs["tableRef"].doLayout();
|
||||
});
|
||||
},
|
||||
handleExamine(id) {
|
||||
this.$router.push({
|
||||
path: "/dataAudit/achievementExamine",
|
||||
query: { id },
|
||||
});
|
||||
},
|
||||
// 取消按钮
|
||||
cancel() {
|
||||
this.open = false;
|
||||
this.reset();
|
||||
},
|
||||
/** 新增视频按钮操作 */
|
||||
handleAdd(row) {
|
||||
this.reset();
|
||||
this.open = true;
|
||||
this.title = "添加视频";
|
||||
},
|
||||
// 表单重置
|
||||
reset() {
|
||||
this.form = {
|
||||
type: "1",
|
||||
file: undefined,
|
||||
};
|
||||
this.resetForm("form");
|
||||
},
|
||||
/** 提交按钮 */
|
||||
submitForm() {
|
||||
this.$refs["form"].validate((valid) => {
|
||||
if (valid) {
|
||||
// aboutAdd(this.form).then((response) => {
|
||||
// this.$modal.msgSuccess("新增成功");
|
||||
// this.open = false;
|
||||
// this.getList();
|
||||
// });
|
||||
}
|
||||
});
|
||||
},
|
||||
/** 删除按钮操作 */
|
||||
handleDelete(id) {
|
||||
this.$modal
|
||||
.confirm('是否确认删除成果编号为"' + id + '"的数据项?')
|
||||
.then(function () {
|
||||
return tenantDelete({ id });
|
||||
})
|
||||
.then(() => {
|
||||
this.getList();
|
||||
this.$modal.msgSuccess("删除成功");
|
||||
})
|
||||
.catch(() => {});
|
||||
},
|
||||
},
|
||||
created() {
|
||||
this.getList();
|
||||
|
Reference in New Issue
Block a user