|
|
@@ -0,0 +1,324 @@
|
|
|
+<template>
|
|
|
+ <div class="height_100">
|
|
|
+ <el-container>
|
|
|
+ <el-header>
|
|
|
+ <div style="width:100%; padding:20px;display:flex;align-items: center;justify-content: space-between;">
|
|
|
+ <div>
|
|
|
+ <span v-if="!update.ifUpdate">是否定期通知:{{ update.ifUpdate?'是':'否' }}</span>
|
|
|
+ <span v-else>通知周期:<span>{{ getUpdateCycleName(update.notifyCycle) }}</span></span>
|
|
|
+ <span style="margin-left:10px"><i class="iconfont icon-bianji" @click="editUpdate"></i></span>
|
|
|
+ </div>
|
|
|
+ <div style="">
|
|
|
+ <el-button type="primary" size="small" @click="add">添加</el-button>
|
|
|
+ </div>
|
|
|
+ </div>
|
|
|
+ </el-header>
|
|
|
+ <el-main v-DivHeight="getDivHeight">
|
|
|
+ <el-table
|
|
|
+ ref="table"
|
|
|
+ :data="tableData"
|
|
|
+ row-key="id"
|
|
|
+ style="width: 100%"
|
|
|
+ :maxHeight="tableHeight - 40"
|
|
|
+ v-loading="loading"
|
|
|
+ @selection-change="handleSelectionChange"
|
|
|
+ >
|
|
|
+ <el-table-column type="selection" width="55" :reserve-selection="true">
|
|
|
+
|
|
|
+ </el-table-column>
|
|
|
+ <el-table-column prop="searchCondition" label="检索条件">
|
|
|
+ <template slot-scope="scope">
|
|
|
+ <div>
|
|
|
+ <div v-if="scope.row.parameters">{{ scope.row.parameters }}</div>
|
|
|
+ <div v-if="scope.row.patentNos && scope.row.patentNos.length">
|
|
|
+ <!-- <div v-if="scope.row.stringRequest && scope.row.stringRequest.orderDTOList && scope.row.stringRequest.orderDTOList.length">
|
|
|
+ <div v-if="(scope.row.stringRequest.orderDTOList[0].orderType == 1 || scope.row.stringRequest.orderDTOList[0].orderType == 0) && scope.row.stringRequest.orderDTOList[0].orderByName">
|
|
|
+ 您根据{{ scope.row.stringRequest.orderDTOList[0].orderByName }}进行{{ scope.row.stringRequest.orderDTOList[0].orderType ==1?'降序':'升序' }}排序
|
|
|
+ </div>
|
|
|
+ </div>
|
|
|
+ <div v-if="scope.row.endNumber>=scope.row.startNumber">
|
|
|
+ 您选择了第{{ scope.row.startNumber }}到第{{ scope.row.endNumber }}件专利,并取消了
|
|
|
+ </div> -->
|
|
|
+
|
|
|
+ <el-popover
|
|
|
+ placement="bottom"
|
|
|
+ title="专利清单"
|
|
|
+ width="200"
|
|
|
+ trigger="click"
|
|
|
+ >
|
|
|
+ <div style="max-height:300px;overflow-y:auto">
|
|
|
+ <div v-for="(item,index) in scope.row.patentNos" :key="index" style="padding:5px 8px">
|
|
|
+ {{ index+1 }}、{{ item }}
|
|
|
+ </div>
|
|
|
+ </div>
|
|
|
+ <el-link type="primary" slot="reference">点击查看选择的专利</el-link>
|
|
|
+ </el-popover>
|
|
|
+ </div>
|
|
|
+ </div>
|
|
|
+ </template>
|
|
|
+ </el-table-column>
|
|
|
+ <el-table-column prop="monitorType" label="监控方式" width="120">
|
|
|
+ <template slot-scope="scope">
|
|
|
+ <div>
|
|
|
+ <span v-if="scope.row.patentNos && scope.row.patentNos.length">号码监控</span>
|
|
|
+ <span v-else>检索条件监控</span>
|
|
|
+ </div>
|
|
|
+ </template>
|
|
|
+ </el-table-column>
|
|
|
+ <el-table-column prop="targetSSs" label="目标法律状态" width="140">
|
|
|
+ <template slot-scope="scope">
|
|
|
+ <div v-html="getTargetSssName(scope.row.targetSSs)"></div>
|
|
|
+ </template>
|
|
|
+ </el-table-column>
|
|
|
+ <el-table-column prop="notifyPeople" label="邮件通知人员" width="250">
|
|
|
+ <template slot-scope="scope">
|
|
|
+ <div>
|
|
|
+ <span v-for="(item,index) in scope.row.notifyPeople" :key="index">
|
|
|
+ {{ item.name + '<' + item.email + '>'}}
|
|
|
+ <span v-if="index<scope.row.notifyPeople.length-1">;</span>
|
|
|
+ </span>
|
|
|
+ </div>
|
|
|
+ </template>
|
|
|
+ </el-table-column>
|
|
|
+ <el-table-column prop="createName" label="创建人" width="120">
|
|
|
+ <template slot-scope="scope">
|
|
|
+ <div>
|
|
|
+ {{ scope.row.createName }}
|
|
|
+ </div>
|
|
|
+ </template>
|
|
|
+ </el-table-column>
|
|
|
+ <el-table-column prop="createTime" label="创建时间" width="120">
|
|
|
+ <template slot-scope="scope">
|
|
|
+ <div>
|
|
|
+ {{ scope.row.createTime }}
|
|
|
+ </div>
|
|
|
+ </template>
|
|
|
+ </el-table-column>
|
|
|
+ <el-table-column label="操作" width="140">
|
|
|
+ <template slot-scope="scope">
|
|
|
+ <div class="icon">
|
|
|
+ <span @click="editSearch(scope.row)" class="margin-left_10">
|
|
|
+ <el-tooltip class="item" effect="dark" content="编辑" placement="top">
|
|
|
+ <i class="iconfont icon-bianji"></i>
|
|
|
+ </el-tooltip>
|
|
|
+ </span>
|
|
|
+ <span @click="delSearch(scope.row)" class="margin-left_10">
|
|
|
+ <el-tooltip class="item" effect="dark" content="删除" placement="top">
|
|
|
+ <i class="iconfont icon-shanchu"></i>
|
|
|
+ </el-tooltip>
|
|
|
+ </span>
|
|
|
+ </div>
|
|
|
+ </template>
|
|
|
+ </el-table-column>
|
|
|
+ </el-table>
|
|
|
+ </el-main>
|
|
|
+ <el-footer class="pagination" style="display:flex;justify-content:space-between;align-items:center">
|
|
|
+ <div style="display:flex;align-items:center">
|
|
|
+ <span v-if="multipleSelection.length > 0">
|
|
|
+ 已勾选 <b>{{ multipleSelection.length }}</b> 条
|
|
|
+ </span>
|
|
|
+ <div v-show="multipleSelection.length" class="margin-left_10">
|
|
|
+ <el-button type="primary" size="small" @click="del">删除</el-button>
|
|
|
+ </div>
|
|
|
+ </div>
|
|
|
+ <div>
|
|
|
+ <el-pagination background layout="total, sizes, prev, pager, next, jumper"
|
|
|
+ :current-page.sync="queryParams.current" :page-size.sync="queryParams.size"
|
|
|
+ @current-change="handleCurrentChange" @size-change="changeSize" :total="total">
|
|
|
+ </el-pagination>
|
|
|
+ </div>
|
|
|
+
|
|
|
+ </el-footer>
|
|
|
+ </el-container>
|
|
|
+
|
|
|
+ <emailNotifyCycleDialog ref="emailNotifyCycleDialog" @update="getUpdateCycle"></emailNotifyCycleDialog>
|
|
|
+ <addPatentStatusMonitorDialog ref="addPatentStatusMonitorDialog" :projectId="projectId" @success="queryPatentStatusMonitor"></addPatentStatusMonitorDialog>
|
|
|
+ </div>
|
|
|
+</template>
|
|
|
+
|
|
|
+<script>
|
|
|
+import { getTableHeight } from '@/views/components/mixins'
|
|
|
+import emailNotifyCycleDialog from './components/dialog/emailNotifyCycle.vue';
|
|
|
+import addPatentStatusMonitorDialog from '../../patentCollection/components/dialog/addPatentStatusMonitor.vue';
|
|
|
+export default {
|
|
|
+ components: {
|
|
|
+ emailNotifyCycleDialog,
|
|
|
+ addPatentStatusMonitorDialog
|
|
|
+ },
|
|
|
+ props: {
|
|
|
+ projectId:{},
|
|
|
+ projectName:{}
|
|
|
+ },
|
|
|
+ mixins:[getTableHeight],
|
|
|
+ data() {
|
|
|
+ return {
|
|
|
+ update:{
|
|
|
+ ifUpdate:false
|
|
|
+ },
|
|
|
+ tableData:[],
|
|
|
+ multipleSelection:[],
|
|
|
+ loading:false,
|
|
|
+ queryParams:{
|
|
|
+ current:1,
|
|
|
+ size:10,
|
|
|
+ projectId:this.projectId
|
|
|
+ },
|
|
|
+ total:0,
|
|
|
+ };
|
|
|
+ },
|
|
|
+ watch: {},
|
|
|
+ computed: {
|
|
|
+ updateCycles(){
|
|
|
+ let updateCycle = this.$constants.updateCycle
|
|
|
+ return updateCycle
|
|
|
+ },
|
|
|
+ patentMonitorStatus(){
|
|
|
+ let patentMonitorStatus = this.$store.state.dictMessage.dictMessage.PATENT_MONITOR_STATUS || []
|
|
|
+ return patentMonitorStatus
|
|
|
+ }
|
|
|
+ },
|
|
|
+ created() {},
|
|
|
+ mounted() {
|
|
|
+ this.getUpdateCycle()
|
|
|
+ this.queryPatentStatusMonitor()
|
|
|
+ },
|
|
|
+ methods: {
|
|
|
+ getTargetSssName(targetSSs){
|
|
|
+ if(!targetSSs || targetSSs.length == 0){
|
|
|
+ return ''
|
|
|
+ }
|
|
|
+ let targetSssNames = []
|
|
|
+ for(let i = 0;i<targetSSs.length;i++){
|
|
|
+ let item = targetSSs[i]
|
|
|
+ let obj = this.patentMonitorStatus.find(item1=>{
|
|
|
+ return item == item1.value
|
|
|
+ })
|
|
|
+ if(obj){
|
|
|
+ targetSssNames.push(obj.label)
|
|
|
+ }
|
|
|
+ }
|
|
|
+ return targetSssNames.join('、')
|
|
|
+ },
|
|
|
+ add(){
|
|
|
+ this.$router.push(
|
|
|
+ {
|
|
|
+ path: '/project/patentCollection',
|
|
|
+ query: {
|
|
|
+ id: this.projectId,
|
|
|
+ projectName:this.projectName,
|
|
|
+ projectType:1
|
|
|
+ }
|
|
|
+ }
|
|
|
+ )
|
|
|
+ },
|
|
|
+ getUpdateCycle(){
|
|
|
+ var params = {
|
|
|
+ projectId:this.projectId
|
|
|
+ }
|
|
|
+ this.$api.queryNotifyCycle(params).then(res=>{
|
|
|
+ if(res.code == 200){
|
|
|
+ this.update = res.data
|
|
|
+ if(res.data.notifyCycle){
|
|
|
+ this.update.ifUpdate = true
|
|
|
+ }else{
|
|
|
+ this.update.ifUpdate = false
|
|
|
+ }
|
|
|
+ }
|
|
|
+ })
|
|
|
+ },
|
|
|
+ getUpdateCycleName(updateCycle){
|
|
|
+ var arr = this.updateCycles
|
|
|
+ var obj = arr.find(item=>{
|
|
|
+ return item.value == updateCycle
|
|
|
+ })
|
|
|
+ if(obj){
|
|
|
+ return obj.label
|
|
|
+ }
|
|
|
+ return ''
|
|
|
+ },
|
|
|
+ queryPatentStatusMonitor(){
|
|
|
+ this.loading = true
|
|
|
+ this.$api.queryPatentStatusMonitor(this.queryParams).then(response=>{
|
|
|
+ if(response.code == 200){
|
|
|
+ this.tableData = response.data.data
|
|
|
+ this.total = response.data.total
|
|
|
+ this.loading = false
|
|
|
+ }
|
|
|
+ }).catch(error=>{
|
|
|
+ this.tableData = []
|
|
|
+ this.loading = false
|
|
|
+ })
|
|
|
+ },
|
|
|
+ handleSelectionChange(val){
|
|
|
+ this.multipleSelection = val
|
|
|
+ },
|
|
|
+ handleCurrentChange(val){
|
|
|
+ this.queryParams.current = val
|
|
|
+ this.queryPatentStatusMonitor()
|
|
|
+ },
|
|
|
+ //切换页大小
|
|
|
+ changeSize(val){
|
|
|
+ this.queryParams.size = val
|
|
|
+ this.queryParams.current = 1
|
|
|
+ this.queryPatentStatusMonitor()
|
|
|
+ },
|
|
|
+ del(){
|
|
|
+ var ids = this.multipleSelection.map(item=>{
|
|
|
+ return item.id
|
|
|
+ })
|
|
|
+ this.removeSearchRecords(ids,1)
|
|
|
+ },
|
|
|
+ delSearch(row){
|
|
|
+ this.removeSearchRecords([row.id])
|
|
|
+ },
|
|
|
+ editSearch(row){
|
|
|
+ var params = {
|
|
|
+ targetSSs:row.targetSSs || [],
|
|
|
+ status:row.status,
|
|
|
+ notifyPeople:row.notifyPeople || [],
|
|
|
+ id:row.id
|
|
|
+ }
|
|
|
+ this.$refs.addPatentStatusMonitorDialog.open(JSON.parse(JSON.stringify(params)))
|
|
|
+ },
|
|
|
+ removeSearchRecords(ids,type){
|
|
|
+ this.$confirm('确认删除本条数据吗?', '提示', {
|
|
|
+ confirmButtonText: '确定',
|
|
|
+ cancelButtonText: '取消',
|
|
|
+ type: 'warning'
|
|
|
+ }).then(() => {
|
|
|
+ this.$api.deletePatentStatusMonitor({ids:ids}).then(response=>{
|
|
|
+ if(response.code == 200){
|
|
|
+ this.$message.success('删除成功')
|
|
|
+ this.queryPatentStatusMonitor()
|
|
|
+ if(type){
|
|
|
+ this.multipleSelection = []
|
|
|
+ this.$refs.table.clearSelection();
|
|
|
+ }else{
|
|
|
+ var id = response.data.data[0]
|
|
|
+ var index = this.multipleSelection.findIndex(item=>{
|
|
|
+ return item.id == id
|
|
|
+ })
|
|
|
+ if(index!=-1){
|
|
|
+ this.multipleSelection.splice(index,1)
|
|
|
+ }
|
|
|
+ }
|
|
|
+
|
|
|
+ }
|
|
|
+ }).catch(error=>{
|
|
|
+ // this.$message.error('删除失败')
|
|
|
+ })
|
|
|
+ })
|
|
|
+ },
|
|
|
+ editUpdate(){
|
|
|
+ var form = {
|
|
|
+ ...this.update,
|
|
|
+ projectId:this.projectId
|
|
|
+ }
|
|
|
+ this.$refs.emailNotifyCycleDialog.open(form)
|
|
|
+ },
|
|
|
+
|
|
|
+ },
|
|
|
+};
|
|
|
+</script>
|
|
|
+<style lang="scss" scoped>
|
|
|
+</style>
|