From 9e5caf43d7059cd5b28703b138e95b7f4df94699 Mon Sep 17 00:00:00 2001
From: fuliqi <fuliqi@qq.com>
Date: 星期五, 27 九月 2024 17:00:42 +0800
Subject: [PATCH] 首页图表
---
src/views/system/contract/contract/index.vue | 87 ++++++++++++++++++++++++++++---------------
1 files changed, 56 insertions(+), 31 deletions(-)
diff --git a/src/views/system/contract/contract/index.vue b/src/views/system/contract/contract/index.vue
index 8f7e39d..1d99865 100644
--- a/src/views/system/contract/contract/index.vue
+++ b/src/views/system/contract/contract/index.vue
@@ -1,5 +1,29 @@
<template>
<div class="app-container">
+ <el-form :model="queryParams" ref="queryForm" size="small" :inline="true" v-show="showSearch">
+ <el-form-item label="鍚堝悓鍚嶇О">
+ <el-input
+ v-model="queryParams.name"
+ placeholder="鍚堝悓鍚嶇О鎼滅储"
+ clearable
+ @clear="getList"
+ @keyup.enter.native="getList"
+ />
+ </el-form-item>
+ <el-form-item label="鍚堝悓鐘舵��">
+ <el-select v-model="queryParams.status" @change="getList">
+ <el-option label="鍏ㄩ儴" value=""></el-option>
+ <el-option label="鏈夋晥" value="ACTIVE"></el-option>
+ <el-option label="鏈敓鏁�" value="NOT_START"></el-option>
+ <el-option label="宸插け鏁�" value="FINISHED"></el-option>
+ </el-select>
+ </el-form-item>
+ <el-form-item>
+ <el-button type="primary" icon="el-icon-search" size="small" @click="getList">鎼滅储</el-button>
+ </el-form-item>
+ </el-form>
+
+
<el-row :gutter="10" class="mb8" style="margin-top: 10px">
<el-col :span="1.5">
<el-button
@@ -7,24 +31,24 @@
plain
icon="el-icon-plus"
size="mini"
- v-hasPermi="['system:contract:import']"
+ v-hasPermi="['system:contract:add']"
@click="handleImport"
>鏂板</el-button
>
</el-col>
</el-row>
- <el-row v-loading="loading">
+ <el-row v-if="contractList && contractList.length > 0" v-loading="loading" :gutter="20">
<el-col
- :span="8"
+ :span="6"
v-for="(item, index) in contractList"
:key="index"
- style="margin: 10px; width: 30%"
+ style="margin-bottom: 10px"
>
<el-card :body-style="{ padding: '0px' }">
- <ImagePreview
+ <el-image
style="width: 100%; height: 187px"
fit="cover"
- :src="item.attachment"
+ :src="require('../../../../assets/images/ht.jpg')"
class="image"
/>
<div style="padding: 14px">
@@ -44,6 +68,7 @@
</el-card>
</el-col>
</el-row>
+ <el-empty v-else description="鏆傛棤鏁版嵁"></el-empty>
<!-- 鍚堝悓璇︽儏 -->
<el-dialog
@@ -55,33 +80,22 @@
<el-form label-position="left" inline class="table-expand">
<el-collapse v-model="activeNames">
<el-collapse-item
- v-for="(item, index) in ruleData"
+ v-for="(name, index) in ruleName"
:key="index"
- :title="item.ruleName"
- :name="index"
+ :title="name"
>
<div
class="inline-input-container"
- v-for="(item, index) in item.children"
+ v-for="(item, index) in ruleData"
:key="index"
>
- <b>{{ item.ruleDesc }}</b> <br v-if="item.ruleDesc" />
- <el-tooltip
- class="item"
- v-for="(item, index) in item.children"
- :key="index"
- effect="dark"
- :content="
- item.deductCategory == '鍒嗘暟涔樹互鏁伴噺'
- ? '鎵�' + item.calcFraction + '鍒�*鏁伴噺 '
- : item.deductCategory == '闄や互鏁伴噺鍚庝箻浠ュ垎鏁�'
- ? '鎵�' + item.calcFraction + '鍒�/' + item.calcUnit + '灏忔椂'
- : '鎵�' + item.calcFraction + '鍒�'
- "
- placement="top"
- >
- <span>{{ item.ruleCondition }}<br /></span>
- <!-- {{ item.deductCategory }} {{ item.calcFraction }}{{ item.calcUnit ? "/" + item.calcUnit : '' }} -->
+ <el-tooltip :content="
+ item.deductCategory == '鍒嗘暟涔樹互鏁伴噺'
+ ? '鎵�' + item.calcFraction + '鍒�*鏁伴噺 '
+ : item.deductCategory == '闄や互鏁伴噺鍚庝箻浠ュ垎鏁�'
+ ? '鎵�' + item.calcFraction + '鍒�/' + item.calcUnit + '灏忔椂'
+ : '鎵�' + item.calcFraction + '鍒�'">
+ <b v-if="item.ruleName === name">{{ item.ruleCondition }}<br /></b>
</el-tooltip>
</div>
</el-collapse-item>
@@ -102,6 +116,7 @@
</el-tooltip>
</div>
</span>
+ <el-empty v-if="moneyRules.length == 0" :image-size="100" />
</div>
</el-collapse-item>
<el-form-item label="鍚堝悓闄勪欢" prop="attachment" class="top">
@@ -250,8 +265,8 @@
</el-form>
<div slot="footer" class="dialog-footer">
- <el-button type="primary" @click="submitFileForm">纭� 瀹�</el-button>
<el-button @click="upload.open = false">鍙� 娑�</el-button>
+ <el-button type="primary" @click="submitFileForm">纭� 瀹�</el-button>
</div>
</el-dialog>
</div>
@@ -275,6 +290,10 @@
comments: { ImagePreview },
data() {
return {
+ queryParams: {
+ name: '',
+ status: ''
+ },
loading: false,
contractInfo: {},
// 鍚堝悓瀵煎叆鍙傛暟
@@ -303,8 +322,6 @@
unitList: [],
deptList: [],
activeNames: ["1"],
- // 閬僵灞�
- loading: true,
// 閫変腑鏁扮粍
ids: [],
// 闈炲崟涓鐢�
@@ -326,6 +343,7 @@
// 鏄惁鏄剧ず璇︽儏
detail: false,
ruleData: [],
+ ruleName: [],
moneyRules: [],
// 琛ㄥ崟鍙傛暟
form: {},
@@ -449,7 +467,7 @@
getList() {
this.loading = true;
listContract(this.queryParams).then((response) => {
- this.contractList = response;
+ this.contractList = response.data;
this.total = response.total;
this.loading = false;
});
@@ -458,6 +476,13 @@
getRuleList(item) {
getRuleListByContractId(item.id).then((response) => {
this.ruleData = response.data;
+ if (this.ruleData) {
+ this.ruleName = this.ruleData.map((item) => {
+ return item.ruleName;
+ });
+ this.ruleName = [...new Set(this.ruleName)];
+ console.log('this.ruleName', this.ruleName);
+ }
this.form.id = item.id;
this.contractInfo = item;
});
--
Gitblit v1.8.0