|
@@ -4,12 +4,12 @@
|
|
|
<div class="app-container">
|
|
|
<!--标题1-->
|
|
|
<div class="title-box">
|
|
|
- <div class="blue-line inline"></div>
|
|
|
+ <div class="blue-line inline" />
|
|
|
<div class="inline titleWord">实验室建设期内获奖明细</div>
|
|
|
<div class="inline note">(建设期不足五年的新建实验室可不填)</div>
|
|
|
<div class="remark">*注:省部级以下奖不填;省部级合作获奖不填;获奖人须为核心成员;获奖仅填写1次,不得多实验室重复填写。*</div>
|
|
|
</div>
|
|
|
- <el-form :model="queryParams" ref="queryForm" :inline="true" v-show="showSearch" label-width="68px">
|
|
|
+ <el-form v-show="showSearch" ref="queryForm" :model="queryParams" :inline="true" label-width="68px">
|
|
|
<el-form-item label="类别" prop="type">
|
|
|
<el-select v-model="queryParams.type" placeholder="请选择类别" clearable size="small">
|
|
|
<el-option
|
|
@@ -56,18 +56,18 @@
|
|
|
:key="dict.id"
|
|
|
:label="dict.name"
|
|
|
:value="dict.id"
|
|
|
- ></el-option>
|
|
|
+ />
|
|
|
</el-select>
|
|
|
</el-form-item>
|
|
|
<!--<el-form-item label="获奖人" prop="userId">-->
|
|
|
- <!--<el-select v-model="queryParams.userId" placeholder="请选择" clearable size="small">-->
|
|
|
- <!--<el-option-->
|
|
|
- <!--v-for="dict in userId"-->
|
|
|
- <!--:key="dict.id"-->
|
|
|
- <!--:label="dict.name"-->
|
|
|
- <!--:value="dict.id"-->
|
|
|
- <!--></el-option>-->
|
|
|
- <!--</el-select>-->
|
|
|
+ <!--<el-select v-model="queryParams.userId" placeholder="请选择" clearable size="small">-->
|
|
|
+ <!--<el-option-->
|
|
|
+ <!--v-for="dict in userId"-->
|
|
|
+ <!--:key="dict.id"-->
|
|
|
+ <!--:label="dict.name"-->
|
|
|
+ <!--:value="dict.id"-->
|
|
|
+ <!--></el-option>-->
|
|
|
+ <!--</el-select>-->
|
|
|
|
|
|
<!--</el-form-item>-->
|
|
|
<el-form-item>
|
|
@@ -75,65 +75,65 @@
|
|
|
<el-button icon="el-icon-refresh" size="mini" @click="resetQuery">重置</el-button>
|
|
|
</el-form-item>
|
|
|
</el-form>
|
|
|
- <div class="spliceLine"></div>
|
|
|
+ <div class="spliceLine" />
|
|
|
<el-row :gutter="10" class="mb8">
|
|
|
<el-col :span="1.5">
|
|
|
<el-button
|
|
|
+ v-hasPermi="['system:patent:add']"
|
|
|
type="primary"
|
|
|
plain
|
|
|
icon="el-icon-plus"
|
|
|
size="mini"
|
|
|
@click="handleAdd"
|
|
|
- v-hasPermi="['system:patent:add']"
|
|
|
>新增</el-button>
|
|
|
</el-col>
|
|
|
<el-col :span="1.5">
|
|
|
<el-button
|
|
|
+ v-hasPermi="['system:patent:edit']"
|
|
|
type="success"
|
|
|
plain
|
|
|
icon="el-icon-edit"
|
|
|
size="mini"
|
|
|
:disabled="single"
|
|
|
@click="handleUpdate"
|
|
|
- v-hasPermi="['system:patent:edit']"
|
|
|
>修改</el-button>
|
|
|
</el-col>
|
|
|
<el-col :span="1.5">
|
|
|
<el-button
|
|
|
+ v-hasPermi="['system:patent:remove']"
|
|
|
type="danger"
|
|
|
plain
|
|
|
icon="el-icon-delete"
|
|
|
size="mini"
|
|
|
:disabled="multiple"
|
|
|
@click="handleDelete"
|
|
|
- v-hasPermi="['system:patent:remove']"
|
|
|
>删除</el-button>
|
|
|
</el-col>
|
|
|
<el-col :span="1.5">
|
|
|
<el-button
|
|
|
+ v-hasPermi="['system:patent:export']"
|
|
|
type="warning"
|
|
|
plain
|
|
|
icon="el-icon-download"
|
|
|
size="mini"
|
|
|
- :loading="exportLoading"
|
|
|
+ :loading="exportLoading"
|
|
|
@click="handleExport"
|
|
|
- v-hasPermi="['system:patent:export']"
|
|
|
>导出</el-button>
|
|
|
</el-col>
|
|
|
- <right-toolbar :showSearch.sync="showSearch" @queryTable="getList"></right-toolbar>
|
|
|
+ <right-toolbar :show-search.sync="showSearch" @queryTable="getList" />
|
|
|
</el-row>
|
|
|
|
|
|
<el-table v-loading="loading" :data="patentList" @selection-change="handleSelectionChange">
|
|
|
<el-table-column type="selection" width="55" align="center" />
|
|
|
- <el-table-column label="类别" align="left" prop="type" :formatter="typeFormat"/>
|
|
|
+ <el-table-column label="类别" align="left" prop="type" :formatter="typeFormat" />
|
|
|
<el-table-column label="成果编号" align="left" prop="resulnumber" />
|
|
|
<el-table-column label="成果名称" align="left" prop="name" />
|
|
|
- <el-table-column label="获奖等级" align="left" prop="level" :formatter="levelFormat"/>
|
|
|
- <el-table-column label="研究方向" align="left" prop="directionName" />
|
|
|
- <el-table-column label="获奖人" align="left" >
|
|
|
+ <el-table-column label="获奖等级" align="left" prop="level" :formatter="levelFormat" />
|
|
|
+ <el-table-column label="研究方向" align="left" prop="directionName" />
|
|
|
+ <el-table-column label="获奖人" align="left">
|
|
|
<template slot-scope="scope">
|
|
|
<el-tag v-for="item in scope.row.person">
|
|
|
- {{ item.userName+ 'No.'+item.level}}
|
|
|
+ {{ item.userName+ 'No.'+item.level }}
|
|
|
</el-tag>
|
|
|
</template>
|
|
|
|
|
@@ -141,27 +141,27 @@
|
|
|
<el-table-column label="操作" align="center" class-name="small-padding fixed-width">
|
|
|
<template slot-scope="scope">
|
|
|
<el-button
|
|
|
+ v-hasPermi="['system:patent:edit']"
|
|
|
size="mini"
|
|
|
type="text"
|
|
|
icon="el-icon-edit"
|
|
|
@click="handleUpdate(scope.row)"
|
|
|
- v-hasPermi="['system:patent:edit']"
|
|
|
>修改</el-button>
|
|
|
<el-button
|
|
|
+ v-hasPermi="['system:patent:remove']"
|
|
|
size="mini"
|
|
|
type="text"
|
|
|
icon="el-icon-delete"
|
|
|
- @click="handleDelete(scope.row)"
|
|
|
- v-hasPermi="['system:patent:remove']"
|
|
|
style="color: #F56C6C;"
|
|
|
+ @click="handleDelete(scope.row)"
|
|
|
>删除</el-button>
|
|
|
<el-button
|
|
|
+ v-hasPermi="['system:patent:remove']"
|
|
|
size="mini"
|
|
|
type="text"
|
|
|
icon="el-icon-upload2"
|
|
|
- @click="handleUpload(scope.row)"
|
|
|
- v-hasPermi="['system:patent:remove']"
|
|
|
style="color: #E6A23C;"
|
|
|
+ @click="handleUpload(scope.row)"
|
|
|
>附件</el-button>
|
|
|
</template>
|
|
|
</el-table-column>
|
|
@@ -185,7 +185,7 @@
|
|
|
:key="dict.dictValue"
|
|
|
:label="dict.dictLabel"
|
|
|
:value="dict.dictValue"
|
|
|
- ></el-option>
|
|
|
+ />
|
|
|
</el-select>
|
|
|
</el-form-item>
|
|
|
<el-form-item label="成果编号" prop="resulnumber">
|
|
@@ -201,7 +201,7 @@
|
|
|
:key="dict.dictValue"
|
|
|
:label="dict.dictLabel"
|
|
|
:value="dict.dictValue"
|
|
|
- ></el-option>
|
|
|
+ />
|
|
|
</el-select>
|
|
|
</el-form-item>
|
|
|
<el-form-item label="研究方向" prop="direction">
|
|
@@ -212,7 +212,7 @@
|
|
|
:key="dict.id"
|
|
|
:label="dict.name"
|
|
|
:value="dict.id"
|
|
|
- ></el-option>
|
|
|
+ />
|
|
|
</el-select>
|
|
|
</el-form-item>
|
|
|
<!--<el-select v-model="form.userId" placeholder="请选择获奖人">-->
|
|
@@ -232,11 +232,11 @@
|
|
|
v-for="(item, index) in personnelList"
|
|
|
:key="item.id"
|
|
|
:label="item.id"
|
|
|
- @change = "asdzxc(index)"
|
|
|
+ @change="asdzxc(index)"
|
|
|
>{{ item.name }}
|
|
|
- <el-input-number v-if="!asdasd[index]" v-model="personlevel[index]" placeholder="排序" :min="0"/>
|
|
|
+ <el-input-number v-if="!asdasd[index]" v-model="personlevel[index]" placeholder="排序" :min="0" />
|
|
|
<!--<el-input-number :disabled="asdasd[index]" v-model="personlevel[index]" placeholder="排序" :min="0"/>-->
|
|
|
- </el-checkbox>
|
|
|
+ </el-checkbox>
|
|
|
</el-checkbox-group>
|
|
|
</el-form-item>
|
|
|
</el-form>
|
|
@@ -258,36 +258,42 @@
|
|
|
list-type="picture-card"
|
|
|
:on-change="handleChange"
|
|
|
>
|
|
|
- <i slot="default" class="el-icon-plus"></i>
|
|
|
+ <i slot="default" class="el-icon-plus" />
|
|
|
<div slot="file" slot-scope="{file}">
|
|
|
- <img v-if="file.picture"
|
|
|
- class="el-upload-list__item-thumbnail"
|
|
|
- :src="file.url" alt="">
|
|
|
+ <img
|
|
|
+ v-if="file.picture"
|
|
|
+ class="el-upload-list__item-thumbnail"
|
|
|
+ :src="file.url"
|
|
|
+ alt=""
|
|
|
+ >
|
|
|
<div v-else>
|
|
|
- <img class="el-upload-list__item-thumbnail wordIcon"
|
|
|
- :src="wordImg" alt="">
|
|
|
- <div>{{file.name}}</div>
|
|
|
+ <img
|
|
|
+ class="el-upload-list__item-thumbnail wordIcon"
|
|
|
+ :src="wordImg"
|
|
|
+ alt=""
|
|
|
+ >
|
|
|
+ <div>{{ file.name }}</div>
|
|
|
</div>
|
|
|
<span class="el-upload-list__item-actions">
|
|
|
<!--<span-->
|
|
|
- <!--class="el-upload-list__item-preview"-->
|
|
|
- <!--@click="handlePictureCardPreview(file)"-->
|
|
|
+ <!--class="el-upload-list__item-preview"-->
|
|
|
+ <!--@click="handlePictureCardPreview(file)"-->
|
|
|
<!-->-->
|
|
|
- <!--<i class="el-icon-zoom-in"></i>-->
|
|
|
+ <!--<i class="el-icon-zoom-in"></i>-->
|
|
|
<!--</span>-->
|
|
|
<span
|
|
|
v-if="!disabled"
|
|
|
class="el-upload-list__item-delete"
|
|
|
@click="handleDownload(file)"
|
|
|
>
|
|
|
- <i class="el-icon-download"></i>
|
|
|
+ <i class="el-icon-download" />
|
|
|
</span>
|
|
|
<span
|
|
|
v-if="!disabled"
|
|
|
class="el-upload-list__item-delete"
|
|
|
@click="handleRemove(file)"
|
|
|
>
|
|
|
- <i class="el-icon-delete"></i>
|
|
|
+ <i class="el-icon-delete" />
|
|
|
</span>
|
|
|
</span>
|
|
|
</div>
|
|
@@ -303,9 +309,11 @@
|
|
|
<img v-if="picture" width="100%" :src="dialogImageUrl" alt="图片加载失败">
|
|
|
<div v-else>文件请下载查看详情</div>
|
|
|
<div>
|
|
|
- <el-button type="primary" @click="handleDownload(dialogImageUrl)"
|
|
|
- icon="el-icon-download"
|
|
|
- style="text-align: center; margin-top: 30px;"
|
|
|
+ <el-button
|
|
|
+ type="primary"
|
|
|
+ icon="el-icon-download"
|
|
|
+ style="text-align: center; margin-top: 30px;"
|
|
|
+ @click="handleDownload(dialogImageUrl)"
|
|
|
>下载附件</el-button>
|
|
|
</div>
|
|
|
</el-dialog>
|
|
@@ -315,36 +323,36 @@
|
|
|
</template>
|
|
|
|
|
|
<script>
|
|
|
-import { listPatent, getPatent, delPatent, addPatent, updatePatent, exportPatent } from "@/api/system/patent";
|
|
|
-import { listPersonnel,listPersonnelsss} from "@/api/system/personnel";
|
|
|
-import { listDirection} from "@/api/system/direction";
|
|
|
-import { listFile ,delFile} from "@/api/system/file";
|
|
|
-import { getToken } from "@/utils/auth";
|
|
|
+import { listPatent, getPatent, delPatent, addPatent, updatePatent, exportPatent } from '@/api/system/patent'
|
|
|
+import { listPersonnel, listPersonnelsss } from '@/api/system/personnel'
|
|
|
+import { listDirection } from '@/api/system/direction'
|
|
|
+import { listFile, delFile } from '@/api/system/file'
|
|
|
+import { getToken } from '@/utils/auth'
|
|
|
|
|
|
export default {
|
|
|
- name: "Patent",
|
|
|
+ name: 'Patent',
|
|
|
components: {
|
|
|
},
|
|
|
data() {
|
|
|
return {
|
|
|
- listId:"",
|
|
|
+ listId: '',
|
|
|
// 遮罩层
|
|
|
loading: true,
|
|
|
// 导出遮罩层
|
|
|
exportLoading: false,
|
|
|
// 选中数组
|
|
|
ids: [],
|
|
|
- //类别字典
|
|
|
+ // 类别字典
|
|
|
type: [],
|
|
|
- asdasd:[],
|
|
|
- //获奖人
|
|
|
- person:[],
|
|
|
+ asdasd: [],
|
|
|
+ // 获奖人
|
|
|
+ person: [],
|
|
|
personnelList: [],
|
|
|
- personlevel:[],
|
|
|
+ personlevel: [],
|
|
|
|
|
|
- //等级字典
|
|
|
+ // 等级字典
|
|
|
level: [],
|
|
|
- //方向字典
|
|
|
+ // 方向字典
|
|
|
direction: [],
|
|
|
// 非单个禁用
|
|
|
single: true,
|
|
@@ -352,16 +360,16 @@ export default {
|
|
|
multiple: true,
|
|
|
// 显示搜索条件
|
|
|
showSearch: true,
|
|
|
- //临时id
|
|
|
- filesssssid:null,
|
|
|
+ // 临时id
|
|
|
+ filesssssid: null,
|
|
|
// 总条数
|
|
|
total: 0,
|
|
|
// 获奖情况表格数据
|
|
|
patentList: [],
|
|
|
// 弹出层标题
|
|
|
- title: "",
|
|
|
- //附件列表
|
|
|
- loadList:[],
|
|
|
+ title: '',
|
|
|
+ // 附件列表
|
|
|
+ loadList: [],
|
|
|
// 是否显示弹出层
|
|
|
open: false,
|
|
|
|
|
@@ -374,7 +382,7 @@ export default {
|
|
|
resulnumber: null,
|
|
|
name: null,
|
|
|
direction: null,
|
|
|
- userId: null,
|
|
|
+ userId: null
|
|
|
},
|
|
|
|
|
|
// 文件查询参数
|
|
@@ -384,57 +392,57 @@ export default {
|
|
|
fileName: null,
|
|
|
fliePath: null,
|
|
|
moduleName: null,
|
|
|
- moduleId: null,
|
|
|
+ moduleId: null
|
|
|
},
|
|
|
// 表单参数
|
|
|
form: {},
|
|
|
// 表单校验
|
|
|
rules: {
|
|
|
delFlag: [
|
|
|
- { required: true, message: "删除标识不能为空", trigger: "blur" }
|
|
|
+ { required: true, message: '删除标识不能为空', trigger: 'blur' }
|
|
|
],
|
|
|
createTime: [
|
|
|
- { required: true, message: "创建时间不能为空", trigger: "blur" }
|
|
|
+ { required: true, message: '创建时间不能为空', trigger: 'blur' }
|
|
|
],
|
|
|
createBy: [
|
|
|
- { required: true, message: "创建人不能为空", trigger: "blur" }
|
|
|
- ],
|
|
|
+ { required: true, message: '创建人不能为空', trigger: 'blur' }
|
|
|
+ ]
|
|
|
},
|
|
|
- //上传附件弹出层
|
|
|
- upLoadBox:false,
|
|
|
- //上传附件
|
|
|
+ // 上传附件弹出层
|
|
|
+ upLoadBox: false,
|
|
|
+ // 上传附件
|
|
|
dialogImageUrl: '',
|
|
|
dialogVisible: false,
|
|
|
disabled: false,
|
|
|
- //判断是否为图片
|
|
|
- picture:true,
|
|
|
- uploadImgUrl: process.env.VUE_APP_BASE_API + "/common/upload/patent", // 上传的图片服务器地址
|
|
|
+ // 判断是否为图片
|
|
|
+ picture: true,
|
|
|
+ uploadImgUrl: process.env.VUE_APP_BASE_API + '/common/upload/patent', // 上传的图片服务器地址
|
|
|
headers: {
|
|
|
- Authorization: "Bearer " + getToken(),
|
|
|
- },
|
|
|
- };
|
|
|
+ Authorization: 'Bearer ' + getToken()
|
|
|
+ }
|
|
|
+ }
|
|
|
},
|
|
|
created() {
|
|
|
- this.getList();
|
|
|
- this.getPerson();
|
|
|
- this.getFangxiang();
|
|
|
- this.getDicts("jiang_type").then(response => {
|
|
|
- this.type = response.data;
|
|
|
- });
|
|
|
- this.getDicts("jiang_level").then(response => {
|
|
|
- this.level = response.data;
|
|
|
- });
|
|
|
+ this.getList()
|
|
|
+ this.getPerson()
|
|
|
+ this.getFangxiang()
|
|
|
+ this.getDicts('jiang_type').then(response => {
|
|
|
+ this.type = response.data
|
|
|
+ })
|
|
|
+ this.getDicts('jiang_level').then(response => {
|
|
|
+ this.level = response.data
|
|
|
+ })
|
|
|
},
|
|
|
methods: {
|
|
|
- asdzxc(e){
|
|
|
+ asdzxc(e) {
|
|
|
console.log(e)
|
|
|
// this.asdasd[e]?this.asdasd[e]=false:this.asdasd[e]=true
|
|
|
- if(this.asdasd[e]){
|
|
|
- this.asdasd[e]=false;
|
|
|
- this.personlevel[e] = ""
|
|
|
- }else{
|
|
|
- this.asdasd[e]=true;
|
|
|
- this.personlevel[e] = ""
|
|
|
+ if (this.asdasd[e]) {
|
|
|
+ this.asdasd[e] = false
|
|
|
+ this.personlevel[e] = ''
|
|
|
+ } else {
|
|
|
+ this.asdasd[e] = true
|
|
|
+ this.personlevel[e] = ''
|
|
|
}
|
|
|
console.log(this.asdasd)
|
|
|
|
|
@@ -442,33 +450,33 @@ export default {
|
|
|
},
|
|
|
/** 查询获奖情况列表 */
|
|
|
getList() {
|
|
|
- this.loading = true;
|
|
|
+ this.loading = true
|
|
|
listPatent(this.queryParams).then(response => {
|
|
|
- this.patentList = response.rows;
|
|
|
- this.total = response.total;
|
|
|
- this.loading = false;
|
|
|
- });
|
|
|
+ this.patentList = response.rows
|
|
|
+ this.total = response.total
|
|
|
+ this.loading = false
|
|
|
+ })
|
|
|
},
|
|
|
getPerson() {
|
|
|
- this.loading = true;
|
|
|
+ this.loading = true
|
|
|
listPersonnelsss(this.queryParams).then(response => {
|
|
|
- this.personnelList = response.rows;//所有人元列表
|
|
|
- console.log(this.personnelList,222222222)
|
|
|
+ this.personnelList = response.rows// 所有人元列表
|
|
|
+ console.log(this.personnelList, 222222222)
|
|
|
|
|
|
- for(let i in response.rows){
|
|
|
- this.personlevel.push("") //创建跟所有人元列表同等数量的人员排序
|
|
|
- this.asdasd.push(true)//创建跟所有人元列表同等数量的输入框禁用属性
|
|
|
+ for (const i in response.rows) {
|
|
|
+ this.personlevel.push('') // 创建跟所有人元列表同等数量的人员排序
|
|
|
+ this.asdasd.push(true)// 创建跟所有人元列表同等数量的输入框禁用属性
|
|
|
}
|
|
|
- console.log(this.personlevel,this.asdasd)
|
|
|
+ console.log(this.personlevel, this.asdasd)
|
|
|
// this.asdasd = Object.assign([], this.asdasd);
|
|
|
// console.log(this.asdasd,111111111111)
|
|
|
// this.total = response.total;
|
|
|
- this.loading = false;
|
|
|
- });
|
|
|
+ this.loading = false
|
|
|
+ })
|
|
|
},
|
|
|
- //上传成功组件
|
|
|
- handleAvatarSuccess(){
|
|
|
- this.getModuleList(this.filesssssid);
|
|
|
+ // 上传成功组件
|
|
|
+ handleAvatarSuccess() {
|
|
|
+ this.getModuleList(this.filesssssid)
|
|
|
},
|
|
|
// handleCheckedCitiesChange(value) {
|
|
|
// var a = this.persons.length/this.form.usernum*100;
|
|
@@ -477,42 +485,41 @@ export default {
|
|
|
// // console.log(this.persons,this.personnelList)
|
|
|
// },
|
|
|
getFangxiang() {
|
|
|
- this.loading = true;
|
|
|
+ this.loading = true
|
|
|
listDirection(this.queryParams).then(response => {
|
|
|
- this.direction = response.rows;
|
|
|
+ this.direction = response.rows
|
|
|
// this.total = response.total;
|
|
|
- this.loading = false;
|
|
|
- });
|
|
|
+ this.loading = false
|
|
|
+ })
|
|
|
},
|
|
|
|
|
|
-
|
|
|
-/** 查询模块文件列表 */
|
|
|
+ /** 查询模块文件列表 */
|
|
|
getModuleList(id) {
|
|
|
- this.loading = true;
|
|
|
- this.queryParamsFile.moduleName="jcc_scientific_output_patent";
|
|
|
- this.queryParamsFile.moduleId=id;
|
|
|
+ this.loading = true
|
|
|
+ this.queryParamsFile.moduleName = 'jcc_scientific_output_patent'
|
|
|
+ this.queryParamsFile.moduleId = id
|
|
|
listFile(this.queryParamsFile).then(response => {
|
|
|
- console.log(response.rows);
|
|
|
- this.loadList = response.rows;
|
|
|
+ console.log(response.rows)
|
|
|
+ this.loadList = response.rows
|
|
|
// this.total = response.total;
|
|
|
- this.loading = false;
|
|
|
- });
|
|
|
+ this.loading = false
|
|
|
+ })
|
|
|
},
|
|
|
|
|
|
// 类别字典翻译
|
|
|
typeFormat(row, column) {
|
|
|
- return this.selectDictLabel(this.type, row.type);
|
|
|
+ return this.selectDictLabel(this.type, row.type)
|
|
|
},
|
|
|
levelFormat(row, column) {
|
|
|
- return this.selectDictLabel(this.level, row.level);
|
|
|
+ return this.selectDictLabel(this.level, row.level)
|
|
|
},
|
|
|
directionFormat(row, column) {
|
|
|
- return this.selectDictLabel(this.direction, row.direction);
|
|
|
+ return this.selectDictLabel(this.direction, row.direction)
|
|
|
},
|
|
|
// 取消按钮
|
|
|
cancel() {
|
|
|
- this.open = false;
|
|
|
- this.reset();
|
|
|
+ this.open = false
|
|
|
+ this.reset()
|
|
|
},
|
|
|
// 表单重置
|
|
|
reset() {
|
|
@@ -527,59 +534,59 @@ export default {
|
|
|
createBy: null,
|
|
|
updateTime: null,
|
|
|
updateBy: null
|
|
|
- };
|
|
|
- this.resetForm("form");
|
|
|
+ }
|
|
|
+ this.resetForm('form')
|
|
|
},
|
|
|
/** 搜索按钮操作 */
|
|
|
handleQuery() {
|
|
|
- this.queryParams.pageNum = 1;
|
|
|
- this.getList();
|
|
|
+ this.queryParams.pageNum = 1
|
|
|
+ this.getList()
|
|
|
},
|
|
|
/** 重置按钮操作 */
|
|
|
resetQuery() {
|
|
|
- this.resetForm("queryForm");
|
|
|
- this.handleQuery();
|
|
|
+ this.resetForm('queryForm')
|
|
|
+ this.handleQuery()
|
|
|
},
|
|
|
// 多选框选中数据
|
|
|
handleSelectionChange(selection) {
|
|
|
this.ids = selection.map(item => item.id)
|
|
|
- this.single = selection.length!==1
|
|
|
+ this.single = selection.length !== 1
|
|
|
this.multiple = !selection.length
|
|
|
},
|
|
|
/** 新增按钮操作 */
|
|
|
handleAdd() {
|
|
|
- for(let i in this.asdasd){
|
|
|
- this.asdasd[i] = true
|
|
|
- this.personlevel[i] =''
|
|
|
- }
|
|
|
- this.reset();
|
|
|
- this.person=[];
|
|
|
- this.open = true;
|
|
|
- this.title = "添加获奖情况";
|
|
|
+ for (const i in this.asdasd) {
|
|
|
+ this.asdasd[i] = true
|
|
|
+ this.personlevel[i] = ''
|
|
|
+ }
|
|
|
+ this.reset()
|
|
|
+ this.person = []
|
|
|
+ this.open = true
|
|
|
+ this.title = '添加获奖情况'
|
|
|
},
|
|
|
/** 修改按钮操作 */
|
|
|
handleUpdate(row) {
|
|
|
- this.person=[];
|
|
|
- row.person.map((item)=>{
|
|
|
- this.personnelList.map((ite)=>{
|
|
|
- if(item.userId == ite.id){
|
|
|
- ite.level = ""
|
|
|
+ this.person = []
|
|
|
+ row.person.map((item) => {
|
|
|
+ this.personnelList.map((ite) => {
|
|
|
+ if (item.userId == ite.id) {
|
|
|
+ ite.level = ''
|
|
|
ite.level = item.level
|
|
|
}
|
|
|
})
|
|
|
this.person.push(item.userId)
|
|
|
// console.log(item.userId+"22222222222222");
|
|
|
- });
|
|
|
- console.log(this.personnelList,44444)
|
|
|
- if(this.person.length == 0){
|
|
|
+ })
|
|
|
+ console.log(this.personnelList, 44444)
|
|
|
+ if (this.person.length == 0) {
|
|
|
return
|
|
|
- }else{
|
|
|
- this.person.map((it)=>{ //循环person的id
|
|
|
- this.personnelList.map((ite,index)=>{ //循环所有人员的列表 循环元素和下角标
|
|
|
- //如果pserson的id == psersonslist中id
|
|
|
+ } else {
|
|
|
+ this.person.map((it) => { // 循环person的id
|
|
|
+ this.personnelList.map((ite, index) => { // 循环所有人员的列表 循环元素和下角标
|
|
|
+ // 如果pserson的id == psersonslist中id
|
|
|
// 那么相对应asdasd位置的禁用属性变成启用
|
|
|
- //那么相对应的personlevel位置的排序号是personnelList相对应的排序号
|
|
|
- if(it == ite.id){
|
|
|
+ // 那么相对应的personlevel位置的排序号是personnelList相对应的排序号
|
|
|
+ if (it == ite.id) {
|
|
|
this.asdasd[index] = false
|
|
|
this.personlevel[index] = ite.level
|
|
|
}
|
|
@@ -588,156 +595,156 @@ export default {
|
|
|
}
|
|
|
|
|
|
console.log(this.asdasd)
|
|
|
- this.reset();
|
|
|
- const id = row.id || this.ids;
|
|
|
+ this.reset()
|
|
|
+ const id = row.id || this.ids
|
|
|
getPatent(id).then(response => {
|
|
|
- this.form = response.data;
|
|
|
- console.log(this.form);
|
|
|
- this.open = true;
|
|
|
- this.title = "修改获奖情况";
|
|
|
- });
|
|
|
+ this.form = response.data
|
|
|
+ console.log(this.form)
|
|
|
+ this.open = true
|
|
|
+ this.title = '修改获奖情况'
|
|
|
+ })
|
|
|
},
|
|
|
/** 提交按钮 */
|
|
|
submitForm() {
|
|
|
- this.form.person = this.person;
|
|
|
- this.form.personlevel = [];
|
|
|
- this.personlevel.map((e)=>{
|
|
|
- if (e.length!=''){
|
|
|
+ this.form.person = this.person
|
|
|
+ this.form.personlevel = []
|
|
|
+ this.personlevel.map((e) => {
|
|
|
+ if (e.length != '') {
|
|
|
this.form.personlevel.push(e)
|
|
|
}
|
|
|
})
|
|
|
// console.log(this.form.person);
|
|
|
// console.log(this.form.personlevel);
|
|
|
|
|
|
- this.$refs["form"].validate(valid => {
|
|
|
+ this.$refs['form'].validate(valid => {
|
|
|
if (valid) {
|
|
|
console.log(this.personslevel)
|
|
|
|
|
|
if (this.form.id != null) {
|
|
|
updatePatent(this.form).then(response => {
|
|
|
- this.msgSuccess("修改成功");
|
|
|
- this.open = false;
|
|
|
- this.getList();
|
|
|
- });
|
|
|
+ this.msgSuccess('修改成功')
|
|
|
+ this.open = false
|
|
|
+ this.getList()
|
|
|
+ })
|
|
|
} else {
|
|
|
addPatent(this.form).then(response => {
|
|
|
- this.msgSuccess("新增成功");
|
|
|
- this.open = false;
|
|
|
- this.getList();
|
|
|
- });
|
|
|
+ this.msgSuccess('新增成功')
|
|
|
+ this.open = false
|
|
|
+ this.getList()
|
|
|
+ })
|
|
|
}
|
|
|
}
|
|
|
- });
|
|
|
+ })
|
|
|
},
|
|
|
/** 删除按钮操作 */
|
|
|
handleDelete(row) {
|
|
|
- const ids = row.id || this.ids;
|
|
|
- this.$confirm('是否确认删除获奖情况编号为"' + ids + '"的数据项?', "警告", {
|
|
|
- confirmButtonText: "确定",
|
|
|
- cancelButtonText: "取消",
|
|
|
- type: "warning"
|
|
|
- }).then(function() {
|
|
|
- return delPatent(ids);
|
|
|
- }).then(() => {
|
|
|
- this.getList();
|
|
|
- this.msgSuccess("删除成功");
|
|
|
- }).catch(() => {});
|
|
|
+ const ids = row.id || this.ids
|
|
|
+ this.$confirm('是否确认删除获奖情况编号为"' + ids + '"的数据项?', '警告', {
|
|
|
+ confirmButtonText: '确定',
|
|
|
+ cancelButtonText: '取消',
|
|
|
+ type: 'warning'
|
|
|
+ }).then(function() {
|
|
|
+ return delPatent(ids)
|
|
|
+ }).then(() => {
|
|
|
+ this.getList()
|
|
|
+ this.msgSuccess('删除成功')
|
|
|
+ }).catch(() => {})
|
|
|
},
|
|
|
/** 导出按钮操作 */
|
|
|
handleExport() {
|
|
|
- const queryParams = this.queryParams;
|
|
|
- this.$confirm('是否确认导出所有获奖情况数据项?', "警告", {
|
|
|
- confirmButtonText: "确定",
|
|
|
- cancelButtonText: "取消",
|
|
|
- type: "warning"
|
|
|
- }).then(() => {
|
|
|
- this.exportLoading = true;
|
|
|
- return exportPatent(queryParams);
|
|
|
- }).then(response => {
|
|
|
- this.download(response.msg);
|
|
|
- this.exportLoading = false;
|
|
|
- }).catch(() => {});
|
|
|
+ const queryParams = this.queryParams
|
|
|
+ this.$confirm('是否确认导出所有获奖情况数据项?', '警告', {
|
|
|
+ confirmButtonText: '确定',
|
|
|
+ cancelButtonText: '取消',
|
|
|
+ type: 'warning'
|
|
|
+ }).then(() => {
|
|
|
+ this.exportLoading = true
|
|
|
+ return exportPatent(queryParams)
|
|
|
+ }).then(response => {
|
|
|
+ this.download(response.msg)
|
|
|
+ this.exportLoading = false
|
|
|
+ }).catch(() => {})
|
|
|
},
|
|
|
- //上传附件按钮
|
|
|
- handleUpload(row){
|
|
|
- this.moduleId= row.id;
|
|
|
-
|
|
|
- this.filesssssid= row.id;
|
|
|
- this.uploadImgUrl=process.env.VUE_APP_BASE_API + "/common/upload/patent?listId="+row.id,
|
|
|
- this.reset();
|
|
|
- this.getModuleList(row.id);
|
|
|
- this.upLoadBox = true;
|
|
|
- this.title = "上传附件";
|
|
|
+ // 上传附件按钮
|
|
|
+ handleUpload(row) {
|
|
|
+ this.moduleId = row.id
|
|
|
+
|
|
|
+ this.filesssssid = row.id
|
|
|
+ this.uploadImgUrl = process.env.VUE_APP_BASE_API + '/common/upload/patent?listId=' + row.id,
|
|
|
+ this.reset()
|
|
|
+ this.getModuleList(row.id)
|
|
|
+ this.upLoadBox = true
|
|
|
+ this.title = '上传附件'
|
|
|
},
|
|
|
- //上传附件取消按钮
|
|
|
- uploadCancel(){
|
|
|
- this.upLoadBox = false;
|
|
|
- this.reset();
|
|
|
+ // 上传附件取消按钮
|
|
|
+ uploadCancel() {
|
|
|
+ this.upLoadBox = false
|
|
|
+ this.reset()
|
|
|
},
|
|
|
- //删除附件
|
|
|
+ // 删除附件
|
|
|
handleRemove(file) {
|
|
|
- console.log(file);
|
|
|
- let name = file.name
|
|
|
- let fileId = file.id;
|
|
|
- this.handleDeleteModule(fileId);
|
|
|
- console.log(this.loadList);
|
|
|
+ console.log(file)
|
|
|
+ const name = file.name
|
|
|
+ const fileId = file.id
|
|
|
+ this.handleDeleteModule(fileId)
|
|
|
+ console.log(this.loadList)
|
|
|
this.$confirm('是否删除该附件?', '提示', {
|
|
|
confirmButtonText: '确定',
|
|
|
cancelButtonText: '取消',
|
|
|
type: 'warning'
|
|
|
}).then(() => {
|
|
|
- for (let i=0;i<this.loadList.length;i++){
|
|
|
- if(name==this.loadList[i].name){
|
|
|
- console.log(i);
|
|
|
- this.loadList.splice(i,1)
|
|
|
+ for (let i = 0; i < this.loadList.length; i++) {
|
|
|
+ if (name == this.loadList[i].name) {
|
|
|
+ console.log(i)
|
|
|
+ this.loadList.splice(i, 1)
|
|
|
}
|
|
|
}
|
|
|
this.$message({
|
|
|
type: 'success',
|
|
|
message: '删除成功!'
|
|
|
- });
|
|
|
+ })
|
|
|
}).catch(() => {
|
|
|
this.$message({
|
|
|
type: 'info',
|
|
|
message: '已取消删除'
|
|
|
- });
|
|
|
- });
|
|
|
+ })
|
|
|
+ })
|
|
|
},
|
|
|
handleDeleteModule(id) {
|
|
|
delFile(id)
|
|
|
},
|
|
|
- //展示附件
|
|
|
+ // 展示附件
|
|
|
handlePictureCardPreview(file) {
|
|
|
- this.dialogImageUrl = file.url;
|
|
|
- if(file.picture==true){
|
|
|
- this.picture=true
|
|
|
- }else{
|
|
|
- this.picture=false
|
|
|
+ this.dialogImageUrl = file.url
|
|
|
+ if (file.picture == true) {
|
|
|
+ this.picture = true
|
|
|
+ } else {
|
|
|
+ this.picture = false
|
|
|
}
|
|
|
- this.dialogVisible = true;
|
|
|
+ this.dialogVisible = true
|
|
|
},
|
|
|
- //下载附件
|
|
|
+ // 下载附件
|
|
|
handleDownload(file) {
|
|
|
- window.location.href = file.url;
|
|
|
+ window.location.href = file.url
|
|
|
},
|
|
|
- //上传时判断上传的是图片还是文件
|
|
|
- handleChange(file, fileList){
|
|
|
- console.log(file);
|
|
|
- fileList.forEach((value , index) => {
|
|
|
- let url = fileList[index].name;
|
|
|
- let imgStr = /\.(jpg|jpeg|png|bmp|BMP|JPG|PNG|JPEG)$/;
|
|
|
- if (!imgStr.test(url)){
|
|
|
- console.log('文件');
|
|
|
+ // 上传时判断上传的是图片还是文件
|
|
|
+ handleChange(file, fileList) {
|
|
|
+ console.log(file)
|
|
|
+ fileList.forEach((value, index) => {
|
|
|
+ const url = fileList[index].name
|
|
|
+ const imgStr = /\.(jpg|jpeg|png|bmp|BMP|JPG|PNG|JPEG)$/
|
|
|
+ if (!imgStr.test(url)) {
|
|
|
+ console.log('文件')
|
|
|
value['picture'] = false
|
|
|
- }else {
|
|
|
- console.log('图片');
|
|
|
+ } else {
|
|
|
+ console.log('图片')
|
|
|
value['picture'] = true
|
|
|
}
|
|
|
})
|
|
|
- this.loadList=fileList
|
|
|
+ this.loadList = fileList
|
|
|
}
|
|
|
- },
|
|
|
-};
|
|
|
+ }
|
|
|
+}
|
|
|
</script>
|
|
|
|
|
|
<style scoped lang="scss">
|