From a5c3d8a6a9dee5c50bb39b4b7b625eec81e7da34 Mon Sep 17 00:00:00 2001
From: hailu <962012470@qq.com>
Date: 星期三, 28 二月 2024 17:10:47 +0800
Subject: [PATCH] A股

---
 src/view/risk-control/Astock.vue |  330 +++++++++++++++++++++++++++++++++++++++++++++++++++++++
 1 files changed, 330 insertions(+), 0 deletions(-)

diff --git a/src/view/risk-control/Astock.vue b/src/view/risk-control/Astock.vue
index e69de29..54726fb 100644
--- a/src/view/risk-control/Astock.vue
+++ b/src/view/risk-control/Astock.vue
@@ -0,0 +1,330 @@
+<template>
+    <div class="rentClass receivableClass">
+      <Card v-if="showTabTitle" class="customTitle">
+        <div >
+          <Icon custom="custom custom-fangkuan"></Icon>
+          <span style="margin-left: 6px;">A鑲″競鍦哄叏鏅垎鏋�</span>
+        </div>
+      </Card>
+      <Card style="padding-bottom:60px;margin-top:3px;">
+        <div class="lists_readAndEdit2" style="margin-top: 0;padding-top: 0;display: flex;"
+          v-if="showTabTitle">
+          <div>
+            <Select v-model="article" style="width:100px;padding-right: 12px" size="large">
+              <Option value="0">鏍囬</Option>
+              <Option value="1">鎽樿</Option>
+              <Option value="2">鍐呭</Option>
+  
+            </Select>
+            <Input v-model="searchName" clearable size="large" style="width: 400px;font-size:14px;margin-right: 12px;"
+              placeholder="璇疯緭鍏ユ爣棰樻憳瑕佹垨鍐呭"></Input>
+            <Button size="large" icon="ios-search" type="primary" @click="searchClick">鎼滅储</Button>
+          </div>
+  
+        </div>
+        <div class="rentScrollOut" style="margin-top: 12px">
+          <Table ref="datalist" :data="datalist" :columns="datalistcol" transfer :loading="loading" border>
+            <template slot="action" slot-scope="params">
+              <Tooltip content="鏌ョ湅" class="tableActionMargin" theme="light" transfer max-width="200" placement="top">
+                <Icon class="action_class" custom="custom custom-chakan" size="18" style="color:#2D8CF0;cursor: pointer;"
+                  @click="checkArticle(params.row)" />
+              </Tooltip>
+            </template>
+          </Table>
+         
+          <Page :current="CurrentPage" :total="totalItems" :page-size="8" @on-change="changePage"
+            style="float: right;margin-top: 12px;" />
+        </div>
+      </Card>
+    </div>
+  </template>
+  
+  <script>
+  import axios from '@/libs/api.request'
+  import $ from 'jquery'
+  export default {
+    name: '',
+    props: {
+      showTabTitle: {
+        type: Boolean,
+        default: true
+      },
+      name: {
+        type: String,
+        default: ''
+      },
+      fullCompanyName: {
+        type: String,
+        default: ''
+      }
+    },
+    data() {
+      return {
+        searchName: '',
+        article: '0',
+        pageIndex: 1,
+        pageSize: 8,
+        totalItems: 0,
+        totalPages: 0,
+        datalist: [],
+        loading: false,
+        titleKeyword: '',
+        abstractKeyword: '',
+        CurrentPage: 0,
+      }
+    },
+    watch: {
+  
+    },
+    mounted() {
+      if (this.name) {
+        console.log(this.fullCompanyName, this.name);
+        this.searchName = this.name
+        this.article = '2'
+        this.searchClick()
+        // this.getPage()
+      } else {
+        this.getPage()
+      }
+  
+    },
+    created() {
+  
+    },
+    methods: {
+      searchClick() {
+        this.pageIndex = 1
+        this.loading = true
+        let data = {
+          fullName: this.fullCompanyName,
+          pageIndex: this.pageIndex,
+          pageSize: this.pageSize,
+          industryCategoryKeyword: 'A鑲″競鍦哄叏鏅垎鏋�',
+          ArticleTypeKeyword: 'A鑲�',
+          titleKeyword: '',
+          abstractKeyword: '',
+          contentKeyword: '',
+        }
+        if (this.article === '0') {
+          data.titleKeyword = this.searchName
+          data.abstractKeyword = ''
+          data.contentKeyword = ''
+        } else if (this.article === '1') {
+          data.titleKeyword = ''
+          data.contentKeyword = ''
+          data.abstractKeyword = this.searchName
+        } else if (this.article === '2') {
+          data.contentKeyword = this.searchName
+          data.titleKeyword = ''
+          data.abstractKeyword = ''
+        }
+        axios.request({
+          url: '/IndustryChain/GetPage',
+          data,
+          method: 'post'
+        }).then(res => {
+          if (res.data.Check) {
+            this.datalist = res.data.Data.Items
+            this.loading = false
+            this.totalItems = res.data.Data.TotalItems
+            this.totalPages = res.data.Data.TotalPages
+            this.CurrentPage = res.data.Data.CurrentPage
+          } else {
+            this.loading = false
+  
+          }
+        }, res => {
+  
+        })
+  
+      },
+      changePage(index) {
+        this.pageIndex = index
+        this.getPage()
+  
+      },
+      getPage() {
+        this.loading = true
+        let data = {
+          fullName: this.fullCompanyName,
+          pageIndex: this.pageIndex,
+          pageSize: this.pageSize,
+          industryCategoryKeyword: 'A鑲″競鍦哄叏鏅垎鏋�',
+          ArticleTypeKeyword: 'A鑲�',
+          titleKeyword: '',
+          abstractKeyword: '',
+          contentKeyword: '',
+        }
+        if (this.article === '0') {
+          data.titleKeyword = this.searchName
+          data.abstractKeyword = ''
+          data.contentKeyword = ''
+        } else if (this.article === '1') {
+          data.titleKeyword = ''
+          data.contentKeyword = ''
+          data.abstractKeyword = this.searchName
+        } else if (this.article === '2') {
+          data.contentKeyword = this.searchName
+          data.titleKeyword = ''
+          data.abstractKeyword = ''
+        }
+        axios.request({
+          url: '/IndustryChain/GetPage',
+          data,
+          method: 'post'
+        }).then(res => {
+          if (res.data.Check) {
+            this.datalist = res.data.Data.Items
+            this.loading = false
+            this.totalItems = res.data.Data.TotalItems
+            this.totalPages = res.data.Data.TotalPages
+            this.CurrentPage = res.data.Data.CurrentPage
+          } else {
+            this.loading = false
+  
+          }
+        }, res => {
+  
+        })
+      },
+      checkArticle(params) {
+        // console.log(params);
+        // this.$router.push('/artDetail')
+        this.$router.push({
+          name: "artDetail",
+          query: {
+            id: params.Id
+          },
+          params: {
+            // name: params.Title
+            name: params.Title.length > 15 ? params.Title.substring(0, 15) + '...' : params.Title,
+  
+          }
+        });
+      },
+  
+    },
+    computed: {
+      datalistcol() {
+        // 鏍囬 鎽樿 鍐呭锛屽彂甯冩椂闂� 淇敼鏃堕棿锛屾祻瑙堟鏁帮紝鍙戝竷鑰咃紝闄勪欢锛屾爣绛撅紝琛屼笟鍒嗙被 鏂囩珷绫诲瀷
+        let columns = [];
+        columns.push({
+          title: "搴忓彿",
+          key: "id",
+          render: (h, params) => {
+            return h("span", params.index + 1 + (this.pageIndex - 1) * 8);
+          },
+          width: 100,
+          align: "center",
+          fixed: 'left'
+  
+        });
+        columns.push({
+          title: "鏍囬",
+          key: "Title",
+          minWidth: 200,
+          render: (h, params) => {
+            return h("span",
+              {
+                style: {
+                  margin: '0 0 0 3px',
+                }
+              },
+              params.row.Title);
+          },
+          className: 'tablecontent',
+          align: 'center',
+        });
+        columns.push({
+          title: "鎽樿",
+          key: "Abstract",
+          minWidth: 380,
+          className: 'tablecontent',
+          align: 'center',
+          render: (h, params) => {
+            return h('Tooltip', {
+              props: {
+                placement: 'bottom-start', transfer: true, maxWidth: 500,
+              },
+            },
+              [
+                h('div', {
+                  style: {
+                    width: '380px',
+                    overflow: 'hidden',
+                    whiteSpace: 'nowrap',
+                    textOverflow: 'ellipsis',
+                    margin: '0 0 0 3px',
+                  }
+                }, params.row.Abstract),
+                h('span', {
+                  slot: 'content',
+                  style: {
+                    whiteSpace: 'normal',
+                    wordBreak: 'break-all',
+  
+                  }
+                }, params.row.Abstract)
+              ]
+            )
+          }
+        });
+        columns.push({
+          title: "鍙戝竷鏃堕棿",
+          key: "PubTime",
+          width: 150,
+          align: 'center'
+        });
+        // columns.push({
+        //   title: "淇敼鏃堕棿",
+        //   key: "UpdateTime",
+        //   width: 200,
+        //   align: 'center'
+        // });
+  
+        columns.push({
+          title: "鏍囩",
+          key: "Tag",
+          render: (h, params) => {
+            return h("span", params.row.Tag.join());
+          },
+          width: 100,
+          align: 'center'
+        });
+        // columns.push({
+        //   title: "琛屼笟鍒嗙被",
+        //   key: "IndustryCategory",
+        //   // solt: 'IndustryCategoryParams',
+        //   width: 200,
+        //   align: 'center',
+  
+  
+        // });
+        // columns.push({
+        //   title: "鏂囩珷绫诲瀷",
+        //   key: "ArticleType",
+        //   // solt: "ArticleTypeParams",
+        //   width: 200,
+        //   align: 'center',
+  
+        // });
+        columns.push({
+          title: '鎿嶄綔',
+          key: 'action',
+          slot: 'action',
+          width: 100,
+          align: 'center',
+          fixed: 'right'
+        })
+  
+        return columns;
+      },
+    }
+  }
+  </script>
+  
+  <style scoped>
+  
+  </style>
+  
+  
\ No newline at end of file

--
Gitblit v1.8.0