From 2765d6b25f13fb00d4c80a0057e4f1f3d0176c95 Mon Sep 17 00:00:00 2001
From: fuliqi <fuliqi@qq.com>
Date: 星期五, 22 十一月 2024 19:28:27 +0800
Subject: [PATCH] 项目库基本样式
---
src/views/projectEngineering/projectLibrary/index.vue | 477 +++++++++++++++++++++++++++++++
src/api/projectInfo.js | 44 ++
src/views/login.vue | 3
vue.config.js | 2
src/main.js | 3
src/components/VisibilityToolbar/index.vue | 160 ++++++++++
src/views/projectEngineering/projectLibrary/list.js | 176 +++++++++++
7 files changed, 862 insertions(+), 3 deletions(-)
diff --git a/src/api/projectInfo.js b/src/api/projectInfo.js
new file mode 100644
index 0000000..52bb876
--- /dev/null
+++ b/src/api/projectInfo.js
@@ -0,0 +1,44 @@
+import request from '@/utils/request'
+
+// 鏌ヨ椤圭洰绠$悊鍩虹淇℃伅鍒楄〃
+export function listInfo(query) {
+ return request({
+ url: '/code/info/list',
+ method: 'get',
+ params: query
+ })
+}
+
+// 鏌ヨ椤圭洰绠$悊鍩虹淇℃伅璇︾粏
+export function getInfo(id) {
+ return request({
+ url: '/code/info/' + id,
+ method: 'get'
+ })
+}
+
+// 鏂板椤圭洰绠$悊鍩虹淇℃伅
+export function addInfo(data) {
+ return request({
+ url: '/code/info',
+ method: 'post',
+ data: data
+ })
+}
+
+// 淇敼椤圭洰绠$悊鍩虹淇℃伅
+export function updateInfo(data) {
+ return request({
+ url: '/code/info',
+ method: 'put',
+ data: data
+ })
+}
+
+// 鍒犻櫎椤圭洰绠$悊鍩虹淇℃伅
+export function delInfo(id) {
+ return request({
+ url: '/code/info/' + id,
+ method: 'delete'
+ })
+}
diff --git a/src/components/VisibilityToolbar/index.vue b/src/components/VisibilityToolbar/index.vue
new file mode 100644
index 0000000..7b37a77
--- /dev/null
+++ b/src/components/VisibilityToolbar/index.vue
@@ -0,0 +1,160 @@
+<template>
+ <div class="top-right-btn" :style="style">
+ <el-row>
+ <el-tooltip v-if="search" class="item" effect="dark" :content="showSearch ? '闅愯棌鎼滅储' : '鏄剧ず鎼滅储'" placement="top">
+ <el-button size="small" circle icon="el-icon-search" @click="toggleSearch"></el-button>
+ </el-tooltip>
+ <el-tooltip class="item" effect="dark" content="鍒锋柊" placement="top">
+ <el-button size="small" circle icon="el-icon-refresh" @click="refresh"></el-button>
+ </el-tooltip>
+ <el-tooltip v-if="columns" class="item" effect="dark" content="鏄剧ず/闅愯棌鍒�" placement="top">
+ <el-button size="small" circle icon="el-icon-menu" @click="openDrawer"></el-button>
+ </el-tooltip>
+ </el-row>
+
+ <el-drawer v-model="table" title="淇℃伅鏄鹃殣绛涢��" size="30%" append-to-body>
+ <div slot="header">
+ <span>淇℃伅鏄鹃殣绛涢��</span>
+ </div>
+ <div slot="default">
+ <el-table :data="pagedColumns" style="width: 100%; height: 80%">
+ <el-table-column prop="index" label="搴忓彿" width="80"></el-table-column>
+ <el-table-column prop="label" label="鏁版嵁鍚嶇О"></el-table-column>
+ <el-table-column prop="visible" label="鏄惁鏄剧ず">
+ <template slot-scope="scope">
+ <el-switch
+ v-model="scope.row.visible"
+ class="ml-2"
+ style="--el-switch-on-color: #13ce66; --el-switch-off-color: #ff4949"
+ @change="switchChange(scope.row)"
+ ></el-switch>
+ </template>
+ </el-table-column>
+ <el-table-column prop="date" label="鎺掑簭">
+ <template slot-scope="scope">
+ <el-input-number v-model="scope.row.serialNumber" :min="0" style="width: 120px" @change="sortChange(scope.row, $event)"></el-input-number>
+ </template>
+ </el-table-column>
+ </el-table>
+
+ <el-pagination
+ v-if="total > pageSize"
+ :page-size="pageSize"
+ :current-page="currentPage"
+ :total="total"
+ layout="total, prev, pager, next"
+ @current-change="handlePageChange"
+ ></el-pagination>
+ </div>
+ <div slot="footer">
+ <el-button @click="table = false">鍙� 娑�</el-button>
+ <el-button type="primary" @click="resetSort">閲� 缃�</el-button>
+ </div>
+ </el-drawer>
+ </div>
+</template>
+
+<script>
+
+export default {
+ data() {
+ return {
+ table: false,
+ currentPage: 1,
+ columnRef: null,
+ };
+ },
+ props: {
+ showSearch: {
+ type: Boolean,
+ default: true,
+ },
+ columns: {
+ type: Array,
+ default: () => [],
+ },
+ search: {
+ type: Boolean,
+ default: false,
+ },
+ gutter: {
+ type: Number,
+ default: 10,
+ },
+ },
+ computed: {
+ style() {
+ return {
+ marginRight: this.gutter ? `${this.gutter / 2}px` : '',
+ };
+ },
+ pageSize() {
+ return 10;
+ },
+ total() {
+ return this.columns.length;
+ },
+ pagedColumns() {
+ const start = (this.currentPage - 1) * this.pageSize;
+ const end = start + this.pageSize;
+ return this.columns.slice(start, end);
+ },
+ },
+ methods: {
+ toggleSearch() {
+ this.$emit('update:showSearch', !this.showSearch);
+ },
+ refresh() {
+ this.$emit('queryTable');
+ },
+ openDrawer() {
+ this.table = true;
+ },
+ switchChange(row) {
+ this.$emit('update:columns', row);
+ },
+ handlePageChange(page) {
+ this.currentPage = page;
+ },
+ sortChange(row, val) {
+ this.$emit('update:sort', { key: row.key, serialNumber: val });
+ },
+ resetSort() {
+ this.$emit('update:resetSort');
+ },
+ },
+ mounted() {
+ this.columns.forEach((item, index) => {
+ if (item.visible) {
+ // 娉ㄦ剰锛氳繖閲屽亣璁綾olumnRef搴旇鏄竴涓猚heckbox缁勪欢鐨勫紩鐢紝
+ // 浣嗗湪Vue 2涓紝鎴戜滑鍙兘闇�瑕佸彟涓�绉嶆柟寮忔潵绠$悊checked鐘舵�侊紝
+ // 鍥犱负Vue 2娌℃湁ref鐨勮嚜鍔ㄥ疄渚嬬粦瀹氾紝涓旇繖閲岀殑columnRef閫昏緫浼间箮涓嶅畬鏁存垨閿欒銆�
+ // 鍙兘闇�瑕佺Щ闄ゆ垨閲嶅啓杩欓儴鍒嗛�昏緫銆�
+ }
+ });
+ },
+};
+</script>
+
+<style lang="scss" scoped>
+:deep(.el-transfer__button) {
+ border-radius: 50%;
+ display: block;
+ margin-left: 0px;
+}
+:deep(.el-transfer__button:first-child) {
+ margin-bottom: 10px;
+}
+
+.my-el-transfer {
+ text-align: center;
+}
+.tree-header {
+ width: 100%;
+ line-height: 24px;
+ text-align: center;
+}
+.show-btn {
+ margin-left: 12px;
+}
+</style>
diff --git a/src/main.js b/src/main.js
index 13c6cf2..36f1893 100644
--- a/src/main.js
+++ b/src/main.js
@@ -37,6 +37,8 @@
import VueMeta from 'vue-meta'
// 瀛楀吀鏁版嵁缁勪欢
import DictData from '@/components/DictData'
+// 鑷畾涔夋悳绱€�佹帶鍒惰〃澶存樉闅愭寜閽�
+import VisibilityToolbar from '@/components/VisibilityToolbar'
// 鍏ㄥ眬鏂规硶鎸傝浇
Vue.prototype.getDicts = getDicts
@@ -57,6 +59,7 @@
Vue.component('FileUpload', FileUpload)
Vue.component('ImageUpload', ImageUpload)
Vue.component('ImagePreview', ImagePreview)
+Vue.component('VisibilityToolbar', VisibilityToolbar)
Vue.use(directive)
Vue.use(plugins)
diff --git a/src/views/login.vue b/src/views/login.vue
index 88e6107..4dca713 100644
--- a/src/views/login.vue
+++ b/src/views/login.vue
@@ -123,7 +123,7 @@
<div class="other-title">
<span style="color: #b3b8c1">鍏朵粬鐧诲綍鏂瑰紡:</span
><span style="color: #2d5eff; cursor: pointer">
- <SvgIcon icon-class="phone" />鎵嬫満楠岃瘉鐮佺櫥褰�
+ <svg-icon icon-class="phone" />鎵嬫満楠岃瘉鐮佺櫥褰�
</span>
</div>
<div class="forget">蹇樿瀵嗙爜锛�</div>
@@ -215,7 +215,6 @@
console.log(this.loginForm);
},
handleLogin() {
- debugger
this.$refs.loginRef.validate((valid) => {
if (valid) {
this.loading = true;
diff --git a/src/views/projectEngineering/projectLibrary/index.vue b/src/views/projectEngineering/projectLibrary/index.vue
new file mode 100644
index 0000000..06d2b98
--- /dev/null
+++ b/src/views/projectEngineering/projectLibrary/index.vue
@@ -0,0 +1,477 @@
+<template>
+ <div class="app-container">
+ <el-form :model="queryParams" ref="queryForm" size="small" :inline="true" v-show="showSearch" label-width="68px">
+ <div class="slot">
+ <div class="left-section">
+ <el-form-item label="椤圭洰鍚嶇О" prop="projectName">
+ <el-input
+ style="width: 190px;margin-right: 20px"
+ size="small"
+ v-model="queryParams.projectName"
+ placeholder="璇疯緭鍏ラ」鐩悕绉�"
+ clearable
+ @keyup.enter.native="handleQuery"
+ />
+ </el-form-item>
+ <el-form-item label="椤圭洰浠g爜" prop="projectCode">
+ <el-input
+ style="width: 190px;margin-right: 20px"
+ size="small"
+ v-model="queryParams.projectCode"
+ placeholder="璇疯緭鍏ラ」鐩唬鐮�"
+ clearable
+ @keyup.enter.native="handleQuery"
+ />
+ </el-form-item>
+
+ <el-form-item label="椤圭洰骞撮檺" prop="timeRange">
+ <el-date-picker
+ style="width: 270px"
+ size="small"
+ v-model="queryParams[timeRange]"
+ type="daterange"
+ range-separator="-"
+ value-format="yyyy-MM-dd"
+ start-placeholder="寮�濮嬫棩鏈�"
+ end-placeholder="缁撴潫鏃ユ湡"
+ @change="handleQuery"
+ clearable
+ >
+ </el-date-picker>
+ </el-form-item>
+ <el-form-item>
+ <el-button icon="el-icon-search" size="small" @click="handleQuery">鎼滅储</el-button>
+ <el-button icon="el-icon-refresh" size="small" @click="resetQuery">閲嶇疆</el-button>
+ </el-form-item>
+ <el-popover :visible="popoverValue" :width="500" placement="bottom">
+ <template #reference>
+ <el-button style="margin-right: 16px; margin-top: 1px; color: #3369ff" @click="handlePopover" size="small">
+ 鏇村绛涙煡鏉′欢
+ <span style="margin-left: 5px">
+ <el-icon v-if="!popoverValue" class="el-icon-arrow-down"></el-icon>
+ <el-icon v-else-if="popoverValue" class="el-icon-arrow-up"></el-icon>
+ </span>
+ </el-button>
+ </template>
+ <span>绛涢�夋潯浠�</span>
+ <!-- 琛ㄥ崟鍐呭 -->
+<!-- <el-form ref="queryFormRef" :inline="true" :model="queryForm" class="demo-form-inline">-->
+<!-- <el-row>-->
+<!-- <el-col :span="12">-->
+<!-- <el-form-item label="椤圭洰绫诲瀷">-->
+<!-- <el-select v-model="queryForm.projectType" clearable placeholder="璇烽�夋嫨" style="width: 140px">-->
+<!-- <el-option v-for="items in sys_project_type" :key="items.value" :label="items.label" :value="items.value" />-->
+<!-- </el-select>-->
+<!-- </el-form-item>-->
+<!-- </el-col>-->
+<!-- <el-col :span="12">-->
+<!-- <el-form-item label="閲嶇偣鍒嗙被">-->
+<!-- <el-select v-model="queryForm.importanceType" clearable placeholder="璇烽�夋嫨" style="width: 140px">-->
+<!-- <el-option v-for="items in sys_key_categories" :key="items.value" :label="items.label" :value="items.value" />-->
+<!-- </el-select>-->
+<!-- </el-form-item>-->
+<!-- </el-col>-->
+<!-- </el-row>-->
+<!-- <el-row>-->
+<!-- <el-col :span="12">-->
+<!-- <el-form-item label="椤圭洰鏍囩">-->
+<!-- <el-select v-model="queryForm.tag" clearable placeholder="璇烽�夋嫨" style="width: 140px">-->
+<!-- <el-option v-for="items in sys_project_tags" :key="items.value" :label="items.label" :value="items.value" />-->
+<!-- </el-select>-->
+<!-- </el-form-item>-->
+<!-- </el-col>-->
+<!-- <el-col :span="12">-->
+<!-- <el-form-item label="椤圭洰鐘舵��">-->
+<!-- <el-select v-model="queryForm.projectStatus" :disabled="isProjectCategory" clearable placeholder="璇烽�夋嫨" style="width: 140px">-->
+<!-- <el-option v-for="items in sys_project_status" :key="items.value" :label="items.label" :value="items.value" />-->
+<!-- </el-select>-->
+<!-- </el-form-item>-->
+<!-- </el-col>-->
+<!-- </el-row>-->
+<!-- <el-row>-->
+<!-- <el-col :span="12">-->
+<!-- <el-form-item label="椤圭洰鐮�">-->
+<!-- <el-select v-model="queryForm.projectColorCode" clearable placeholder="璇烽�夋嫨" style="width: 140px">-->
+<!-- <el-option v-for="items in sys_project_code" :key="items.value" :label="items.label" :value="items.value" />-->
+<!-- </el-select>-->
+<!-- </el-form-item>-->
+<!-- </el-col>-->
+<!-- <el-col :span="12">-->
+<!-- <el-form-item label="鍏宠仈鐘舵��">-->
+<!-- <el-select v-model="queryForm.assignmentStatus" clearable placeholder="璇烽�夋嫨" style="width: 140px">-->
+<!-- <el-option v-for="items in sys_association_status" :key="items.value" :label="items.label" :value="items.value" />-->
+<!-- </el-select>-->
+<!-- </el-form-item>-->
+<!-- </el-col>-->
+<!-- </el-row>-->
+<!-- <el-row>-->
+<!-- <el-col :span="12">-->
+<!-- <el-form-item label="璧勯噾绫诲瀷">-->
+<!-- <el-select v-model="queryForm.investmentType" clearable placeholder="璇烽�夋嫨" style="width: 140px">-->
+<!-- <el-option v-for="items in sys_funding_type" :key="items.value" :label="items.label" :value="items.value" />-->
+<!-- </el-select>-->
+<!-- </el-form-item>-->
+<!-- </el-col>-->
+<!-- <el-col :span="12">-->
+<!-- <el-form-item label="椤圭洰闃舵">-->
+<!-- <el-select v-model="queryForm.projectPhase" clearable placeholder="璇烽�夋嫨" style="width: 140px">-->
+<!-- <el-option v-for="items in sys_project_phases" :key="items.value" :label="items.label" :value="items.value" />-->
+<!-- </el-select>-->
+<!-- </el-form-item>-->
+<!-- </el-col>-->
+<!-- </el-row>-->
+<!-- <el-row>-->
+<!-- <el-col :span="12">-->
+<!-- <el-form-item label="鎶曡祫绫诲埆">-->
+<!-- <el-select v-model="queryForm.investType" clearable placeholder="璇烽�夋嫨" style="width: 140px">-->
+<!-- <el-option v-for="items in sys_investment_type" :key="items.value" :label="items.label" :value="items.value" />-->
+<!-- </el-select>-->
+<!-- </el-form-item>-->
+<!-- </el-col>-->
+<!-- <el-col :span="12">-->
+<!-- <el-form-item label="琛屾斂鍖哄垝">-->
+<!-- <el-select v-model="queryForm.area" clearable placeholder="璇烽�夋嫨" style="width: 140px">-->
+<!-- <el-option v-for="items in sys_administrative_divisions" :key="items.value" :label="items.label" :value="items.value" />-->
+<!-- </el-select>-->
+<!-- </el-form-item>-->
+<!-- </el-col>-->
+<!-- </el-row>-->
+<!-- <el-row style="text-align: center">-->
+<!-- <el-col :span="24">-->
+<!-- <el-form-item>-->
+<!--<!– <el-button type="primary" @click="handleQueryFrom">纭� 璁�</el-button>–>-->
+<!--<!– <el-button @click="closePopover">鍙� 娑�</el-button>–>-->
+<!-- </el-form-item>-->
+<!-- </el-col>-->
+<!-- </el-row>-->
+<!-- </el-form>-->
+ </el-popover>
+ </div>
+ <div class="right-section">
+ <div>
+ <el-button @click="handleExport" size="small" >
+ <svg-icon icon-class="exportIcon" style="margin-right: 8px"/>
+ 瀵煎嚭鏁版嵁
+ </el-button>
+ <el-button :disabled="isReserve" @click="handleImport" size="small" >
+ <svg-icon icon-class="importIcon" style="margin-right: 8px"/>
+ 瀵煎叆鏁版嵁
+ </el-button>
+ </div>
+ <div class="add-btn">
+ <el-tooltip content="鏂板" effect="dark" placement="top">
+ <el-button :disabled="isReserve" circle icon="el-icon-plus" @click="add()" size="small"/>
+ </el-tooltip>
+ </div>
+ <VisibilityToolbar
+ v-model:showSearch="showSearch"
+ :columns="columnList"
+ ></VisibilityToolbar>
+<!-- @update:columns="handleUpdateColumns"-->
+<!-- @update:sort="handleUpdateSort"-->
+<!-- @update:resetSort="handleResetSort"-->
+ </div>
+ </div>
+ </el-form>
+
+ <el-table v-loading="loading" :data="infoList" @selection-change="handleSelectionChange">
+ <el-table-column type="selection" width="55" align="center" />
+ <template v-for="item in columns">
+ <el-table-column
+ v-if="item.visible"
+ :prop="item.id"
+ :label="item.label"
+ v-bind="item"
+ :min-width="item.minWidth"
+ >
+ <template slot-scope="scope" v-if="item.slotName">
+ <slot :name="item.slotName" :scope="scope"></slot>
+ </template>
+ </el-table-column>
+ </template>
+ <el-table-column label="鎿嶄綔" align="center" class-name="small-padding fixed-width">
+ <template slot-scope="scope">
+ <el-button
+ size="mini"
+ type="text"
+ icon="el-icon-edit"
+ @click="handleUpdate(scope.row)"
+ v-hasPermi="['code:info:edit']"
+ >淇敼</el-button>
+ <el-button
+ size="mini"
+ type="text"
+ icon="el-icon-delete"
+ @click="handleDelete(scope.row)"
+ v-hasPermi="['code:info:remove']"
+ >鍒犻櫎</el-button>
+ </template>
+ </el-table-column>
+
+ <template #projectStatus="{ scope }">
+ <el-text class="mx-1">{{ getProjectStatus(scope.row) }}</el-text>
+ </template>
+ <template #projectColorCode="{ scope }">
+ <el-text class="mx-1 has-dot">{{ '缁�' }}<span class="dot" style="margin-left: 5px"></span></el-text>
+ </template>
+ <template #projectType="{ scope }">
+ <el-text class="mx-1">{{ getProjectType(scope.row) }}</el-text>
+ </template>
+ <template #investType="{ scope }">
+ <el-text class="mx-1">{{ getInvesType(scope.row) }}</el-text>
+ </template>
+ <template #planStartTime="{ scope }">
+ {{ scope.row.planStartTime ? scope.row.planStartTime.split('-')[0] + '骞�' : '' }}
+ </template>
+ </el-table>
+
+ <pagination
+ v-show="total>0"
+ :total="total"
+ :page.sync="queryParams.pageNum"
+ :limit.sync="queryParams.pageSize"
+ @pagination="getList"
+ />
+
+ </div>
+</template>
+
+<script>
+import { listInfo, getInfo, delInfo, addInfo, updateInfo } from "@/api/projectInfo";
+import { current } from './list';
+
+export default {
+ name: "projectInfo",
+ data() {
+ return {
+ //鎺у埗鏄鹃殣鐨勮〃鍗�
+ columnList: [],
+ //鏄惁闇�瑕佹柊澧炴寜閽�(鍌ㄨ搫椤圭洰闇�瑕�)
+ isReserve: false,
+ //琛ㄥご
+ columns: [],
+ //鎺у埗鏇村绛涢�夋樉闅�
+ popoverValue: false,
+ // 閬僵灞�
+ loading: true,
+ // 閫変腑鏁扮粍
+ ids: [],
+ // 闈炲崟涓鐢�
+ single: true,
+ // 闈炲涓鐢�
+ multiple: true,
+ // 鏄剧ず鎼滅储鏉′欢
+ showSearch: true,
+ // 鎬绘潯鏁�
+ total: 0,
+ // 椤圭洰绠$悊鍩虹淇℃伅琛ㄦ牸鏁版嵁
+ infoList: [],
+ // 寮瑰嚭灞傛爣棰�
+ title: "",
+ // 鏄惁鏄剧ず寮瑰嚭灞�
+ open: false,
+ timeRange:[],
+ // 鏌ヨ鍙傛暟
+ queryParams: {
+ pageNum: 1,
+ pageSize: 10,
+ projectName: null,
+ projectCode: null,
+ content: null,
+ projectType: null,
+ projectStatus: null,
+ fundType: null,
+ investType: null,
+ projectPhase: null,
+ tag: null,
+ competentDepartment: null,
+ areaCode: null,
+ managementCentralization: null,
+ projectApprovalType: null,
+ investmentCatalogue: null,
+ importanceType: null,
+ year: null,
+ yearInvestAmount: null,
+ createProjectTime: null,
+ planStartTime: null,
+ planCompleteTime: null,
+ winUnit: null,
+ winAmount: null,
+ winTime: null,
+ projectAddress: null,
+ longitude: null,
+ latitude: null,
+ projectOwnerUnit: null,
+ projectContactPerson: null,
+ contact: null,
+ gmtCreateTime: null,
+ gmtUpdateTime: null,
+ deleted: null
+ },
+ // 琛ㄥ崟鍙傛暟
+ form: {},
+ // 琛ㄥ崟鏍¢獙
+ rules: {
+ projectName: [
+ { required: true, message: "椤圭洰鍚嶇О涓嶈兘涓虹┖", trigger: "blur" }
+ ],
+ projectStatus: [
+ { required: true, message: "椤圭洰鐘舵�� (0鏈紑宸ワ紝1宸插紑宸ワ紝2宸茬宸ワ紝3鏆傚仠)涓嶈兘涓虹┖", trigger: "change" }
+ ],
+ }
+ };
+ },
+ created() {
+ this.columns = current.map((item, index) => {
+ item.index = index + 1;
+ item.key = index;
+ item.serialNumber = index + 1;
+ return item;
+ });
+ this.getList();
+ },
+ methods: {
+ /** 鏌ヨ椤圭洰绠$悊鍩虹淇℃伅鍒楄〃 */
+ getList() {
+ this.loading = true;
+ // listInfo(this.queryParams).then(response => {
+ // this.infoList = response.rows;
+ // this.total = response.total;
+ // });
+ this.loading = false;
+ },
+ // 鍙栨秷鎸夐挳
+ cancel() {
+ this.open = false;
+ this.reset();
+ },
+ // 琛ㄥ崟閲嶇疆
+ reset() {
+ this.form = {
+ id: null,
+ projectName: null,
+ projectCode: null,
+ content: null,
+ projectType: null,
+ projectStatus: null,
+ fundType: null,
+ investType: null,
+ projectPhase: null,
+ tag: null,
+ competentDepartment: null,
+ areaCode: null,
+ managementCentralization: null,
+ projectApprovalType: null,
+ investmentCatalogue: null,
+ importanceType: null,
+ year: null,
+ yearInvestAmount: null,
+ createProjectTime: null,
+ planStartTime: null,
+ planCompleteTime: null,
+ winUnit: null,
+ winAmount: null,
+ winTime: null,
+ projectAddress: null,
+ longitude: null,
+ latitude: null,
+ projectOwnerUnit: null,
+ projectContactPerson: null,
+ contact: null,
+ gmtCreateTime: null,
+ gmtUpdateTime: null,
+ updateBy: null,
+ createBy: null,
+ deleted: null
+ };
+ this.resetForm("form");
+ },
+ /** 鎼滅储鎸夐挳鎿嶄綔 */
+ handleQuery() {
+ this.queryParams.pageNum = 1;
+ this.getList();
+ },
+ /** 閲嶇疆鎸夐挳鎿嶄綔 */
+ resetQuery() {
+ this.resetForm("queryForm");
+ this.handleQuery();
+ },
+ // 澶氶�夋閫変腑鏁版嵁
+ handleSelectionChange(selection) {
+ this.ids = selection.map(item => item.id)
+ this.single = selection.length!==1
+ this.multiple = !selection.length
+ },
+ /** 鏂板鎸夐挳鎿嶄綔 */
+ handleAdd() {
+ this.reset();
+ this.open = true;
+ this.title = "娣诲姞椤圭洰绠$悊鍩虹淇℃伅";
+ },
+ /** 淇敼鎸夐挳鎿嶄綔 */
+ handleUpdate(row) {
+ this.reset();
+ const id = row.id || this.ids
+ getInfo(id).then(response => {
+ this.form = response.data;
+ this.open = true;
+ this.title = "淇敼椤圭洰绠$悊鍩虹淇℃伅";
+ });
+ },
+ /** 鎻愪氦鎸夐挳 */
+ submitForm() {
+ this.$refs["form"].validate(valid => {
+ if (valid) {
+ if (this.form.id != null) {
+ updateInfo(this.form).then(response => {
+ this.$modal.msgSuccess("淇敼鎴愬姛");
+ this.open = false;
+ this.getList();
+ });
+ } else {
+ addInfo(this.form).then(response => {
+ this.$modal.msgSuccess("鏂板鎴愬姛");
+ this.open = false;
+ this.getList();
+ });
+ }
+ }
+ });
+ },
+ /** 鍒犻櫎鎸夐挳鎿嶄綔 */
+ handleDelete(row) {
+ const ids = row.id || this.ids;
+ this.$modal.confirm('鏄惁纭鍒犻櫎椤圭洰绠$悊鍩虹淇℃伅缂栧彿涓�"' + ids + '"鐨勬暟鎹」锛�').then(function() {
+ return delInfo(ids);
+ }).then(() => {
+ this.getList();
+ this.$modal.msgSuccess("鍒犻櫎鎴愬姛");
+ }).catch(() => {});
+ },
+ /** 瀵煎嚭鎸夐挳鎿嶄綔 */
+ handleExport() {
+ this.download('code/info/export', {
+ ...this.queryParams
+ }, `info_${new Date().getTime()}.xlsx`)
+ }
+ }
+};
+</script>
+<style lang="scss" scoped>
+.slot {
+ display: flex;
+}
+
+.left-section {
+ flex-grow: 1;
+}
+
+.right-section {
+ display: flex;
+ margin-left: auto;
+ .add-btn {
+ margin: 0 10px;
+ }
+}
+
+</style>
diff --git a/src/views/projectEngineering/projectLibrary/list.js b/src/views/projectEngineering/projectLibrary/list.js
new file mode 100644
index 0000000..d187287
--- /dev/null
+++ b/src/views/projectEngineering/projectLibrary/list.js
@@ -0,0 +1,176 @@
+export const current = [
+ {id: 'projectName', label: '椤圭洰鍚嶇О', visible: true},
+ {id: 'projectOwnerUnit', label: '涓氫富鍗曚綅', visible: true},
+ {id: 'projectColorCode', label: '椤圭洰鐮�', slotName: 'projectColorCode', visible: true},
+ {id: 'projectCode', label: '椤圭洰浠g爜', visible: true},
+ {id: 'projectType', label: '椤圭洰绫诲瀷', slotName: 'projectType', visible: true},
+ {id: 'projectPhase', label: '椤圭洰闃舵', visible: true},
+ {id: 'totalInvestment', label: '鎬绘姇璧勯', visible: true},
+ {id: 'yearInvestAmount', label: '鏈勾璁″垝鎶曡祫', visible: true},
+ {id: 'planStartTime', label: '椤圭洰骞翠唤', slotName: 'planStartTime', visible: true},
+ {id: 'projectStatus', label: '椤圭洰鐘舵��', slotName: 'projectStatus', visible: true},
+ {id: 'investType', label: '鎶曡祫绫诲埆', slotName: 'investType', visible: true},
+ {id: 'content', label: '寤鸿鍐呭', visible: false},
+ {id: 'fundType', label: '璧勯噾绫诲瀷', visible: false},
+ {id: 'projectContactPerson', label: '椤圭洰鑱旂郴浜�', visible: false},
+ {id: 'contact', label: '鑱旂郴鏂瑰紡', visible: false},
+ {id: 'engineeringIdList', label: '鍏宠仈宸ョ▼', visible: false},
+ {id: 'competentDepartmentList', label: '涓荤閮ㄩ棬', visible: false},
+ {id: 'area', label: '琛屾斂鍖哄垝', visible: false},
+ {id: 'managementCentralizationList', label: '绠$悊褰掑彛', visible: false},
+ {id: 'projectApprovalType', label: '椤圭洰瀹℃壒绫诲瀷', visible: false},
+ {id: 'importanceType', label: '閲嶇偣鍒嗙被', visible: false},
+ {id: 'setTime', label: '绔嬮」鏃堕棿', visible: false},
+ {id: 'planCompleteTime', label: '璁″垝绔e伐鏃堕棿', visible: false},
+ {id: 'winUnit', label: '涓爣鍗曚綅', visible: false},
+ {id: 'winAmount', label: '涓爣閲戦', visible: false},
+ {id: 'winTime', label: '涓爣鏃堕棿', visible: false},
+ {id: 'year', label: '骞村害鎶曡祫璁″垝', visible: false},
+ {id: 'address', label: '椤圭洰鍦板潃', visible: false},
+ {id: 'projectBudget', label: '椤圭洰棰勭畻', visible: false},
+ {id: 'beCrossRegion', label: '寤鸿鍦扮偣鏄惁璺ㄥ煙', visible: false},
+ {id: 'constructionLocation', label: '椤圭洰寤鸿鍦扮偣', visible: false},
+ {id: 'detailedAddress', label: '寤鸿璇︾粏鍦板潃', visible: false},
+ {id: 'beCompensationProject', label: '鏄惁鏄ˉ鐮侀」鐩�', visible: false},
+ {id: 'compensationReason', label: '琛ョ爜鍘熷洜', visible: false},
+ {id: 'plannedStartDate', label: '璁″垝寮�宸ユ椂闂�', visible: false},
+ {id: 'expectedCompletionDate', label: '鎷熷缓鎴愭椂闂�', visible: false},
+ {id: 'nationalIndustryClassification', label: '鍥介檯琛屼笟鍒嗙被', visible: false},
+ {id: 'industryClassification', label: '鎵�灞炶涓氬垎绫�', visible: false},
+ {id: 'projectNature', label: '椤圭洰寤烘垚鎬ц川', visible: false},
+ {id: 'projectAttribute', label: '椤圭洰灞炴��', visible: false},
+ {id: 'useEarth', label: '鏄惁浣跨敤鍦熷湴', visible: false},
+ {id: 'contentScale', label: '涓昏寤鸿鍐呭鍙婅妯�', visible: false},
+ {id: 'code', label: '寤虹骞冲彴浠g爜', visible: false},
+ {id: 'projectUnit', label: '椤圭洰鍗曚綅', visible: false},
+ {id: 'projectUnitType', label: '椤圭洰鍗曚綅绫诲瀷', visible: false},
+ {id: 'registrationType', label: '鐧昏娉ㄥ唽绫诲瀷', visible: false},
+ {id: 'holdingSituation', label: '鎺ц偂鎯呭喌', visible: false},
+ {id: 'certificateType', label: '璇佺収绫诲瀷', visible: false},
+ {id: 'certificateNumber', label: '璇佷欢鍙风爜', visible: false},
+ {id: 'registeredAddress', label: '娉ㄥ唽鍦板潃', visible: false},
+ {id: 'registeredCapital', label: '娉ㄥ唽璧勯噾', visible: false},
+ {id: 'legal_representative', label: '娉曚汉浠h〃', visible: false},
+ {id: 'fixedPhone', label: '鍥哄畾鐢佃瘽', visible: false},
+ {id: 'legalPersonIdcard', label: '娉曚汉韬唤璇佸彿', visible: false},
+ {id: 'projectContactPerson', label: '椤圭洰鑱旂郴浜�', visible: false},
+ {id: 'phone', label: '绉诲姩鐢佃瘽', visible: false},
+ {id: 'contactIdcard', label: '鑱旂郴浜鸿韩浠借瘉鍙�', visible: false},
+ {id: 'wechat', label: '寰俊鍙�', visible: false},
+ {id: 'contactAddress', label: '鑱旂郴浜洪�氳鍦板潃', visible: false},
+ {id: 'postCode', label: '閭斂缂栫爜', visible: false},
+ {id: 'email', label: '鐢靛瓙閭', visible: false},
+ {id: 'totalInvestment', label: '椤圭洰鎬绘姇璧勯', visible: false},
+ {id: 'principal', label: '椤圭洰鏈噾', visible: false},
+ {id: 'governmentInvestmentTotal', label: '鏀垮簻鎶曡祫', visible: false},
+ {id: 'centralInvestmentTotal', label: '涓ぎ鎶曡祫', visible: false},
+ {id: 'centralBudgetInvestment', label: '涓ぎ棰勭畻鎶曡祫', visible: false},
+ {id: 'centralFiscalInvestment', label: '涓ぎ璐㈡斂', visible: false},
+ {id: 'centralSpecialBondInvestment', label: '涓ぎ涓撻」鍊哄埜绛归泦鐨勪笓椤瑰缓璁捐祫閲�', visible: false},
+ {id: 'centralSpecialFundInvestment', label: '涓ぎ涓撻」寤鸿鍩洪噾', visible: false},
+ {id: 'provincialInvestmentTotal', label: '鐪佺骇鎶曡祫', visible: false},
+ {id: 'provincialBudgetInvestment', label: '鐪侀绠楀唴鎶曡祫', visible: false},
+ {id: 'provincialFiscalInvestment', label: '鐪佽储鏀挎�у缓璁炬姇璧�', visible: false},
+ {id: 'provincialSpecialFundInvestment', label: '鐪佷笓椤瑰缓璁捐祫閲�', visible: false},
+ {id: 'cityInvestmentTotal', label: '甯�(宸�)鎶曡祫', visible: false},
+ {id: 'cityBudgetInvestment', label: '甯�(宸�)棰勭畻鍐呮姇璧�', visible: false},
+ {id: 'cityFiscalInvestment', label: '甯�(宸�)璐㈡斂鎬ф姇璧�', visible: false},
+ {id: 'citySpecialFundInvestment', label: '甯�(宸�)涓撻」璧勯噾', visible: false},
+ {id: 'countyInvestmentTotal', label: '鍘�(甯傘�佸尯)鎶曡祫', visible: false},
+ {id: 'countyBudgetInvestment', label: '鍖�(鍘�)棰勭畻鍐呮姇璧�', visible: false},
+ {id: 'countyFiscalInvestment', label: '鍖猴紙鍘匡級璐㈡斂鎬у缓璁捐祫閲�', visible: false},
+ {id: 'countySpecialFundInvestment', label: '鍖�(鍘�)涓撻」璧勯噾', visible: false},
+ {id: 'domesticLoanTotal', label: '鍥藉唴璐锋', visible: false},
+ {id: 'bankLoan', label: '閾惰璐锋', visible: false},
+ {id: 'foreignInvestmentTotal', label: '澶栧晢鎶曡祫', visible: false},
+ {id: 'enterpriseSelfRaisedTotal', label: '浼佷笟鑷', visible: false},
+ {id: 'otherInvestmentTotal', label: '鍏朵粬鎶曡祫', visible: false}
+];
+export const currentRest = [
+ { id: 'projectName', label: '椤圭洰鍚嶇О', visible: true },
+ { id: 'projectOwnerUnit', label: '涓氫富鍗曚綅', visible: true },
+ { id: 'projectColorCode', label: '椤圭洰鐮�', slotName: 'projectColorCode', visible: true },
+ { id: 'projectCode', label: '椤圭洰浠g爜', visible: true },
+ { id: 'projectType', label: '椤圭洰绫诲瀷', slotName: 'projectType', visible: true },
+ { id: 'projectPhase', label: '椤圭洰闃舵', visible: true },
+ { id: 'totalInvestment', label: '鎬绘姇璧勯', visible: true },
+ { id: 'yearInvestAmount', label: '鏈勾璁″垝鎶曡祫', visible: true },
+ { id: 'planStartTime', label: '椤圭洰骞翠唤', slotName: 'planStartTime', visible: true },
+ { id: 'projectStatus', label: '椤圭洰鐘舵��', slotName: 'projectStatus', visible: true },
+ { id: 'investType', label: '鎶曡祫绫诲埆', slotName: 'investType', visible: true },
+ { id: 'content', label: '寤鸿鍐呭', visible: false },
+ { id: 'fundType', label: '璧勯噾绫诲瀷', visible: false },
+ { id: 'projectContactPerson', label: '椤圭洰鑱旂郴浜�', visible: false },
+ { id: 'contact', label: '鑱旂郴鏂瑰紡', visible: false },
+ { id: 'engineeringIdList', label: '鍏宠仈宸ョ▼', visible: false },
+ { id: 'competentDepartmentList', label: '涓荤閮ㄩ棬', visible: false },
+ { id: 'area', label: '琛屾斂鍖哄垝', visible: false },
+ { id: 'managementCentralizationList', label: '绠$悊褰掑彛', visible: false },
+ { id: 'projectApprovalType', label: '椤圭洰瀹℃壒绫诲瀷', visible: false },
+ { id: 'importanceType', label: '閲嶇偣鍒嗙被', visible: false },
+ { id: 'setTime', label: '绔嬮」鏃堕棿', visible: false },
+ { id: 'planCompleteTime', label: '璁″垝绔e伐鏃堕棿', visible: false },
+ { id: 'winUnit', label: '涓爣鍗曚綅', visible: false },
+ { id: 'winAmount', label: '涓爣閲戦', visible: false },
+ { id: 'winTime', label: '涓爣鏃堕棿', visible: false },
+ { id: 'year', label: '骞村害鎶曡祫璁″垝', visible: false },
+ { id: 'address', label: '椤圭洰鍦板潃', visible: false },
+ { id: 'projectBudget', label: '椤圭洰棰勭畻', visible: false },
+ { id: 'beCrossRegion', label: '寤鸿鍦扮偣鏄惁璺ㄥ煙', visible: false },
+ { id: 'constructionLocation', label: '椤圭洰寤鸿鍦扮偣', visible: false },
+ { id: 'detailedAddress', label: '寤鸿璇︾粏鍦板潃', visible: false },
+ { id: 'beCompensationProject', label: '鏄惁鏄ˉ鐮侀」鐩�', visible: false },
+ { id: 'compensationReason', label: '琛ョ爜鍘熷洜', visible: false },
+ { id: 'plannedStartDate', label: '璁″垝寮�宸ユ椂闂�', visible: false },
+ { id: 'expectedCompletionDate', label: '鎷熷缓鎴愭椂闂�', visible: false },
+ { id: 'nationalIndustryClassification', label: '鍥介檯琛屼笟鍒嗙被', visible: false },
+ { id: 'industryClassification', label: '鎵�灞炶涓氬垎绫�', visible: false },
+ { id: 'projectNature', label: '椤圭洰寤烘垚鎬ц川', visible: false },
+ { id: 'projectAttribute', label: '椤圭洰灞炴��', visible: false },
+ { id: 'useEarth', label: '鏄惁浣跨敤鍦熷湴', visible: false },
+ { id: 'contentScale', label: '涓昏寤鸿鍐呭鍙婅妯�', visible: false },
+ { id: 'code', label: '寤虹骞冲彴浠g爜', visible: false },
+ { id: 'projectUnit', label: '椤圭洰鍗曚綅', visible: false },
+ { id: 'projectUnitType', label: '椤圭洰鍗曚綅绫诲瀷', visible: false },
+ { id: 'registrationType', label: '鐧昏娉ㄥ唽绫诲瀷', visible: false },
+ { id: 'holdingSituation', label: '鎺ц偂鎯呭喌', visible: false },
+ { id: 'certificateType', label: '璇佺収绫诲瀷', visible: false },
+ { id: 'certificateNumber', label: '璇佷欢鍙风爜', visible: false },
+ { id: 'registeredAddress', label: '娉ㄥ唽鍦板潃', visible: false },
+ { id: 'registeredCapital', label: '娉ㄥ唽璧勯噾', visible: false },
+ { id: 'legal_representative', label: '娉曚汉浠h〃', visible: false },
+ { id: 'fixedPhone', label: '鍥哄畾鐢佃瘽', visible: false },
+ { id: 'legalPersonIdcard', label: '娉曚汉韬唤璇佸彿', visible: false },
+ { id: 'projectContactPerson', label: '椤圭洰鑱旂郴浜�', visible: false },
+ { id: 'phone', label: '绉诲姩鐢佃瘽', visible: false },
+ { id: 'contactIdcard', label: '鑱旂郴浜鸿韩浠借瘉鍙�', visible: false },
+ { id: 'wechat', label: '寰俊鍙�', visible: false },
+ { id: 'contactAddress', label: '鑱旂郴浜洪�氳鍦板潃', visible: false },
+ { id: 'postCode', label: '閭斂缂栫爜', visible: false },
+ { id: 'email', label: '鐢靛瓙閭', visible: false },
+ { id: 'totalInvestment', label: '椤圭洰鎬绘姇璧勯', visible: false },
+ { id: 'principal', label: '椤圭洰鏈噾', visible: false },
+ { id: 'governmentInvestmentTotal', label: '鏀垮簻鎶曡祫', visible: false },
+ { id: 'centralInvestmentTotal', label: '涓ぎ鎶曡祫', visible: false },
+ { id: 'centralBudgetInvestment', label: '涓ぎ棰勭畻鎶曡祫', visible: false },
+ { id: 'centralFiscalInvestment', label: '涓ぎ璐㈡斂', visible: false },
+ { id: 'centralSpecialBondInvestment', label: '涓ぎ涓撻」鍊哄埜绛归泦鐨勪笓椤瑰缓璁捐祫閲�', visible: false },
+ { id: 'centralSpecialFundInvestment', label: '涓ぎ涓撻」寤鸿鍩洪噾', visible: false },
+ { id: 'provincialInvestmentTotal', label: '鐪佺骇鎶曡祫', visible: false },
+ { id: 'provincialBudgetInvestment', label: '鐪侀绠楀唴鎶曡祫', visible: false },
+ { id: 'provincialFiscalInvestment', label: '鐪佽储鏀挎�у缓璁炬姇璧�', visible: false },
+ { id: 'provincialSpecialFundInvestment', label: '鐪佷笓椤瑰缓璁捐祫閲�', visible: false },
+ { id: 'cityInvestmentTotal', label: '甯�(宸�)鎶曡祫', visible: false },
+ { id: 'cityBudgetInvestment', label: '甯�(宸�)棰勭畻鍐呮姇璧�', visible: false },
+ { id: 'cityFiscalInvestment', label: '甯�(宸�)璐㈡斂鎬ф姇璧�', visible: false },
+ { id: 'citySpecialFundInvestment', label: '甯�(宸�)涓撻」璧勯噾', visible: false },
+ { id: 'countyInvestmentTotal', label: '鍘�(甯傘�佸尯)鎶曡祫', visible: false },
+ { id: 'countyBudgetInvestment', label: '鍖�(鍘�)棰勭畻鍐呮姇璧�', visible: false },
+ { id: 'countyFiscalInvestment', label: '鍖猴紙鍘匡級璐㈡斂鎬у缓璁捐祫閲�', visible: false },
+ { id: 'countySpecialFundInvestment', label: '鍖�(鍘�)涓撻」璧勯噾', visible: false },
+ { id: 'domesticLoanTotal', label: '鍥藉唴璐锋', visible: false },
+ { id: 'bankLoan', label: '閾惰璐锋', visible: false },
+ { id: 'foreignInvestmentTotal', label: '澶栧晢鎶曡祫', visible: false },
+ { id: 'enterpriseSelfRaisedTotal', label: '浼佷笟鑷', visible: false },
+ { id: 'otherInvestmentTotal', label: '鍏朵粬鎶曡祫', visible: false }
+];
diff --git a/vue.config.js b/vue.config.js
index 05a393b..76eafd1 100644
--- a/vue.config.js
+++ b/vue.config.js
@@ -36,7 +36,7 @@
proxy: {
// detail: https://cli.vuejs.org/config/#devserver-proxy
[process.env.VUE_APP_BASE_API]: {
- target: `http://localhost:8080`,
+ target: `http://localhost:10076`,
changeOrigin: true,
pathRewrite: {
['^' + process.env.VUE_APP_BASE_API]: ''
--
Gitblit v1.8.0