guhongwei 2 years ago
parent
commit
c94538a8fb

+ 53 - 22
src/views/ppatent/warning/index.vue

@@ -2,37 +2,68 @@
   <div id="index">
     <el-row>
       <el-col :span="24" class="main animate__animated animate__backInRight" v-loading="loading">
-        <el-col :span="24" class="one">系统首页</el-col>
+        <el-col :span="24" class="one">
+          <cSearch :is_title="false" :is_search="true" :fields="fields" @search="toSearch"> </cSearch>
+        </el-col>
+        <el-col :span="24" class="thr">
+          <cTable :fields="fields" :opera="opera" :list="list" @query="search" :total="total"> </cTable>
+        </el-col>
       </el-col>
     </el-row>
   </div>
 </template>
-
-<script setup lang="ts">
-// 基础
+<script lang="ts" setup>
+import _ from 'lodash';
 import type { Ref } from 'vue';
-// reactive,
-import { onMounted, ref, getCurrentInstance } from 'vue';
+import { ref, onMounted, getCurrentInstance } from 'vue';
+
 // 接口
-//import { TestStore } from '@common/src/stores/test';
-//import type { IQueryResult } from '@/util/types.util';
-//const testAxios = TestStore();
+import { PatentWarningStore } from '@common/src/stores/patent/patentWarning';
+import type { IQueryResult } from '@/util/types.util';
+const warnAxios = PatentWarningStore();
+
 const { proxy } = getCurrentInstance() as any;
+
 // 加载中
-const loading: Ref<any> = ref(false);
-// 分页数据
-//  const skip = 0;
-//  const limit = proxy.limit;;
-// 请求
+const loading = ref(false);
+// 列表数据
+let list: Ref<any> = ref([]);
+let total: Ref<number> = ref(0);
+let skip = 0;
+let limit: number = proxy.$limit;
+let fields: Ref<any[]> = ref([
+  { label: '申请号', model: 'create_number', isSearch: true },
+  { label: '专利名称', model: 'patnet_name', isSearch: true },
+  { label: '发送时间', model: 'send_date' },
+  { label: '缴费截止日期', model: 'lose_date' },
+  { label: '预警信息', model: 'content' }
+]);
+// 操作
+let opera: Ref<any[]> = ref([]);
+
+// 查询数据
+let searchForm: Ref<any> = ref({});
+
 onMounted(async () => {
-  loading.value = true;
-  //  await search({ skip, limit });
+  loading.value = false;
+  await searchOther();
+  await search({ skip, limit });
   loading.value = false;
 });
-//const search = async (e: { skip: number; limit: number }) => {
-//  const info = { skip: e.skip, limit: e.limit, ...searchInfo.value  };
-//  const res: IQueryResult = await testAxios.query(info);
-//  console.log(res);
-//};
+// 查询
+const search = async (e: { skip: number; limit: number }) => {
+  const { skip, limit } = e;
+  const condition = _.cloneDeep(searchForm.value);
+  let info = { limit: limit, skip: skip, ...condition };
+  let res: IQueryResult = await warnAxios.query(info);
+  if (res.errcode == 0) {
+    list.value = res.data;
+    total.value = res.total;
+  }
+};
+const toSearch = (query) => {
+  searchForm.value = query;
+  search({ skip, limit });
+};
 </script>
-<style scoped lang="scss"></style>
+<style lang="scss" scoped></style>

+ 53 - 22
src/views/spatent/early/index.vue

@@ -2,37 +2,68 @@
   <div id="index">
     <el-row>
       <el-col :span="24" class="main animate__animated animate__backInRight" v-loading="loading">
-        <el-col :span="24" class="one">系统首页</el-col>
+        <el-col :span="24" class="one">
+          <cSearch :is_title="false" :is_search="true" :fields="fields" @search="toSearch"> </cSearch>
+        </el-col>
+        <el-col :span="24" class="thr">
+          <cTable :fields="fields" :opera="opera" :list="list" @query="search" :total="total"> </cTable>
+        </el-col>
       </el-col>
     </el-row>
   </div>
 </template>
-
-<script setup lang="ts">
-// 基础
+<script lang="ts" setup>
+import _ from 'lodash';
 import type { Ref } from 'vue';
-// reactive,
-import { onMounted, ref, getCurrentInstance } from 'vue';
+import { ref, onMounted, getCurrentInstance } from 'vue';
+
 // 接口
-//import { TestStore } from '@common/src/stores/test';
-//import type { IQueryResult } from '@/util/types.util';
-//const testAxios = TestStore();
+import { PatentWarningStore } from '@common/src/stores/patent/patentWarning';
+import type { IQueryResult } from '@/util/types.util';
+const warnAxios = PatentWarningStore();
+
 const { proxy } = getCurrentInstance() as any;
+
 // 加载中
