|
@@ -0,0 +1,228 @@
|
|
|
+<template>
|
|
|
+ <div>
|
|
|
+ <div style="display:flex;justify-content: flex-end;margin-bottom:20px">
|
|
|
+ <el-button @click="add">添加</el-button>
|
|
|
+ </div>
|
|
|
+ <el-table :data="tableData" v-loading="loading" border style="width: 100%">
|
|
|
+ <el-table-column label="无效案号" prop="newPatentNo" align="center">
|
|
|
+ <template slot-scope="scope">
|
|
|
+ <span>{{scope.row.newPatentNo}}</span>
|
|
|
+ </template>
|
|
|
+ </el-table-column>
|
|
|
+ <el-table-column label="被无效专利" prop="patentNo" align="center">
|
|
|
+ <template slot-scope="scope">
|
|
|
+ <span>{{scope.row.patentNo}}</span>
|
|
|
+ </template>
|
|
|
+ </el-table-column>
|
|
|
+ <el-table-column label="无效时间" prop="time" align="center">
|
|
|
+ <template slot-scope="scope">
|
|
|
+ <span>{{scope.row.time}}</span>
|
|
|
+ </template>
|
|
|
+ </el-table-column>
|
|
|
+ <el-table-column label="无效理由" prop="reason" align="center">
|
|
|
+ <template slot-scope="scope">
|
|
|
+ <span>{{scope.row.reason}}</span>
|
|
|
+ </template>
|
|
|
+ </el-table-column>
|
|
|
+ <el-table-column label="是否被审查员认可" prop="approve" align="center">
|
|
|
+ <template slot-scope="scope">
|
|
|
+ <span>{{scope.row.approve}}</span>
|
|
|
+ </template>
|
|
|
+ </el-table-column>
|
|
|
+ <el-table-column label="附件" prop="reportFiles" align="center">
|
|
|
+ <template slot-scope="scope">
|
|
|
+ <span>
|
|
|
+ <span v-if="scope.row.reportFiles">
|
|
|
+ <div v-for="item in scope.row.reportFiles" style="margin:0;display:flex;justify-content:space-around;align-items:center;">
|
|
|
+ <p style="margin:0;width:calc(100% - 40px);overflow: hidden;white-space: nowrap;text-overflow:ellipsis;cursor: pointer">{{item.name?item.name+'.'+item.suffix:item.fileName}}</p>
|
|
|
+ <Menu :data="item" @delFile="delFile1(scope.row,item.id,scope.$index)"></Menu>
|
|
|
+ </div>
|
|
|
+ </span>
|
|
|
+ <span v-else><i class="el-icon-minus"></i></span>
|
|
|
+ </span>
|
|
|
+ </template>
|
|
|
+ </el-table-column>
|
|
|
+ </el-table>
|
|
|
+ <el-dialog title="新增无效证据使用历史" :visible.sync="visible" width="1000px" :before-close="close">
|
|
|
+ <div>
|
|
|
+ <el-form ref="form" :model="form" :rules="rules">
|
|
|
+ <el-form-item label="无效案号" prop="newPatentNo">
|
|
|
+ <el-input v-model="form.newPatentNo" placeholder="请输入无效案号"></el-input>
|
|
|
+ </el-form-item>
|
|
|
+ <el-form-item label="被无效专利" prop="patentNo">
|
|
|
+ <el-input v-model="form.patentNo" placeholder="请输入被无效专利"></el-input>
|
|
|
+ </el-form-item>
|
|
|
+ <el-form-item label="无效时间" prop="time">
|
|
|
+ <el-date-picker
|
|
|
+ style="width: 100%"
|
|
|
+ v-model="form.time"
|
|
|
+ type="date"
|
|
|
+ value-format="yyyy-MM-dd"
|
|
|
+ placeholder="选择日期时间"
|
|
|
+ >
|
|
|
+ </el-date-picker>
|
|
|
+ </el-form-item>
|
|
|
+ <el-form-item label="无效理由" prop="reason">
|
|
|
+ <el-input v-model="form.reason" placeholder="请输入无效理由"></el-input>
|
|
|
+ </el-form-item>
|
|
|
+ <el-form-item label="是否被审查员认可" prop="approve">
|
|
|
+ <el-input v-model="form.approve" placeholder="请输入是否被审查员认可"></el-input>
|
|
|
+ </el-form-item>
|
|
|
+ <el-form-item label="上传附件">
|
|
|
+ <div v-if="form.reportFiles" class="upload-file">
|
|
|
+ <div v-for="item in form.reportFiles" style="margin:0;display:flex;justify-content:space-around;">
|
|
|
+ <p style="margin:0;width:calc(100% - 40px);overflow: hidden;white-space: nowrap;text-overflow:ellipsis;cursor: pointer">{{item.name?item.name+'.'+item.suffix:item.fileName}}</p>
|
|
|
+ <Menu :data="item" @delFile="delFile"></Menu>
|
|
|
+ </div>
|
|
|
+ </div>
|
|
|
+ <el-upload ref="upload" class="upload-file" drag action="#" :auto-upload="false" :show-file-list="true" :on-change="onChange" multiple :on-preview="handlePreview" :on-remove="handleRemove">
|
|
|
+ <i :class="!file ? 'el-icon-upload' : 'el-icon-refresh'"></i>
|
|
|
+ <div class="el-upload__text">将文件拖到此处,或<em>点击上传</em></div>
|
|
|
+ <div class="el-upload__tip" slot="tip"></div>
|
|
|
+ </el-upload>
|
|
|
+ </el-form-item>
|
|
|
+ </el-form>
|
|
|
+ </div>
|
|
|
+ <div slot="footer" class="dialog-footer" style="display: flex;justify-content: flex-end;">
|
|
|
+ <el-button @click="close">取 消</el-button>
|
|
|
+ <el-button type="primary" @click="submit" :loading="btnLoading">确定</el-button>
|
|
|
+ </div>
|
|
|
+ </el-dialog>
|
|
|
+ </div>
|
|
|
+</template>
|
|
|
+
|
|
|
+<script>
|
|
|
+export default {
|
|
|
+ components: {},
|
|
|
+ props: {},
|
|
|
+ data() {
|
|
|
+ return {
|
|
|
+ tableData:[],
|
|
|
+ visible:false,
|
|
|
+ btnLoading:false,
|
|
|
+ loading:false,
|
|
|
+ form:{},
|
|
|
+ Already:[],
|
|
|
+ file:[],
|
|
|
+ rules:{
|
|
|
+
|
|
|
+ }
|
|
|
+ };
|
|
|
+ },
|
|
|
+ watch: {},
|
|
|
+ computed: {},
|
|
|
+ created() {},
|
|
|
+ mounted() {
|
|
|
+ this.getList()
|
|
|
+ },
|
|
|
+ methods: {
|
|
|
+ //查询数据
|
|
|
+ getList(){
|
|
|
+
|
|
|
+ },
|
|
|
+ //打开弹窗
|
|
|
+ add(){
|
|
|
+
|
|
|
+ },
|
|
|
+ //关闭弹窗
|
|
|
+ close(){
|
|
|
+
|
|
|
+ },
|
|
|
+ //添加数据
|
|
|
+ submit(){
|
|
|
+ this.btnLoading = true
|
|
|
+ this.btnLoading = false
|
|
|
+ },
|
|
|
+ //切换上传附件
|
|
|
+ onChange(file, fileList) {
|
|
|
+ if(this.form.reportFiles){
|
|
|
+ var index3 = this.form.reportFiles.findIndex(item=>{
|
|
|
+ return item.name+'.'+item.suffix == file.raw.name
|
|
|
+ })
|
|
|
+ if(index3!=-1){
|
|
|
+ this.Already.push(this.form.reportFiles[index3].name)
|
|
|
+ var index2 = fileList.reverse().findIndex(item=>{
|
|
|
+ return item.raw.name == file.raw.name
|
|
|
+ })
|
|
|
+ fileList.splice(index2,1)
|
|
|
+ }else{
|
|
|
+ this.inFile(file, fileList)
|
|
|
+ }
|
|
|
+ }else{
|
|
|
+ this.inFile(file, fileList)
|
|
|
+ }
|
|
|
+ this.$nextTick(()=>{
|
|
|
+ var b = ''
|
|
|
+ if(this.Already.length>0){
|
|
|
+ this.Already.forEach(item=>{
|
|
|
+ b = b+item+','
|
|
|
+ })
|
|
|
+ this.$alert('文件'+b+'已存在', '提示', {
|
|
|
+ confirmButtonText: '确定',
|
|
|
+ type:'warning',
|
|
|
+ callback: action => {
|
|
|
+ this.Already = []
|
|
|
+ }
|
|
|
+ });
|
|
|
+
|
|
|
+ }
|
|
|
+ })
|
|
|
+ },
|
|
|
+ //整理重复上传的文件
|
|
|
+ inFile(file, fileList){
|
|
|
+ var index = this.file.findIndex(item=>{
|
|
|
+ return item.name == file.raw.name
|
|
|
+ })
|
|
|
+ if(index!=-1){
|
|
|
+ this.Already.push(this.file[index].name)
|
|
|
+ var index2 = fileList.reverse().findIndex(item=>{
|
|
|
+ return item.raw.name == file.raw.name
|
|
|
+ })
|
|
|
+ fileList.splice(index2,1)
|
|
|
+ }else{
|
|
|
+ this.file.push(file.raw)
|
|
|
+ }
|
|
|
+ },
|
|
|
+ //删除未提交的附件
|
|
|
+ handleRemove(file, fileList) {
|
|
|
+ var index = this.file.findIndex(item=>{
|
|
|
+ return item.uid == file.raw.uid
|
|
|
+ })
|
|
|
+ if(index!=-1){
|
|
|
+ this.file.splice(index,1)
|
|
|
+ }
|
|
|
+ },
|
|
|
+ //上传附件时查看附件内容
|
|
|
+ handlePreview(file) {
|
|
|
+ var item={
|
|
|
+ name:file.name,
|
|
|
+ suffix:'',
|
|
|
+ downLoad:true
|
|
|
+ }
|
|
|
+ var index = file.raw.type.lastIndexOf('/')
|
|
|
+ var type = file.raw.type.substring(index+1,file.raw.type.length)
|
|
|
+ var arr = ['png','jpeg','bmp','jpg']
|
|
|
+ if(arr.includes(type)){
|
|
|
+ var FileUrl = URL.createObjectURL(file.raw)
|
|
|
+ var isPicture = 1
|
|
|
+ }else if(type == 'pdf'){
|
|
|
+ var FileUrl = URL.createObjectURL(file.raw)
|
|
|
+ var isPicture = 0
|
|
|
+ }else{
|
|
|
+ return false
|
|
|
+ }
|
|
|
+ const router = this.$router.resolve({
|
|
|
+ path: '/checkFile',
|
|
|
+ query: {
|
|
|
+ row: JSON.stringify(item),
|
|
|
+ FileUrl: FileUrl,
|
|
|
+ isPicture:isPicture
|
|
|
+ }
|
|
|
+ })
|
|
|
+ window.open(router.href, '_blank');
|
|
|
+ },
|
|
|
+ },
|
|
|
+};
|
|
|
+</script>
|
|
|
+<style lang="scss" scoped>
|
|
|
+</style>
|