-const loading: Ref<any> = ref(false);
-// 分页数据
-//  const skip = 0;
-//  const limit = proxy.limit;;
-// 请求
+const loading = ref(false);
+// 列表数据
+let list: Ref<any> = ref([]);
+let total: Ref<number> = ref(0);
+let skip = 0;
+let limit: number = proxy.$limit;
+let fields: Ref<any[]> = ref([
+  { label: '申请号', model: 'create_number', isSearch: true },
+  { label: '专利名称', model: 'patnet_name', isSearch: true },
+  { label: '发送时间', model: 'send_date' },
+  { label: '缴费截止日期', model: 'lose_date' },
+  { label: '预警信息', model: 'content' }
+]);
+// 操作
+let opera: Ref<any[]> = ref([]);
+
+// 查询数据
+let searchForm: Ref<any> = ref({});
+
 onMounted(async () => {
-  loading.value = true;
-  //  await search({ skip, limit });
+  loading.value = false;
+  await searchOther();
+  await search({ skip, limit });
   loading.value = false;
 });
-//const search = async (e: { skip: number; limit: number }) => {
-//  const info = { skip: e.skip, limit: e.limit, ...searchInfo.value  };
-//  const res: IQueryResult = await testAxios.query(info);
-//  console.log(res);
-//};
+// 查询
+const search = async (e: { skip: number; limit: number }) => {
+  const { skip, limit } = e;
+  const condition = _.cloneDeep(searchForm.value);
+  let info = { limit: limit, skip: skip, ...condition };
+  let res: IQueryResult = await warnAxios.query(info);
+  if (res.errcode == 0) {
+    list.value = res.data;
+    total.value = res.total;
+  }
+};
+const toSearch = (query) => {
+  searchForm.value = query;
+  search({ skip, limit });
+};
 </script>
-<style scoped lang="scss"></style>
+<style lang="scss" scoped></style>

+ 53 - 22
src/views/upatent/warning/index.vue

@@ -2,37 +2,68 @@
   <div id="index">
     <el-row>
       <el-col :span="24" class="main animate__animated animate__backInRight" v-loading="loading">
-        <el-col :span="24" class="one">系统首页</el-col>
+        <el-col :span="24" class="one">
+          <cSearch :is_title="false" :is_search="true" :fields="fields" @search="toSearch"> </cSearch>
+        </el-col>
+        <el-col :span="24" class="thr">
+          <cTable :fields="fields" :opera="opera" :list="list" @query="search" :total="total"> </cTable>
+        </el-col>
       </el-col>
     </el-row>
   </div>
 </template>
-
-<script setup lang="ts">
-// 基础
+<script lang="ts" setup>
+import _ from 'lodash';
 import type { Ref } from 'vue';
-// reactive,
-import { onMounted, ref, getCurrentInstance } from 'vue';
+import { ref, onMounted, getCurrentInstance } from 'vue';
+
 // 接口
-//import { TestStore } from '@common/src/stores/test';
-//import type { IQueryResult } from '@/util/types.util';
-//const testAxios = TestStore();
+import { PatentWarningStore } from '@common/src/stores/patent/patentWarning';
+import type { IQueryResult } from '@/util/types.util';
+const warnAxios = PatentWarningStore();
+
 const { proxy } = getCurrentInstance() as any;
+
 // 加载中
-const loading: Ref<any> = ref(false);
-// 分页数据
-//  const skip = 0;
-//  const limit = proxy.limit;;
-// 请求
+const loading = ref(false);
+// 列表数据
+let list: Ref<any> = ref([]);
+let total: Ref<number> = ref(0);
+let skip = 0;
+let limit: number = proxy.$limit;
+let fields: Ref<any[]> = ref([
+  { label: '申请号', model: 'create_number', isSearch: true },
+  { label: '专利名称', model: 'patnet_name', isSearch: true },
+  { label: '发送时间', model: 'send_date' },
+  { label: '缴费截止日期', model: 'lose_date' },
+  { label: '预警信息', model: 'content' }
+]);
+// 操作
+let opera: Ref<any[]> = ref([]);
+
+// 查询数据
+let searchForm: Ref<any> = ref({});
+
 onMounted(async () => {
-  loading.value = true;
-  //  await search({ skip, limit });
+  loading.value = false;
+  await searchOther();
+  await search({ skip, limit });
   loading.value = false;
 });
-//const search = async (e: { skip: number; limit: number }) => {
-//  const info = { skip: e.skip, limit: e.limit, ...searchInfo.value  };
-//  const res: IQueryResult = await testAxios.query(info);
-//  console.log(res);
-//};
+// 查询
+const search = async (e: { skip: number; limit: number }) => {
+  const { skip, limit } = e;
+  const condition = _.cloneDeep(searchForm.value);
+  let info = { limit: limit, skip: skip, ...condition };
+  let res: IQueryResult = await warnAxios.query(info);
+  if (res.errcode == 0) {
+    list.value = res.data;
+    total.value = res.total;
+  }
+};
+const toSearch = (query) => {
+  searchForm.value = query;
+  search({ skip, limit });
+};
 </script>
-<style scoped lang="scss"></style>
+<style lang="scss" scoped></style>