清单bug更改

xuhongjie
严飞永 3 months ago
parent 049812229f
commit 75e0dca397

@ -8,13 +8,14 @@ export function getBasicInformationPage(params) {
params params
}) })
} }
// 企业--基本信息==展示 // 通过主键查询单条所有数据
export function getBasicInformationById(id) { export function getBasicInformationById(id) {
return request({ return request({
url: `/gysl/basicInformation/${id}`, url: `/gysl/basicInformation/stagingInfo/${id}`,
method: 'get' method: 'get'
}); });
} }
// 企业端提交填报 // 企业端提交填报
export function fillBasicInformation(data) { export function fillBasicInformation(data) {
return request({ return request({
@ -23,6 +24,14 @@ export function fillBasicInformation(data) {
data: data data: data
}) })
} }
//企业端暂存数据
export function tempBasicInformation(data) {
return request({
url: '/gysl/basicInformation/staging',
method: 'post',
data: data
})
}
// 政务端审核通过 // 政务端审核通过
export function auditBasicInformation(data) { export function auditBasicInformation(data) {
return request({ return request({
@ -483,7 +492,7 @@ export function deletexmqt(idList) {
return request({ return request({
url:'/gysl/projectOtherInfo/delete', url:'/gysl/projectOtherInfo/delete',
method:'delete', method:'delete',
params:{idList} params: { idList: idList.join(',') }
}) })
} }
//修改数据 //修改数据
@ -728,7 +737,7 @@ export function getMessageCount() {
} }
//智能提醒 //智能提醒
// 已读智能提醒 //已读提醒
export function markSmartReminderAsRead(id) { export function markSmartReminderAsRead(id) {
return request({ return request({
url: `/gysl/jSmartReminders/isRead/${id}`, url: `/gysl/jSmartReminders/isRead/${id}`,

@ -1,12 +1,13 @@
import request from '@/utils/request' import request from '@/utils/request'
// 登录方法 // 登录方法
export function login(username, password, code, uuid) { export function login(username, password, code, uuid,loginRole) {
const data = { const data = {
username, username,
password, password,
code, code,
uuid uuid,
loginRole
} }
return request({ return request({
url: '/login', url: '/login',

@ -11,10 +11,10 @@
<el-dropdown class="avatar-container right-menu-item hover-effect" trigger="click"> <el-dropdown class="avatar-container right-menu-item hover-effect" trigger="click">
<div class="avatar-wrapper"> <div class="avatar-wrapper">
<div v-if="checkRole(['common'])"> <div v-if="checkRole(['common'])">
<span>{{ username }}</span> <span>{{ name }}</span>
</div> </div>
<div v-if="showCompanySection"> <div v-if="showCompanySection">
<span>{{ username }}</span> <span>{{ name }}</span>
</div> </div>
<i class="el-icon-caret-bottom" /> <i class="el-icon-caret-bottom" />
</div> </div>
@ -32,107 +32,64 @@
import { mapGetters } from 'vuex' import { mapGetters } from 'vuex'
import Breadcrumb from '@/components/Breadcrumb' import Breadcrumb from '@/components/Breadcrumb'
import TopNav from '@/components/TopNav' import TopNav from '@/components/TopNav'
import Hamburger from '@/components/Hamburger'
import Screenfull from '@/components/Screenfull'
import SizeSelect from '@/components/SizeSelect'
import Search from '@/components/HeaderSearch'
import RuoYiGit from '@/components/RuoYi/Git'
import RuoYiDoc from '@/components/RuoYi/Doc'
import bearicon from '@/components/bearicon' import bearicon from '@/components/bearicon'
import { checkPermi, checkRole } from "@/utils/permission"; import { checkPermi, checkRole } from "@/utils/permission"
import { getMessageCount } from '@/api/ManageApi/index' import { name } from 'mars2d'
export default { export default {
components: { components: {
Breadcrumb, Breadcrumb,
TopNav, TopNav,
Hamburger, bearicon
Screenfull, },
SizeSelect, data() {
Search, return {
RuoYiGit, username: "",
RuoYiDoc, messages: [],
bearicon counts: 0 //
}
},
computed: {
...mapGetters(["avatar", "name", "sidebarRouters", "nickName"]),
//
showCompanySection() {
const isCompany = this.checkRole(['company'])
const isCommon = this.checkRole(['common'])
return isCompany && !isCommon
}, },
data() { topNav: {
return { get() {
messages: [], return this.$store.state.settings.topNav
} }
}, },
computed: { unreadMessages() {
...mapGetters([ return this.messages.length
'sidebar', }
'avatar', },
'device', mounted() {
'name' // Make sure this getter exists in your Vuex store this.username = this.$store.state.user.nickName
]), },
username() { methods: {
// Return the username from Vuex store or localStorage checkPermi,
return this.name || localStorage.getItem('username') || '账号名称'; checkRole,
}, toggleSideBar() {
showCompanySection() { this.$store.dispatch('app/toggleSideBar')
const isCompany = this.checkRole(['company']);
const isCommon = this.checkRole(['common']);
//
return isCompany && !isCommon;
},
setting: {
get() {
return this.$store.state.settings.showSettings
},
set(val) {
this.$store.dispatch('settings/changeSetting', {
key: 'showSettings',
value: val
})
}
},
topNav: {
get() {
return this.$store.state.settings.topNav
}
},
unreadMessages() {
return this.messages.length
}
}, },
mounted() { logout() {
this.getCounts(); this.$confirm('确定注销并退出系统吗?', '提示', {
confirmButtonText: '确定',
cancelButtonText: '取消',
type: 'warning'
}).then(() => {
this.$store.dispatch('LogOut').then(() => {
this.$router.replace('/login')
})
}).catch(() => {})
}, },
methods: { handleCommand(command) {
checkPermi, this.$message('点击了: ' + command)
checkRole,
//
async getCounts() {
try {
const response = await getMessageCount();
if (response && response.code === 200) {
this.counts = response.data; // counts
} else {
console.error('获取数据失败:', response);
}
} catch (error) {
console.error('获取数据失败:', error);
}
},
toggleSideBar() {
this.$store.dispatch('app/toggleSideBar')
},
async logout() {
this.$confirm('确定注销并退出系统吗?', '提示', {
confirmButtonText: '确定',
cancelButtonText: '取消',
type: 'warning'
}).then(() => {
this.$store.dispatch('LogOut').then(() => {
this.$router.replace('/login')
})
}).catch(() => { });
},
handleCommand(command) {
this.$message('点击了: ' + command)
}
} }
}
} }
</script> </script>

@ -8,6 +8,7 @@ const getters = {
token: state => state.user.token, token: state => state.user.token,
avatar: state => state.user.avatar, avatar: state => state.user.avatar,
name: state => state.user.name, name: state => state.user.name,
nickName: state => state.user.nickName,
introduction: state => state.user.introduction, introduction: state => state.user.introduction,
roles: state => state.user.roles, roles: state => state.user.roles,
permissions: state => state.user.permissions, permissions: state => state.user.permissions,

@ -41,8 +41,9 @@ const user = {
const password = userInfo.password const password = userInfo.password
const code = userInfo.code const code = userInfo.code
const uuid = userInfo.uuid const uuid = userInfo.uuid
const loginRole = userInfo.loginRole
return new Promise((resolve, reject) => { return new Promise((resolve, reject) => {
login(username, password, code, uuid).then(res => { login(username, password, code, uuid,loginRole).then(res => {
setToken(res.token) setToken(res.token)
commit('SET_TOKEN', res.token) commit('SET_TOKEN', res.token)
resolve() resolve()
@ -68,7 +69,9 @@ const user = {
commit('SET_ROLES', ['ROLE_DEFAULT']) commit('SET_ROLES', ['ROLE_DEFAULT'])
} }
commit('SET_ID', user.userId) commit('SET_ID', user.userId)
commit('SET_NAME', user.userName)
commit('SET_NAME', user.nickName)
commit('SET_AVATAR', avatar) commit('SET_AVATAR', avatar)
resolve(res) resolve(res)
}).catch(error => { }).catch(error => {

@ -13,19 +13,19 @@
style="width: 0.6rem; height: 0.6rem; margin-right: 4px;"> style="width: 0.6rem; height: 0.6rem; margin-right: 4px;">
编辑 编辑
</el-button> </el-button>
<!-- <el-button type="primary" size="medium" plain <el-button type="primary" size="medium" plain v-if="action === 'fill' || !action"
style="border: none;background-color: rgba(43,98,241,0.1);color: #2B62F1;" @click="handleExport"> style="border: none;background-color: rgba(43,98,241,0.1);color: #2B62F1;" @click="handleExport">
<img src="../../../assets/images/detailsicon/icon-dc@2x.png" alt="编辑" <img src="../../../assets/images/detailsicon/icon-dc@2x.png" alt="编辑"
style="width: 0.6rem; height: 0.6rem; margin-right: 4px;"> style="width: 0.6rem; height: 0.6rem; margin-right: 4px;">
导出 导出
</el-button> --> </el-button>
</div> </div>
</div> </div>
<!-- 内容展示区 --> <!-- 内容展示区 -->
<div class="content"> <div class="content">
<div class="picturediv"> <div class="picturediv">
<!-- 图片展示 --> <!-- 图片展示 -->
<img v-if="basicInfo.fj" :src="basicInfo.fj" alt="项目代表性照片"> <img v-if="basicInfo.fj" :src="baseUrl + basicInfo.fj" alt="项目代表性照片">
</div> </div>
<div class="descriptionsdiv"> <div class="descriptionsdiv">
<el-descriptions class="margin-top" :column="3" border> <el-descriptions class="margin-top" :column="3" border>
@ -232,6 +232,7 @@ export default {
}, },
data() { data() {
return { return {
baseUrl: process.env.VUE_APP_BASE_API,
descriptions: [], descriptions: [],
dialogImageUrl: '', dialogImageUrl: '',
dialogVisibletwo: false, dialogVisibletwo: false,

@ -13,8 +13,8 @@
style="width: 0.6rem; height: 0.6rem; margin-right: 4px;"> style="width: 0.6rem; height: 0.6rem; margin-right: 4px;">
新增 新增
</el-button> </el-button>
<el-button <el-button type="primary" size="medium" plain
type="primary" size="medium" plain v-if="buildings.length !== 0 && (action === 'fill' || !action)" v-if="buildings.length !== 0 && (action === 'fill' || !action)"
style="border: none;background-color: rgba(43,98,241,0.1);color: #2B62F1;" style="border: none;background-color: rgba(43,98,241,0.1);color: #2B62F1;"
@click="handleEdit(selectedBuilding)"> @click="handleEdit(selectedBuilding)">
<img src="../../../assets/images/detailsicon/icon-bj@2x.png" alt="编辑" <img src="../../../assets/images/detailsicon/icon-bj@2x.png" alt="编辑"
@ -22,16 +22,12 @@
编辑 编辑
</el-button> </el-button>
<el-button type="primary" size="medium" plain v-if="action === 'fill' || !action" <el-button type="primary" size="medium" plain v-if="action === 'fill' || !action"
style="border: none;background-color: rgba(43,98,241,0.1);color: #2B62F1;" style="border: none;background-color: rgba(43,98,241,0.1);color: #2B62F1;" @click="handleImport">
@click="handleImport"
>
<i class="el-icon-download" style="width: 0.6rem; height: 0.6rem; margin-right: 4px;"></i> <i class="el-icon-download" style="width: 0.6rem; height: 0.6rem; margin-right: 4px;"></i>
导入 导入
</el-button> </el-button>
<el-button type="primary" size="medium" plain v-if="action === 'fill' || !action" <el-button type="primary" size="medium" plain v-if="action === 'fill' || !action"
style="border: none;background-color: rgba(43,98,241,0.1);color: #2B62F1;" style="border: none;background-color: rgba(43,98,241,0.1);color: #2B62F1;" @click="handleExport">
@click="handleExport"
>
<img src="../../../assets/images/detailsicon/icon-dc@2x.png" alt="导出" <img src="../../../assets/images/detailsicon/icon-dc@2x.png" alt="导出"
style="width: 0.6rem; height: 0.6rem; margin-right: 4px;"> style="width: 0.6rem; height: 0.6rem; margin-right: 4px;">
导出 导出
@ -112,16 +108,16 @@
</div> </div>
</div> </div>
<!-- 新增楼栋弹窗 --> <!-- 新增楼栋弹窗 -->
<el-dialog title="新增楼栋" :visible.sync="dialogVisible" width="65%"> <el-dialog title="新增楼栋" :visible.sync="dialogVisible" width="68%">
<el-form :model="buildingForm" label-width="230px"> <el-form :model="buildingForm" :rules="rules" ref="buildingFormRef" label-width="260px">
<el-row :gutter="20"> <el-row :gutter="20">
<el-col :span="12"> <el-col :span="12">
<el-form-item label="楼栋名称:"> <el-form-item label="楼栋名称:" prop="name">
<el-input v-model="buildingForm.name"></el-input> <el-input v-model="buildingForm.name"></el-input>
</el-form-item> </el-form-item>
</el-col> </el-col>
<el-col :span="12"> <el-col :span="12">
<el-form-item label="是否为重要楼栋:"> <el-form-item label="是否为重要楼栋:" prop="sfwzyld">
<el-select v-model="buildingForm.sfwzyld" placeholder="请选择" style="width: 22.5rem;"> <el-select v-model="buildingForm.sfwzyld" placeholder="请选择" style="width: 22.5rem;">
<el-option v-for="dict in dict.type.isno" :key="dict.value" :label="dict.label" <el-option v-for="dict in dict.type.isno" :key="dict.value" :label="dict.label"
:value="parseInt(dict.value)"></el-option> :value="parseInt(dict.value)"></el-option>
@ -131,60 +127,60 @@
</el-row> </el-row>
<el-row :gutter="20"> <el-row :gutter="20">
<el-col :span="12"> <el-col :span="12">
<el-form-item label="首层高度(米):"> <el-form-item label="首层高度(米):" prop="scgd">
<el-input v-model="buildingForm.scgd"></el-input> <el-input v-model="buildingForm.scgd"></el-input>
</el-form-item> </el-form-item>
</el-col> </el-col>
<el-col :span="12"> <el-col :span="12">
<el-form-item label="层数:"> <el-form-item label="层数:" prop="floor">
<el-input v-model="buildingForm.floor"></el-input> <el-input v-model="buildingForm.floor"></el-input>
</el-form-item> </el-form-item>
</el-col> </el-col>
</el-row> </el-row>
<el-row :gutter="20"> <el-row :gutter="20">
<el-col :span="12"> <el-col :span="12">
<el-form-item label="4层以上层高"> <el-form-item label="4层以上层高" prop="fourYscg">
<el-input v-model="buildingForm.fourYscg"></el-input> <el-input v-model="buildingForm.fourYscg"></el-input>
</el-form-item> </el-form-item>
</el-col> </el-col>
<el-col :span="12"> <el-col :span="12">
<el-form-item label="柱距:"> <el-form-item label="柱距:" prop="zj">
<el-input v-model="buildingForm.zj"></el-input> <el-input v-model="buildingForm.zj"></el-input>
</el-form-item> </el-form-item>
</el-col> </el-col>
</el-row> </el-row>
<el-row :gutter="20"> <el-row :gutter="20">
<el-col :span="12"> <el-col :span="12">
<el-form-item label="2至4层层高"> <el-form-item label="2至4层层高" porp="twoAndFourCg">
<el-input v-model="buildingForm.twoAndFourCg"></el-input> <el-input v-model="buildingForm.twoAndFourCg"></el-input>
</el-form-item> </el-form-item>
</el-col> </el-col>
<el-col :span="12"> <el-col :span="12">
<el-form-item label="总建筑高度(米):"> <el-form-item label="总建筑高度(米):" prop="totalBuildingHeight">
<el-input v-model="buildingForm.totalBuildingHeight"></el-input> <el-input v-model="buildingForm.totalBuildingHeight"></el-input>
</el-form-item> </el-form-item>
</el-col> </el-col>
</el-row> </el-row>
<el-row :gutter="20"> <el-row :gutter="20">
<el-col :span="12"> <el-col :span="12">
<el-form-item label="首层地面荷载(吨/平方米):"> <el-form-item label="首层地面荷载(吨/平方米):" prop="scdmhz">
<el-input v-model="buildingForm.scdmhz"></el-input> <el-input v-model="buildingForm.scdmhz"></el-input>
</el-form-item> </el-form-item>
</el-col> </el-col>
<el-col :span="12"> <el-col :span="12">
<el-form-item label="二至三层楼面荷载(吨/平方米):"> <el-form-item label="二至三层楼面荷载(吨/平方米):" prop="twoAndThreeLmhz">
<el-input v-model="buildingForm.twoAndThreeLmhz"></el-input> <el-input v-model="buildingForm.twoAndThreeLmhz"></el-input>
</el-form-item> </el-form-item>
</el-col> </el-col>
</el-row> </el-row>
<el-row :gutter="20"> <el-row :gutter="20">
<el-col :span="12"> <el-col :span="12">
<el-form-item label="标准层面积(千平方米):"> <el-form-item label="标准层面积(千平方米):" prop="bzcmj">
<el-input v-model="buildingForm.bzcmj"></el-input> <el-input v-model="buildingForm.bzcmj"></el-input>
</el-form-item> </el-form-item>
</el-col> </el-col>
<el-col :span="12"> <el-col :span="12">
<el-form-item label="是否有汽车盘道:"> <el-form-item label="是否有汽车盘道:" prop="sfyqcpd">
<el-select v-model="buildingForm.sfyqcpd" placeholder="请选择" style="width: 22.5rem;"> <el-select v-model="buildingForm.sfyqcpd" placeholder="请选择" style="width: 22.5rem;">
<el-option v-for="dict in dict.type.isno" :key="dict.value" :label="dict.label" <el-option v-for="dict in dict.type.isno" :key="dict.value" :label="dict.label"
:value="parseInt(dict.value)"></el-option> :value="parseInt(dict.value)"></el-option>
@ -194,7 +190,7 @@
</el-row> </el-row>
<el-row :gutter="20"> <el-row :gutter="20">
<el-col :span="12"> <el-col :span="12">
<el-form-item label="是否有吊装口:"> <el-form-item label="是否有吊装口:" prop="sfydzk">
<el-select v-model="buildingForm.sfydzk" placeholder="请选择" style="width: 22.5rem;"> <el-select v-model="buildingForm.sfydzk" placeholder="请选择" style="width: 22.5rem;">
<el-option v-for="dict in dict.type.isno" :key="dict.value" :label="dict.label" <el-option v-for="dict in dict.type.isno" :key="dict.value" :label="dict.label"
:value="parseInt(dict.value)"></el-option> :value="parseInt(dict.value)"></el-option>
@ -202,7 +198,7 @@
</el-form-item> </el-form-item>
</el-col> </el-col>
<el-col :span="12"> <el-col :span="12">
<el-form-item label="四层及以上楼面荷载(吨/平方米):"> <el-form-item label="四层及以上楼面荷载(吨/平方米):" prop="fourYslmhz">
<el-input v-model="buildingForm.fourYslmhz"></el-input> <el-input v-model="buildingForm.fourYslmhz"></el-input>
</el-form-item> </el-form-item>
</el-col> </el-col>
@ -213,11 +209,31 @@
<el-button type="primary" @click="handleAddBuilding"> </el-button> <el-button type="primary" @click="handleAddBuilding"> </el-button>
</span> </span>
</el-dialog> </el-dialog>
<el-dialog :title="upload.title" :visible.sync="upload.open" width="400px" append-to-body>
<el-upload ref="upload" :limit="1" accept=".xlsx, .xls" :headers="upload.headers"
:action="upload.url + '?updateSupport=' + upload.updateSupport" :disabled="upload.isUploading"
:on-progress="handleFileUploadProgress" :on-success="handleFileSuccess" :auto-upload="false" drag>
<i class="el-icon-upload"></i>
<div class="el-upload__text">将文件拖到此处<em>点击上传</em></div>
<div class="el-upload__tip text-center" slot="tip">
<span>仅允许导入xlsxlsx格式文件</span>
<el-link type="primary" :underline="false" style="font-size: 12px; vertical-align: baseline"
@click="importTemplate">下载模板</el-link>
</div>
</el-upload>
<div slot="footer" class="dialog-footer">
<el-button type="primary" @click="submitFileForm"> </el-button>
<el-button @click="upload.open = false"> </el-button>
</div>
</el-dialog>
</div> </div>
</template> </template>
<script> <script>
import { getjzxxinformationByxmId, getjzxxById, addjzxx, updatejzxx, deletejzxx } from '@/api/ManageApi/index'; import { getToken } from "@/utils/auth";
import { getjzxxinformationByxmId, addjzxx, updatejzxx, deletejzxx } from '@/api/ManageApi/index';
export default { export default {
dicts: ['isno'], dicts: ['isno'],
@ -264,13 +280,103 @@ export default {
xmId: 0, xmId: 0,
zj: 0 zj: 0
}, },
rules:[] //
upload: {
//
open: false,
//
title: "web资产导入",
//
isUploading: false,
//
updateSupport: 0,
//
headers: { Authorization: "Bearer " + getToken() },
//
url: location.origin + "/gysl/buildingInformation/importProjectBuilding",
},
rules: {
name: [
{ required: true, message: '请输入楼栋名称', trigger: 'blur' },
],
sfwzyld: [
{ required: true, message: '请选择是否为重要楼栋', trigger: 'change' }
],
floor: [
{ required: true, message: '请输入层数', trigger: 'blur' },
{ type: 'number', message: '层数必须是数字', trigger: 'blur' },
],
totalBuildingHeight: [
{ required: true, message: '请输入总建筑高度(米)', trigger: 'blur' },
{ type: 'number', message: '总建筑高度(米)必须是数字', trigger: 'blur' },
],
scgd: [
{ required: true, message: '请输入首层高度(米)', trigger: 'blur' },
{ type: 'number', message: '首层高度(米)必须是数字', trigger: 'blur' },
],
twoAndFourCg: [
{ required: true, message: '请输入2至4层层高', trigger: 'blur' },
{ type: 'number', message: '2至4层层高必须是数字', trigger: 'blur' },
],
scdmhz: [
{ required: true, message: '请输入首层地面荷载(吨/平方米)', trigger: 'blur' },
{ type: 'number', message: '首层地面荷载(吨/平方米)必须是数字', trigger: 'blur' },
],
bzcmj: [
{ required: true, message: '请输入标准层面积(千平方米)', trigger: 'blur' },
{ type: 'number', message: '标准层面积(千平方米)必须是数字', trigger: 'blur' },
]
}
}; };
}, },
created() { created() {
this.fetchBuildings(); this.fetchBuildings();
}, },
methods: { methods: {
/** 导出 */
handleExport() {
this.download(
"/tc/assetCurrent/export",
{
...this.formInline,
},
`建筑信息${new Date().getTime()}.xlsx`
);
},
//
handleImport() {
this.upload.open = true;
},
/** 下载模板操作 */
importTemplate() {
this.download(
"/tc/assetCurrent/importTemplate",
{},
`web资产导入模板${new Date().getTime()}.xlsx`
);
},
//
handleFileUploadProgress(event, file, fileList) {
this.upload.isUploading = true;
},
//
handleFileSuccess(response, file, fileList) {
this.upload.open = false;
this.upload.isUploading = false;
this.$refs.upload.clearFiles();
this.$alert(
"<div style='overflow: auto;overflow-x: hidden;max-height: 70vh;padding: 10px 20px 0;'>" +
response.msg +
"</div>",
"导入结果",
{ dangerouslyUseHTMLString: true }
);
this.getList();
},
//
submitFileForm() {
this.$refs.upload.submit();
},
//12 //12
getTextForBoolean(value) { getTextForBoolean(value) {
return value === 1 ? '是' : '否'; return value === 1 ? '是' : '否';

@ -126,10 +126,6 @@ export default {
} else { } else {
this.$message.error(response.msg || '查询失败'); this.$message.error(response.msg || '查询失败');
} }
})
.catch(error => {
console.error("查询失败:", error);
this.$message.error('查询失败');
}); });
}, },
// fetchMemos // fetchMemos
@ -336,8 +332,9 @@ export default {
display: flex; display: flex;
height: 8rem; height: 8rem;
margin-top: -1rem; margin-top: -1rem;
gap: 1rem; gap: 2rem;
flex-wrap: wrap; flex-wrap: wrap;
overflow: auto;
} }
.descriptionditem { .descriptionditem {

@ -26,12 +26,6 @@
style="width: 0.6rem; height: 0.6rem; margin-right: 4px;"> style="width: 0.6rem; height: 0.6rem; margin-right: 4px;">
导出 导出
</el-button> </el-button>
<el-button type="primary" size="medium" plain v-if="checkRole(['admin', 'common'])"
style="border: none;background-color: rgba(242,83,83,0.1);color: #F25353;" @click="deleteData">
<img src="../../../assets/images/detailsicon/icon-delet@2x.png" alt="删除"
style="width: 0.6rem; height: 0.6rem; margin-right: 4px;">
删除
</el-button>
</div> </div>
</div> </div>
@ -41,11 +35,14 @@
<el-descriptions class="margin-top" :column="4" border> <el-descriptions class="margin-top" :column="4" border>
<el-descriptions-item v-for="(item, index) in anotherInfo" :key="index" :label="item.zdname"> <el-descriptions-item v-for="(item, index) in anotherInfo" :key="index" :label="item.zdname">
<template v-if="isEditMode"> <template v-if="isEditMode">
<el-input v-model="item.zdinfor" size="small" @change="handleFieldChange(item)"></el-input> <el-input v-model="item.zdinfor" size="small" @change="handleFieldChange(item)"
style="width:8rem;"></el-input>
</template> </template>
<template v-else> <template v-else>
{{ item.zdinfor }} {{ item.zdinfor }}
</template> </template>
<el-button v-if="isEditMode" type="text" size="small" @click="handleDeleteField(item)"
style="margin-left: 1rem;color: #F25353;">删除</el-button>
</el-descriptions-item> </el-descriptions-item>
</el-descriptions> </el-descriptions>
</div> </div>
@ -71,6 +68,7 @@
<script> <script>
import { checkPermi, checkRole } from "@/utils/permission"; import { checkPermi, checkRole } from "@/utils/permission";
import { addxmqt, deletexmqt } from "@/api/ManageApi";
export default { export default {
props: { props: {
@ -83,7 +81,7 @@ export default {
type: String, type: String,
required: true required: true
}, },
xmId:{ xmId: {
type: Number, type: Number,
default: 0 default: 0
} }
@ -168,24 +166,69 @@ export default {
"/gysl/projectOtherInfo/export", "/gysl/projectOtherInfo/export",
{ {
xmId: this.xmId, xmId: this.xmId,
...this.anotherInfo,
}, },
`其他信息${new Date().getTime()}.xlsx` `其他信息${new Date().getTime()}.xlsx`
); );
}, },
//
async handleDeleteField(item) {
this.$confirm(`确定要删除字段 "${item.zdname}" 吗?`, '提示', {
confirmButtonText: '确定',
cancelButtonText: '取消',
type: 'warning'
}).then(async () => {
try {
// API
await deletexmqt([item.id]);
// editedData
if (this.isEditMode) {
this.editedData = this.editedData.filter(i => i.id !== item.id);
}
//
this.$emit('delete-info', item.id);
this.$message.success('删除成功');
location.reload(); //
} catch (error) {
this.$message.error('删除失败: ' + (error.message || '请检查网络连接'));
}
}).catch(() => {
this.$message.info('已取消删除');
});
},
// //
submitForm() { async submitForm() {
const newItem = { if (!this.form.zdname || !this.form.zdinfor) {
zdname: this.form.zdname, this.$message.warning('请填写完整的字段名称和内容');
zdinfor: this.form.zdinfor, return;
createTime: new Date().toISOString(), }
//
}; try {
// xmId
console.log('当前项目ID:', this.xmId);
// //
this.$emit('add-info', newItem); const requestData = {
xmId: this.xmId, // 使ID
zdname: this.form.zdname,
zdinfor: this.form.zdinfor,
// 使
createBy: "",
createId: 0,
createTime: "",
updateBy: "",
updateId: 0,
updateTime: ""
};
this.dialogVisible = false; // API
const response = await addxmqt(requestData);
console.log('新增成功:', response);
this.dialogVisible = false;
this.$message.success('新增成功');
location.reload(); //
} catch (error) { }
}, },
// //
@ -267,6 +310,8 @@ export default {
width: 100%; width: 100%;
margin-left: 1rem; margin-left: 1rem;
height: auto; height: auto;
display: flex;
justify-content: space-between;
} }
.two-row-item { .two-row-item {

@ -93,12 +93,18 @@
</el-descriptions-item> </el-descriptions-item>
<el-descriptions-item label="规划文件"> <el-descriptions-item label="规划文件">
<div v-if="isEditing"> <div v-if="isEditing">
<span v-if="form.ghwj">{{ form.ghwj }}</span> <span v-if="form.ghwj">{{ form.ghwj.split('/').pop() }}</span>
<el-tooltip class="item" effect="dark" content="支持pdf或word文件大小不得超过50MB" placement="top-start"> <el-tooltip class="item" effect="dark" content="支持pdf或word文件大小不得超过50MB" placement="top-start">
<el-button type="text" icon="el-icon-upload" @click="showFileDialog"></el-button> <el-button type="text" icon="el-icon-upload" @click="showFileDialog">
<span v-if="form.ghwj"></span>
<span v-else></span>
</el-button>
</el-tooltip> </el-tooltip>
</div> </div>
<span v-else>{{ form.ghwj }}</span> <span v-else>
<a v-if="form.ghwj" :href="form.ghwj" target="_blank">{{ form.ghwj.split('/').pop() }}</a>
<span v-else></span>
</span>
</el-descriptions-item> </el-descriptions-item>
</el-descriptions> </el-descriptions>
</div> </div>
@ -135,6 +141,7 @@ export default {
}, },
data() { data() {
return { return {
baseUrl: process.env.VUE_APP_BASE_API,
isEditing: false, isEditing: false,
dialogVisible: false, dialogVisible: false,
form: { form: {
@ -164,22 +171,7 @@ export default {
updateTime: null, updateTime: null,
}, },
rules: { rules: {
// zydmj: [{ required: true, message: '', trigger: 'blur' }],
// rjl: [{ required: true, message: '', trigger: 'blur' }],
// zjzmj: [{ required: true, message: '', trigger: 'blur' }],
// bzcjzmj: [{ required: true, message: '', trigger: 'blur' }],
// jrjljzmj: [{ required: true, message: '', trigger: 'blur' }],
// jzmd: [{ required: true, message: '', trigger: 'blur' }],
// ldl: [{ required: true, message: '绿', trigger: 'blur' }],
// jzds: [{ required: true, message: '', trigger: 'blur' }],
// dsjzmj: [{ required: true, message: '', trigger: 'blur' }],
// dxjzmj: [{ required: true, message: '', trigger: 'blur' }],
// zgjzcs: [{ required: true, message: '', trigger: 'blur' }],
// zgjzgd: [{ required: true, message: '', trigger: 'blur' }],
// jdctcw: [{ required: true, message: '', trigger: 'blur' }],
// fjdctcw: [{ required: true, message: '', trigger: 'blur' }],
// fhdj: [{ required: true, message: '', trigger: 'blur' }],
// ghwj: [{ required: true, message: '', trigger: 'blur' }]
} }
}; };
}, },
@ -244,7 +236,7 @@ export default {
}, },
// //
handleFileUploaded(fileName) { handleFileUploaded(fileName) {
this.form.ghwj = fileName; this.form.ghwj = `${this.baseUrl}/${fileName}`; // baseURL
} }
} }
}; };

@ -26,14 +26,18 @@
<el-dialog :title="dialogTitle" :visible.sync="dialogVisible" width="500px"> <el-dialog :title="dialogTitle" :visible.sync="dialogVisible" width="500px">
<el-form :model="form" label-width="120px" :rules="rules" ref="formRef"> <el-form :model="form" label-width="120px" :rules="rules" ref="formRef">
<el-form-item label="类型" prop="imgType"> <el-form-item label="类型" prop="imgType">
<el-select v-model="form.imgType" placeholder="请选择类型" @change="handleTypeChange"> <el-select
<el-option v-for="dict in dict.type.tplx" :key="dict.value" :label="dict.label" v-model="form.imgType" placeholder="请选择类型" @change="handleTypeChange">
<el-option v-for="dict in dict.type.tplx" :key="dict.value" :label="dict.label"
:value="parseInt(dict.value)"> :value="parseInt(dict.value)">
</el-option> </el-option>
</el-select> </el-select>
</el-form-item> </el-form-item>
<el-form-item label="图片上传" prop="img"> <el-form-item label="图片上传" prop="img">
<ImageUpload v-model="form.img" :file-list="currentTypeFileList" :multiple="true" /> <ImageUpload
v-model="form.img"
:file-list="currentTypeFileList"
:multiple="true" />
</el-form-item> </el-form-item>
</el-form> </el-form>
<span slot="footer" class="dialog-footer"> <span slot="footer" class="dialog-footer">
@ -42,7 +46,7 @@
</span> </span>
</el-dialog> </el-dialog>
<!-- 图片展示- 默认轮播图样式 --> <!-- 图片展示 -->
<div class="longbox"> <div class="longbox">
<div class="main-content"> <div class="main-content">
<template v-if="legendsData && legendsData.length > 0"> <template v-if="legendsData && legendsData.length > 0">
@ -50,29 +54,27 @@
style="display: flex;flex-direction: column;gap: 1rem;"> style="display: flex;flex-direction: column;gap: 1rem;">
<!-- 类型1轮播图 --> <!-- 类型1轮播图 -->
<div v-if="legend.type1 && legend.type1.images && legend.type1.images.length > 0"> <div v-if="legend.type1 && legend.type1.images && legend.type1.images.length > 0">
<div class="fixed-carousel-container"> <div class="fixed-carousel-container">
<el-carousel height="12.44rem" indicator-position="outside" class="fixed-carousel"> <el-carousel height="12.44rem" indicator-position="outside" class="fixed-carousel">
<el-carousel-item v-for="(img, imgIndex) in legend.type1.images" <el-carousel-item v-for="(img, imgIndex) in legend.type1.images"
:key="'type1-' + imgIndex"> :key="'type1-' + imgIndex">
<div class="carousel-item-wrapper"> <div class="carousel-item-wrapper">
<img :src="img" :alt="'外部图片' + imgIndex" class="fixed-carousel-image"> <img :src="baseUrl + img" :alt="'外部图片' + imgIndex" class="fixed-carousel-image">
<div class="classify">外部</div> <div class="classify">外部</div>
</div> </div>
</el-carousel-item> </el-carousel-item>
</el-carousel> </el-carousel>
</div> </div>
</div> </div>
<!-- 类型2轮播图 --> <!-- 类型2轮播图 -->
<div v-if="legend.type2 && legend.type2.images && legend.type2.images.length > 0"> <div v-if="legend.type2 && legend.type2.images && legend.type2.images.length > 0">
<div class="fixed-carousel-container"> <div class="fixed-carousel-container">
<el-carousel height="12.44rem" indicator-position="outside" class="fixed-carousel"> <el-carousel height="12.44rem" indicator-position="outside" class="fixed-carousel">
<el-carousel-item v-for="(img, imgIndex) in legend.type2.images" <el-carousel-item v-for="(img, imgIndex) in legend.type2.images"
:key="'type2-' + imgIndex"> :key="'type2-' + imgIndex">
<div class="carousel-item-wrapper"> <div class="carousel-item-wrapper">
<img :src="img" :alt="'内部图片' + imgIndex" class="fixed-carousel-image"> <img :src="baseUrl + img" :alt="'内部图片' + imgIndex" class="fixed-carousel-image">
<div class="classify">内部</div> <div class="classify">内部</div>
</div> </div>
</el-carousel-item> </el-carousel-item>
@ -112,6 +114,7 @@ export default {
}, },
data() { data() {
return { return {
baseUrl: process.env.VUE_APP_BASE_API,
dialogVisible: false, dialogVisible: false,
dialogTitle: '新增图例', dialogTitle: '新增图例',
legendsData: [], legendsData: [],
@ -151,13 +154,8 @@ export default {
if (response.code === 200) { if (response.code === 200) {
this.legendsData = response.data || []; this.legendsData = response.data || [];
} else { } else {}
this.$message.error(response.msg || '获取图例数据失败'); } catch (error) {}
}
} catch (error) {
console.error('获取图例数据失败:', error);
this.$message.error('获取图例数据失败');
}
}, },
updateCurrentTypeFileList() { updateCurrentTypeFileList() {
@ -168,6 +166,7 @@ export default {
const firstLegend = this.legendsData[0]; const firstLegend = this.legendsData[0];
//
let images = []; let images = [];
if (this.form.imgType === 1 && firstLegend.type1) { if (this.form.imgType === 1 && firstLegend.type1) {
images = firstLegend.type1.images || []; images = firstLegend.type1.images || [];
@ -175,6 +174,7 @@ export default {
images = firstLegend.type2.images || []; images = firstLegend.type2.images || [];
} }
//
this.currentTypeFileList = images.map(url => ({ this.currentTypeFileList = images.map(url => ({
url: url, url: url,
name: url.split('/').pop(), name: url.split('/').pop(),
@ -257,10 +257,7 @@ export default {
} else { } else {
this.$message.error(response.msg || '操作失败'); this.$message.error(response.msg || '操作失败');
} }
} catch (error) { } catch (error) {} finally {
this.$message.error('操作失败,请重试');
console.error('操作失败:', error);
} finally {
loading.close(); loading.close();
} }
} }

@ -1,59 +1,53 @@
<template> <template>
<div class="container"> <div class="container">
<!-- 顶部信息 --> <!-- 顶部信息 -->
<div class="containertop"> <div class="containertop">
<h3>THI SIP高端装备工业港</h3> <h3>{{ form.name }}</h3>
</div> </div>
</div> </div>
</template> </template>
<script> <script>
import { getBasicInformationById } from '@/api/ManageApi/index'; export default {
export default {
props: { props: {
size: { size: {
type: String, type: String,
default: 'mini' default: ''
}, },
id: { basicInfo: {
type: [Number, String], type: Object,
required: true required: true
} },
}, },
data() { data() {
return { return {
name: '' form: {
}; name: '',
},
descriptions: []
};
}, },
created() { watch: {
this.fetchData(); basicInfo: {
handler(newVal) {
if (newVal && newVal.name) {
this.form = {
...this.form,
name: newVal.name,
begainTime: newVal.begainTime ? new Date(newVal.begainTime) : '',
endTime: newVal.endTime ? new Date(newVal.endTime) : '',
};
}
},
immediate: true,
deep: true
}
}, },
methods: { methods: {
fetchData() {
getBasicInformationById(this.id)
.then(response => {
const data = response.data;
this.name = data.name;
})
.catch(error => {
console.error('There was an error fetching the data!', error);
});
},
edit() {
this.dialogVisible = true;
},
exportData() {
//
},
}
};
</script>
<style scoped> }
.containertop { };
text-align: center; </script>
margin-bottom: 1rem;
} <style scoped>
</style>
</style>

@ -1,6 +1,6 @@
<template> <template>
<div class="container"> <div class="container">
<el-table :data="tableData" style="width: 100%" :show-header="false"> <el-table :data="tableData" style="width: 100%" :show-header="false" @row-click="handleRowClick">
<el-table-column width="80"> <el-table-column width="80">
<template slot-scope="scope"> <template slot-scope="scope">
<img :src="getIcon(scope.$index)" alt="icon" style="width: 2.19rem; height: 1.25rem;"> <img :src="getIcon(scope.$index)" alt="icon" style="width: 2.19rem; height: 1.25rem;">
@ -11,17 +11,37 @@
<el-table-column prop="date" width="100"> <el-table-column prop="date" width="100">
</el-table-column> </el-table-column>
</el-table> </el-table>
<!-- 详情弹窗 -->
<el-dialog :title="dialogTitle" :visible.sync="dialogVisible" width="40%">
<div>
<p><strong>时间:</strong> {{ selectedMessage.date }}</p>
<p><strong>内容:</strong> {{ selectedMessage.name }}</p>
</div>
<span slot="footer" class="dialog-footer">
<el-button type="primary" @click="handleConfirm"></el-button>
<el-button @click="dialogVisible = false">关闭</el-button>
</span>
</el-dialog>
</div> </div>
</template> </template>
<script> <script>
import { getAllMessagestwo } from '@/api/ManageApi/index'; import { getAllMessagestwo } from '@/api/ManageApi/index';
import { markSmartReminderAsRead } from '@/api/ManageApi/index';
export default { export default {
name: 'MessageTable', name: 'MessageTable',
data() { data() {
return { return {
tableData: [] tableData: [],
dialogVisible: false,
selectedMessage: {
id: '',
name: '',
date: ''
},
dialogTitle: '消息详情'
}; };
}, },
mounted() { mounted() {
@ -36,6 +56,7 @@ export default {
}, },
processData(data) { processData(data) {
return data.map(item => ({ return data.map(item => ({
id: item.id, // id
name: item.content, name: item.content,
date: this.formatDate(item.createTime) date: this.formatDate(item.createTime)
})); }));
@ -45,17 +66,42 @@ export default {
}, },
formatDate(dateString) { formatDate(dateString) {
if (!dateString) { if (!dateString) {
// dateString undefined
return ''; return '';
} }
const date = new Date(dateString); const date = new Date(dateString);
if (isNaN(date.getTime())) { if (isNaN(date.getTime())) {
return ''; return '';
} }
const year = date.getFullYear(); const year = date.getFullYear();
const month = String(date.getMonth() + 1).padStart(2, '0'); const month = String(date.getMonth() + 1).padStart(2, '0');
const day = String(date.getDate()).padStart(2, '0'); const day = String(date.getDate()).padStart(2, '0');
return `${year}-${month}-${day}`; return `${year}-${month}-${day}`;
},
handleRowClick(row) {
this.selectedMessage = row;
this.dialogVisible = true;
},
handleConfirm() {
if (this.selectedMessage.id) {
markSmartReminderAsRead(this.selectedMessage.id)
.then(response => {
if (response && response.code === 200) {
this.$message.success('消息已标记为已读');
this.dialogVisible = false;
//
this.getData(); //
} else {
this.$message.error('标记为已读失败');
}
})
.catch(error => {
console.error('标记为已读失败:', error);
this.$message.error('标记为已读失败');
});
} else {
this.$message.error('消息 ID 不存在');
this.dialogVisible = false;
}
} }
} }
}; };

@ -128,6 +128,8 @@ export default {
<style scoped> <style scoped>
.tablebox { .tablebox {
height: 16rem;
overflow: auto;
background-color: #fff; background-color: #fff;
border-radius: .5rem; border-radius: .5rem;
margin: .5rem; margin: .5rem;

@ -7,8 +7,8 @@
label-width="200"> label-width="200">
<el-row> <el-row>
<el-col :span="5"> <el-col :span="5">
<el-form-item label="项目名称" style="width: 100%;"> <el-form-item label="项目名称" prop="name" style="width: 100%;">
<el-input v-model="queryParams.name" placeholder="请输入项目名称" clearable <el-input v-model="queryParams.name" placeholder="请输入项目名称" clearable style="width: 15rem;"
@keyup.enter.native="handleQuery" /> @keyup.enter.native="handleQuery" />
</el-form-item> </el-form-item>
</el-col> </el-col>
@ -29,14 +29,14 @@
</el-select> </el-select>
</el-form-item> </el-form-item>
</el-col> </el-col>
</el-row>
<el-row>
<el-col :span="5"> <el-col :span="5">
<el-form-item label="项目法人单位"> <el-form-item label="项目法人单位">
<el-input v-model="queryParams.xmfrdwxz" placeholder="请输入项目法人单位" clearable <el-input v-model="queryParams.xmfrdwxz" placeholder="请输入项目法人单位" clearable
@keyup.enter.native="handleQuery" /> @keyup.enter.native="handleQuery" />
</el-form-item> </el-form-item>
</el-col> </el-col>
</el-row>
<el-row>
<el-col :span="8"> <el-col :span="8">
<el-form-item> <el-form-item>
<el-button type="primary" icon="el-icon-search" size="mini" <el-button type="primary" icon="el-icon-search" size="mini"
@ -80,7 +80,11 @@
</div> </div>
<el-table v-loading="loading" :data="postList" @selection-change="handleSelectionChange" stripe> <el-table v-loading="loading" :data="postList" @selection-change="handleSelectionChange" stripe>
<el-table-column type="selection" width="55" align="center" /> <el-table-column type="selection" width="55" align="center" />
<el-table-column label="序号" align="center" prop="id" /> <el-table-column label="序号" align="center">
<template slot-scope="scope">
{{ (scope.$index + 1) + (queryParams.pageNum - 1) * queryParams.pageSize }}
</template>
</el-table-column>
<el-table-column label="项目名称" align="center" prop="name" width="200" /> <el-table-column label="项目名称" align="center" prop="name" width="200" />
<el-table-column label="现状分类" align="center" prop="xzfl"> <el-table-column label="现状分类" align="center" prop="xzfl">
<template slot-scope="scope"> <template slot-scope="scope">
@ -95,7 +99,7 @@
</template> </template>
</el-table-column> </el-table-column>
<el-table-column label="总投资额(万元)" align="center" width="130" prop="ztze" /> <el-table-column label="总投资额(万元)" align="center" width="130" prop="ztze" />
<el-table-column label="总用地面积(平方米)" align="center" prop="zydmj" /> <el-table-column label="总用地面积(平方米)" align="center" width="180" prop="zydmj" />
<el-table-column label="当前状态" align="center" prop="status"> <el-table-column label="当前状态" align="center" prop="status">
<template slot-scope="scope"> <template slot-scope="scope">
<span :style="{ color: statusColors[statusMap[scope.row.status]] }">{{ <span :style="{ color: statusColors[statusMap[scope.row.status]] }">{{
@ -107,8 +111,7 @@
<el-button size="mini" type="text" @click="getInfo(scope.row, 'fill')" <el-button size="mini" type="text" @click="getInfo(scope.row, 'fill')"
v-if="statusMap[scope.row.status] === '待填报'">填报</el-button> v-if="statusMap[scope.row.status] === '待填报'">填报</el-button>
<el-button size="mini" type="text" @click="getInfo(scope.row, 'detail')" <el-button size="mini" type="text" @click="getInfo(scope.row, 'detail')"
v-if="statusMap[scope.row.status] !== '待填报'" v-if="statusMap[scope.row.status] !== '待填报'">详情</el-button>
>详情</el-button>
</template> </template>
</el-table-column> </el-table-column>
</el-table> </el-table>
@ -187,16 +190,16 @@ export default {
/** 查询项目列表 */ /** 查询项目列表 */
getList() { getList() {
this.loading = true; this.loading = true;
// //
const params = { const params = {
...this.queryParams, ...this.queryParams,
begainTime: this.queryParams.dateRange ? this.queryParams.dateRange[0] : undefined, begainTime: this.queryParams.dateRange ? this.queryParams.dateRange[0] : undefined,
endTime: this.queryParams.dateRange ? this.queryParams.dateRange[1] : undefined endTime: this.queryParams.dateRange ? this.queryParams.dateRange[1] : undefined
}; };
console.log('【查询参数】', params); // console.log('【查询参数】', params); //
getBasicInformationPage(params).then((response) => { getBasicInformationPage(params).then((response) => {
this.postList = response.data.records; this.postList = response.data.records;
this.total = response.data.total; this.total = response.data.total;

@ -8,7 +8,7 @@
<el-row> <el-row>
<el-col :span="5"> <el-col :span="5">
<el-form-item label="项目名称" prop="name" style="width: 100%;"> <el-form-item label="项目名称" prop="name" style="width: 100%;">
<el-input v-model="queryParams.name" placeholder="请输入项目名称" clearable <el-input v-model="queryParams.name" placeholder="请输入项目名称" clearable style="width: 15rem;"
@keyup.enter.native="handleQuery" /> @keyup.enter.native="handleQuery" />
</el-form-item> </el-form-item>
</el-col> </el-col>
@ -29,14 +29,14 @@
</el-select> </el-select>
</el-form-item> </el-form-item>
</el-col> </el-col>
</el-row>
<el-row>
<el-col :span="5"> <el-col :span="5">
<el-form-item label="项目法人单位"> <el-form-item label="项目法人单位">
<el-input v-model="queryParams.xmfrdwxz" placeholder="请输入项目法人单位" clearable <el-input v-model="queryParams.xmfrdwxz" placeholder="请输入项目法人单位" clearable
@keyup.enter.native="handleQuery" /> @keyup.enter.native="handleQuery" />
</el-form-item> </el-form-item>
</el-col> </el-col>
</el-row>
<el-row>
<el-col :span="8"> <el-col :span="8">
<el-form-item> <el-form-item>
<el-button type="primary" icon="el-icon-search" size="mini" <el-button type="primary" icon="el-icon-search" size="mini"
@ -96,7 +96,11 @@
</div> </div>
<el-table v-loading="loading" :data="postList" @selection-change="handleSelectionChange" stripe> <el-table v-loading="loading" :data="postList" @selection-change="handleSelectionChange" stripe>
<el-table-column type="selection" width="55" align="center" /> <el-table-column type="selection" width="55" align="center" />
<el-table-column label="序号" align="center" prop="id" /> <el-table-column label="序号" align="center">
<template slot-scope="scope">
{{ (scope.$index + 1) + (queryParams.pageNum - 1) * queryParams.pageSize }}
</template>
</el-table-column>
<el-table-column label="项目名称" align="center" prop="name" width="200" /> <el-table-column label="项目名称" align="center" prop="name" width="200" />
<el-table-column label="现状分类" align="center" prop="xzfl"> <el-table-column label="现状分类" align="center" prop="xzfl">
<template slot-scope="scope"> <template slot-scope="scope">
@ -111,7 +115,7 @@
</template> </template>
</el-table-column> </el-table-column>
<el-table-column label="总投资额(万元)" align="center" width="130" prop="ztze" /> <el-table-column label="总投资额(万元)" align="center" width="130" prop="ztze" />
<el-table-column label="总用地面积(平方米)" align="center" prop="zydmj" /> <el-table-column label="总用地面积(平方米)" align="center" width="180" prop="zydmj" />
<el-table-column label="当前状态" align="center" prop="status"> <el-table-column label="当前状态" align="center" prop="status">
<template slot-scope="scope"> <template slot-scope="scope">
<span :style="{ color: statusColors[statusMap[scope.row.status]] }">{{ <span :style="{ color: statusColors[statusMap[scope.row.status]] }">{{
@ -120,7 +124,12 @@
</el-table-column> </el-table-column>
<el-table-column label="操作" align="center" class-name="small-padding fixed-width"> <el-table-column label="操作" align="center" class-name="small-padding fixed-width">
<template slot-scope="scope"> <template slot-scope="scope">
<el-button size="mini" type="text" @click="getInfo(scope.row)"></el-button> <el-button size="mini" type="text" @click="getInfo(scope.row, 'fill')"
v-if="statusMap[scope.row.status] === '待审核'">详情</el-button>
<el-button size="mini" type="text" @click="getInfo(scope.row, 'fill')"
v-if="statusMap[scope.row.status] === '审核通过'">详情</el-button>
<el-button size="mini" type="text" @click="getInfo(scope.row, 'detail')"
v-if="statusMap[scope.row.status] === '待填报'">详情</el-button>
<el-button size="mini" type="text" @click="handleDelete(scope.row)" <el-button size="mini" type="text" @click="handleDelete(scope.row)"
style="color: #F25353;">删除</el-button> style="color: #F25353;">删除</el-button>
</template> </template>
@ -264,7 +273,7 @@ export default {
this.$modal this.$modal
.confirm('是否确认删除项目id为"' + ids + '"的数据项?') .confirm('是否确认删除项目id为"' + ids + '"的数据项?')
.then(() => { .then(() => {
return deleteBasicInformation(ids); return deleteBasicInformation(ids);
}) })
.then(() => { .then(() => {
this.getList(); this.getList();
@ -272,11 +281,11 @@ export default {
}) })
.catch(() => { }); .catch(() => { });
}, },
/** 详情按钮操作 */ /** 详情按钮操作 */
getInfo(row) { getInfo(row, type) {
this.$store.commit("SET_CRUMBS", this.$route.meta.title + "详情"); this.$store.commit("SET_CRUMBS", this.$route.meta.title + "详情");
const id = row.id || this.ids[0]; const id = row.id || this.ids[0];
this.$router.push({ path: `/manage-info/${id}` }); this.$router.push({ path: `/manage-info/${id}`, query: { action: type } });
}, },
/** 重置按钮操作 */ /** 重置按钮操作 */
resetQuery() { resetQuery() {

@ -6,8 +6,7 @@
<el-row> <el-row>
<el-col :span="5"> <el-col :span="5">
<el-form-item label="评价要素" prop="pjys" style="width: 100%;"> <el-form-item label="评价要素" prop="pjys" style="width: 100%;">
<el-input v-model="queryParams.pjys" placeholder="请输入评价要素" clearable <el-input v-model="queryParams.pjys" placeholder="请输入评价要素" clearable @keyup.enter.native="handleQuery" />
@keyup.enter.native="handleQuery" />
</el-form-item> </el-form-item>
</el-col> </el-col>
<el-col :span="8"> <el-col :span="8">
@ -28,12 +27,16 @@
</div> </div>
</div> </div>
<el-table v-loading="loading" :data="postList" @selection-change="handleSelectionChange"> <el-table v-loading="loading" :data="postList" @selection-change="handleSelectionChange">
<el-table-column label="序号" align="center" prop="id" /> <el-table-column label="序号" align="center">
<el-table-column label="评价要素" align="center" prop="pjys" /> <template slot-scope="scope">
<el-table-column label="评价规则" align="center" prop="pfgz" /> {{ (scope.$index + 1) + (queryParams.pageNum - 1) * queryParams.pageSize }}
</template>
</el-table-column>
<el-table-column label="评价要素" align="center" prop="pjys" />
<el-table-column label="评价规则" align="center" prop="pfgz" />
<el-table-column label="操作" align="center" class-name="small-padding fixed-width"> <el-table-column label="操作" align="center" class-name="small-padding fixed-width">
<template slot-scope="scope"> <template slot-scope="scope">
<el-button size="mini" type="text" @click="handleUpdate(scope.row)"></el-button> <el-button size="mini" type="text" @click="handleUpdate(scope.row)"></el-button>
<el-button size="mini" type="text" style="color: red;" @click="handleDelete(scope.row)"></el-button> <el-button size="mini" type="text" style="color: red;" @click="handleDelete(scope.row)"></el-button>
</template> </template>
</el-table-column> </el-table-column>
@ -45,11 +48,11 @@
<!-- 添加规则的弹窗 --> <!-- 添加规则的弹窗 -->
<el-dialog :title="title" :visible.sync="open" width="500px" append-to-body> <el-dialog :title="title" :visible.sync="open" width="500px" append-to-body>
<el-form ref="form" :model="form" :rules="rules" label-width="80px"> <el-form ref="form" :model="form" :rules="rules" label-width="80px">
<el-form-item label="评价要素" prop="postName"> <el-form-item label="评价要素" prop="pjys">
<el-input v-model="form.pjys" placeholder="请输入评价要素" /> <el-input v-model="form.pjys" placeholder="请输入评价要素" />
</el-form-item> </el-form-item>
<el-form-item label="评分规则" prop="postCode"> <el-form-item label="评分规则" prop="pfgz">
<el-input v-model="form.pfgz" placeholder="请输入评分规则" /> <el-input v-model="form.pfgz" placeholder="请输入评分规则" />
</el-form-item> </el-form-item>
</el-form> </el-form>
<div slot="footer" class="dialog-footer"> <div slot="footer" class="dialog-footer">
@ -70,7 +73,7 @@ export default {
queryParams: { queryParams: {
pageNum: 1, pageNum: 1,
pageSize: 10, pageSize: 10,
postName: '' pjys: '' // pjys
}, },
// //
postList: [], postList: [],
@ -85,13 +88,17 @@ export default {
// //
open: false, open: false,
// //
form: {}, form: {
id: undefined,
pjys: undefined,
pfgz: undefined
},
// //
rules: { rules: {
postName: [ pjys: [
{ required: true, message: '评价要素不能为空', trigger: 'blur' } { required: true, message: '评价要素不能为空', trigger: 'blur' }
], ],
postCode: [ pfgz: [
{ required: true, message: '评分规则不能为空', trigger: 'blur' } { required: true, message: '评分规则不能为空', trigger: 'blur' }
] ]
} }
@ -123,7 +130,6 @@ export default {
}, },
// //
handleQuery() { handleQuery() {
this.queryParams.postName = this.queryParams.pjys;
this.queryParams.pageNum = 1; this.queryParams.pageNum = 1;
this.getList(); this.getList();
}, },
@ -148,7 +154,6 @@ export default {
handleUpdate(row) { handleUpdate(row) {
this.reset(); this.reset();
const postId = row.id || this.ids; // 使 id const postId = row.id || this.ids; // 使 id
//
this.form = { ...row }; this.form = { ...row };
this.open = true; this.open = true;
this.title = '修改规则'; this.title = '修改规则';
@ -195,7 +200,7 @@ export default {
}).then(() => { }).then(() => {
this.getList(); this.getList();
this.$modal.msgSuccess('删除成功'); this.$modal.msgSuccess('删除成功');
}).catch(() => {}); }).catch(() => { });
} }
} }
}; };
@ -233,5 +238,38 @@ export default {
margin-top: 1rem; margin-top: 1rem;
margin-bottom: 1rem; margin-bottom: 1rem;
} }
</style>
<style scoped>
.headerbox {
background-color: #fff;
border-radius: .5rem;
padding: 1rem;
margin: .5rem;
border: 1px solid #eee;
}
.tablebox {
background-color: #fff;
border-radius: .5rem;
padding: 1rem;
margin: .5rem;
border: 1px solid #eee;
}
.tablehead {
display: flex;
justify-content: space-between;
align-items: center;
margin-bottom: .5rem
}
.headbtn {
display: flex;
}
.tablebtntwo {
margin-top: 1rem;
margin-bottom: 1rem;
}
</style> </style>

@ -50,7 +50,11 @@
<el-table v-loading="loading" :data="postList" @selection-change="handleSelectionChange" <el-table v-loading="loading" :data="postList" @selection-change="handleSelectionChange"
@sort-change="handleSortChange"> @sort-change="handleSortChange">
<el-table-column type="selection" width="55" align="center" /> <el-table-column type="selection" width="55" align="center" />
<el-table-column label="序号" align="center" prop="id" /> <el-table-column label="序号" align="center">
<template slot-scope="scope">
{{ (scope.$index + 1) + (queryParams.current - 1) * queryParams.size }}
</template>
</el-table-column>
<el-table-column label="项目名称" align="center" prop="name" /> <el-table-column label="项目名称" align="center" prop="name" />
<el-table-column label="现状分类" align="center"> <el-table-column label="现状分类" align="center">
<template slot-scope="scope"> <template slot-scope="scope">
@ -76,8 +80,13 @@
</template> </template>
</el-table-column> </el-table-column>
</el-table> </el-table>
<pagination v-show="total > 0" :total="total" :page.sync="queryParams.current" :limit.sync="queryParams.size" <pagination
@pagination="getList" /> v-show="total > 0"
:total="total"
:page.sync="queryParams.current"
:limit.sync="queryParams.size"
@pagination="getList"
/>
</div> </div>
<!-- 详情对话框 --> <!-- 详情对话框 -->
@ -168,11 +177,10 @@ export default {
current: 1, current: 1,
size: 10, size: 10,
name: '', name: '',
dateRange: '', begainTime: '',
endTime: '',
xzfl: '', xzfl: '',
pjdj: '', pjdj: ''
begainTime: null,
endTime: null
}, },
showSearch: true, showSearch: true,
dialogVisible: false, dialogVisible: false,
@ -215,8 +223,8 @@ export default {
current: 1, current: 1,
size: 10, size: 10,
name: '', name: '',
begainTime: '', begainTime: '',
endTime: '', endTime: '',
xzfl: '', xzfl: '',
pjdj: '' pjdj: ''
}; };

@ -63,6 +63,7 @@
import { getCodeImg } from '@/api/login' import { getCodeImg } from '@/api/login'
import Cookies from 'js-cookie' import Cookies from 'js-cookie'
import { encrypt, decrypt } from '@/utils/jsencrypt' import { encrypt, decrypt } from '@/utils/jsencrypt'
import { active } from 'sortablejs'
export default { export default {
name: 'Login', name: 'Login',
data() { data() {
@ -74,7 +75,8 @@ export default {
password: 'admin123', password: 'admin123',
rememberMe: false, rememberMe: false,
code: '', code: '',
uuid: '' uuid: '',
loginRole: 2
}, },
loginRules: { loginRules: {
username: [ username: [
@ -96,6 +98,14 @@ export default {
watch: { watch: {
$route(route) { $route(route) {
this.redirect = route.query && route.query.redirect this.redirect = route.query && route.query.redirect
},
activeName(newVal) {
if (newVal === 'first') {
this.loginForm.loginRole = 2;
} else if (newVal === 'second') {
this.loginForm.loginRole = 1;
}
} }
}, },
computed: { computed: {
@ -111,12 +121,6 @@ export default {
this.getCookie() this.getCookie()
}, },
methods: { methods: {
handleGovernmentLogin() {
window.location.href = 'https://qyt.sipac.gov.cn/';
},
handleEnterpriseLogin() {
window.location.href = 'https://qytt.sipac.gov.cn/ecobrainportal/login.html';
},
getCode() { getCode() {
getCodeImg().then((res) => { getCodeImg().then((res) => {
this.captchaEnabled = res.captchaEnabled === undefined ? true : res.captchaEnabled this.captchaEnabled = res.captchaEnabled === undefined ? true : res.captchaEnabled
@ -141,28 +145,40 @@ export default {
handleLogin() { handleLogin() {
this.$refs.loginForm.validate((valid) => { this.$refs.loginForm.validate((valid) => {
if (valid) { if (valid) {
this.loading = true this.loading = true;
if (this.loginForm.rememberMe) { if (this.loginForm.rememberMe) {
Cookies.set('username', this.loginForm.username, { expires: 30 }) Cookies.set('username', this.loginForm.username, { expires: 30 });
Cookies.set('password', encrypt(this.loginForm.password), { expires: 30 }) Cookies.set('password', encrypt(this.loginForm.password), { expires: 30 });
Cookies.set('rememberMe', this.loginForm.rememberMe, { expires: 30 }) Cookies.set('rememberMe', this.loginForm.rememberMe, { expires: 30 });
} else { } else {
Cookies.remove('username') Cookies.remove('username');
Cookies.remove('password') Cookies.remove('password');
Cookies.remove('rememberMe') Cookies.remove('rememberMe');
} }
this.$store.dispatch('Login', this.loginForm).then(() => {
this.$router.push({ path: this.redirect || '/' }).catch(() => { })
}).catch((error) => { const loginData = {
this.loading = false username: this.loginForm.username,
if (this.captchaEnabled) { password: this.loginForm.password,
this.getCode() code: this.loginForm.code,
} uuid: this.loginForm.uuid,
console.error('登录失败:', error) loginRole: this.activeName === 'first' ? 2 : 1
}) };
this.$store.dispatch('Login', loginData)
.then(() => {
this.$router.push({ path: this.redirect || '/' }).catch(() => { });
})
.catch((error) => {
this.loading = false;
if (this.captchaEnabled) {
this.getCode();
}
console.error('登录失败:', error);
});
} }
}) });
} },
} }
} }
</script> </script>

@ -1,94 +1,104 @@
<template> <template>
<div class="bigone"> <div>
<!-- 标题 --> <!-- 企业端 -->
<div class="containerheadone" id="listtop"> <div class="bigone" v-if="showCompanySection">
<Title :id="projectId"></Title> <!-- 标题 -->
<el-button type="primary" size="medium" plain <div class="containerheadone" id="listtop">
style="border: none;background-color: rgba(43,98,241,0.1);color: #2B62F1;" @click="goBack"> <Title :basicInfo="basicInformation"></Title>
返回 <el-button type="primary" size="medium" plain
</el-button> style="border: none;background-color: rgba(43,98,241,0.1);color: #2B62F1;" @click="goBack">
</div> 返回
<div style="display: flex;justify-content: center;"> </el-button>
<el-button type="primary" v-if="isSubmitted" disabled>已提交</el-button>
</div>
<div class="containerbody" v-if="isContainerVisible">
<!-- 目录 -->
<div class="containerhead">
<el-menu :default-active="activeSection" mode="horizontal" @select="scrollToSection"
class="custom-menu">
<el-menu-item v-for="(item, index) in sections" :key="index" :index="item.id"
class="custom-menu-item">
{{ item.label }}
</el-menu-item>
</el-menu>
</div>
<!-- 基本信息 -->
<div id="basic">
<Basic :action="action" :basicInfo="basicInformation"
@update-data="handleDataUpdate('basicInformation', $event)">
</Basic>
</div>
<!-- 规划信息 -->
<div id="programme">
<Programme :action="action" :planInfo="planInformation"
@update-data="handleDataUpdate('planInformation', $event)">
</Programme>
</div>
<!-- 建筑信息 -->
<div id="buildings">
<Buildings :action="action" :xmId="projectId"></Buildings>
</div>
<!-- 要素模型信息 -->
<div id="models">
<Models :action="action" :wysmxInfo="wysmxInformations"
@updata-data="handleDataUpdate('wysmxInformations', $event)">
</Models>
</div>
<!-- 月度进展信息 -->
<div id="months">
<Months :action="action"></Months>
</div>
<!-- 企业入驻信息 -->
<div id="companyenter">
<Companyenter :id="projectId" :action="action" :qyrzInfo="qyrzInformation"
@update-data="handleDataUpdate('qyrzInformation', $event)">
</Companyenter>
</div>
<!-- 项目画像 -->
<div id="projectpicture">
<Projectpicture :action="action" :id="projectId"></Projectpicture>
</div>
<!-- 项目图例 -->
<div id="projectpicturetwo">
<Projectpicturetwo22 :action="action" :xmId="projectId"> </Projectpicturetwo22>
</div> </div>
<!-- 项目巡礼 --> <div style="display: flex;justify-content: center;">
<div id="projectgift"> <el-button type="primary" v-if="isSubmitted" disabled>已提交</el-button>
<Projectgift :action="action" :xmId="projectId"></Projectgift>
</div> </div>
<!-- 现场实况 --> <div class="containerbody" v-if="isContainerVisible">
<div id="liver"> <!-- 目录 -->
<Liver :action="action"></Liver> <div class="containerhead">
</div> <el-menu :default-active="activeSection" mode="horizontal" @select="scrollToSection"
<!-- 项目备忘录 --> class="custom-menu">
<div id="memo"> <el-menu-item v-for="(item, index) in sections" :key="index" :index="item.id"
<Memo :action="action" :xmId="projectId"></Memo> class="custom-menu-item">
</div> {{ item.label }}
<!-- 其他信息 --> </el-menu-item>
<div class="bottombox" id="others"> </el-menu>
<Others :action="action" :xmId="projectId" :anotherInfo="projectOtherInfos" </div>
@update-data="handleDataUpdate('projectOtherInfos', $event)"> <!-- 基本信息 -->
</Others> <div id="basic">
</div> <Basic :action="action" :basicInfo="basicInformation"
<div class="footer"> @update-data="handleDataUpdate('basicInformation', $event)">
<el-button type="primary" v-if="checkRole(['admin', 'common'])" @click="aduitAll"></el-button> </Basic>
<el-button type="primary" </div>
v-if="(checkRole(['company']) && !isSubmitted && action === 'fill') || action === 'fill'" <!-- 规划信息 -->
@click="submitAll">提交审核</el-button> <div id="programme">
<Programme :action="action" :planInfo="planInformation"
@update-data="handleDataUpdate('planInformation', $event)">
</Programme>
</div>
<!-- 建筑信息 -->
<div id="buildings">
<Buildings :action="action" :xmId="projectId"></Buildings>
</div>
<!-- 要素模型信息 -->
<div id="models">
<Models :action="action" :wysmxInfo="wysmxInformations"
@updata-data="handleDataUpdate('wysmxInformations', $event)">
</Models>
</div>
<!-- 月度进展信息 -->
<div id="months">
<Months :action="action"></Months>
</div>
<!-- 企业入驻信息 -->
<div id="companyenter">
<Companyenter :id="projectId" :action="action" :qyrzInfo="qyrzInformation"
@update-data="handleDataUpdate('qyrzInformation', $event)">
</Companyenter>
</div>
<!-- 项目画像 -->
<div id="projectpicture">
<Projectpicture :action="action" :id="projectId"></Projectpicture>
</div>
<!-- 项目图例 -->
<div id="projectpicturetwo">
<Projectpicturetwo22 :action="action" :xmId="projectId"> </Projectpicturetwo22>
</div>
<!-- 项目巡礼 -->
<div id="projectgift">
<Projectgift :action="action" :xmId="projectId"></Projectgift>
</div>
<!-- 现场实况 -->
<div id="liver">
<Liver :action="action"></Liver>
</div>
<!-- 项目备忘录 -->
<div id="memo">
<Memo :action="action" :xmId="projectId"></Memo>
</div>
<!-- 其他信息 -->
<div class="bottombox" id="others">
<Others :action="action" :xmId="projectId" :anotherInfo="projectOtherInfos"
@update-data="handleDataUpdate('projectOtherInfos', $event)">
</Others>
</div>
<div class="footer">
<el-button type="primary" v-if="checkRole(['admin', 'common'])" @click="aduitAll"></el-button>
<el-button type="primary"
v-if="(checkRole(['company']) && !isSubmitted && action === 'fill') || action === 'fill'"
@click="submitAll">提交审核</el-button>
<el-button type="primary"
v-if="(checkRole(['company']) && !isSubmitted && action === 'fill') || action === 'fill'"
@click="saveAll">暂存</el-button>
</div>
</div> </div>
<!-- 返回顶部 -->
<el-button icon="el-icon-caret-top" circle id="back-to-top" @click="scrollToTop" plain></el-button>
</div>
<!-- 政务端 -->
<div class="bigone" v-if="checkRole(['common'])">
123
</div> </div>
<!-- 返回顶部按钮 -->
<el-button icon="el-icon-caret-top" circle id="back-to-top" @click="scrollToTop" plain></el-button>
</div> </div>
</template> </template>
@ -107,7 +117,7 @@ import Projectpicture from '@/views/components/ProjectDetails/Projectpicture.vue
import Projectpicturetwo22 from '@/views/components/ProjectDetails/Projectpicturetwo22.vue'; import Projectpicturetwo22 from '@/views/components/ProjectDetails/Projectpicturetwo22.vue';
import Others from '@/views/components/ProjectDetails/Others.vue'; import Others from '@/views/components/ProjectDetails/Others.vue';
import { checkPermi, checkRole } from "@/utils/permission"; import { checkPermi, checkRole } from "@/utils/permission";
import { getBasicInformationById, fillBasicInformation, auditBasicInformation } from '@/api/ManageApi/index'; import { getBasicInformationById, fillBasicInformation, auditBasicInformation, tempBasicInformation } from '@/api/ManageApi/index';
export default { export default {
components: { components: {
@ -212,7 +222,6 @@ export default {
xmId: 0, xmId: 0,
yczmj: 0 yczmj: 0
}, },
// buildingInformation: [],
projectRemarks: [], projectRemarks: [],
loading: false, loading: false,
}; };
@ -223,6 +232,14 @@ export default {
this.loadData(); this.loadData();
this.action = this.$route.query.action; this.action = this.$route.query.action;
}, },
computed: {
showCompanySection() {
const isCompany = this.checkRole(['company']);
const isCommon = this.checkRole(['common']);
//
return isCompany && !isCommon;
}
},
methods: { methods: {
checkPermi, checkPermi,
checkRole, checkRole,
@ -232,12 +249,10 @@ export default {
const data = response.data; const data = response.data;
this.basicInformation = data.basicInformation; this.basicInformation = data.basicInformation;
this.planInformation = data.planInformation; this.planInformation = data.planInformation;
// this.buildingInformation = data.buildingInformation;
this.projectOtherInfos = data.projectOtherInfos; this.projectOtherInfos = data.projectOtherInfos;
this.wysmxInformations = data.wysmxResponses; this.wysmxInformations = data.wysmxResponses;
this.qyrzInformation = data.qyrzInformation; this.qyrzInformation = data.qyrzInformation;
this.projectRemarks = data.projectRemarks this.projectRemarks = data.projectRemarks
console.log(data);
}); });
}, },
scrollToSection(id) { scrollToSection(id) {
@ -269,34 +284,60 @@ export default {
} }
console.log(`接收到 ${dataKey} 更新:`, updatedData); console.log(`接收到 ${dataKey} 更新:`, updatedData);
}, },
//
isDefault(obj, defaultObj) {
for (const key in defaultObj) {
if (obj[key] !== defaultObj[key]) {
return false;
}
}
return true;
},
//
saveAll() {
this.loading = true;
const tempData = this.prepareSubmitData(); //
tempBasicInformation(tempData)
.then(response => {
this.$message.success('暂存成功');
console.log('暂存数据:', response);
})
.catch(error => {
this.$message.error('暂存失败');
console.error('暂存错误:', error);
})
.finally(() => {
this.loading = false;
});
},
// //
submitAll() { submitAll() {
this.loading = true; // this.loading = true;
const submitData = this.prepareSubmitData(); const submitData = this.prepareSubmitData(); //
// 便 //
console.log('提交的数据结构:', JSON.stringify(submitData, null, 2)); if (this.isDefault(this.planInformation, this.defaultPlanInformation)) {
this.$message.error('规划信息未填写');
this.scrollToSection('programme');
this.loading = false;
return;
}
// fillBasicInformation
fillBasicInformation(submitData) fillBasicInformation(submitData)
.then(response => { .then(response => {
console.log('提交成功:', response); this.$message.success('提交成功');
this.$message.success('数据提交成功');
this.isContainerVisible = false;
this.isSubmitted = true; this.isSubmitted = true;
this.$router.push('/manage'); this.$router.push('/manage');
})
.catch(error => {
console.error('提交失败:', error);
this.$message.error('数据提交失败');
}) })
.finally(() => { .finally(() => {
this.loading = false; this.loading = false;
}); });
}, },
// //
aduitAll() { aduitAll() {
this.loading = true;
const submitData = this.prepareSubmitData(); const submitData = this.prepareSubmitData();
auditBasicInformation(submitData) auditBasicInformation(submitData)
@ -305,42 +346,37 @@ export default {
this.$message.success('审核通过'); this.$message.success('审核通过');
this.isContainerVisible = false; this.isContainerVisible = false;
this.isSubmitted = true; this.isSubmitted = true;
his.$router.push('/manage');
}) })
}, },
//
//
prepareSubmitData() { prepareSubmitData() {
const submitData = { return {
basicInformation: this.basicInformation, basicInformation: this.basicInformation,
planInformation: this.planInformation, planInformation: this.planInformation,
projectOtherInfos: this.projectOtherInfos, projectOtherInfos: this.projectOtherInfos,
qyrzInformation: this.qyrzInformation qyrzInformation: this.qyrzInformation,
wysmxInformations: this.formatWysmxData() //
}; };
},
// wysmxInformations 使 //
const formattedWysmxInformations = []; formatWysmxData() {
this.wysmxInformations.forEach(item => { return this.wysmxInformations.flatMap(item =>
item.list.forEach(listItem => { item.list.map(listItem => ({
formattedWysmxInformations.push({ createTime: this.formatDate(new Date()),
createBy: "", updateTime: this.formatDate(new Date()),
createId: 0, xmId: this.projectId,
createTime: this.formatDate(new Date()), // ysmc: item.ysmc,
id: 0, // 0 zdinfor: listItem.zdinfor,
updateBy: "", zdname: listItem.zdname,
updateId: 0, id: 0, // 0
updateTime: this.formatDate(new Date()), // createBy: "",
xmId: item.xmId, updateBy: "",
ysmc: item.ysmc, createId: 0,
zdinfor: listItem.zdinfor, updateId: 0
zdname: listItem.zdname }))
}); );
});
});
// submitData
submitData.wysmxInformations = formattedWysmxInformations;
return submitData;
}, },
// //
@ -397,7 +433,7 @@ export default {
.custom-menu-item { .custom-menu-item {
color: #3D424C; color: #3D424C;
width: 7.25rem; width: auto;
height: 2rem; height: 2rem;
background: #F4F7FE; background: #F4F7FE;
border-radius: 0.25rem 0.25rem 0.25rem 0.25rem; border-radius: 0.25rem 0.25rem 0.25rem 0.25rem;

@ -1,13 +1,13 @@
<template> <template>
<div> <div>
<!-- 负面清单管理 --> <!-- 企业端页面 -->
<!-- 表单查询项 --> <!-- 表单查询项 -->
<div class="headerbox"> <div class="headerbox">
<el-form :model="queryParams" ref="queryForm" size="small" :inline="true" v-show="showSearch" label-width="200"> <el-form :model="queryParams" ref="queryForm" size="small" :inline="true" v-show="showSearch" label-width="200">
<el-row> <el-row>
<el-col :span="5"> <el-col :span="5">
<el-form-item label="项目名称" prop="postName" style="width: 100%;"> <el-form-item label="项目名称" prop="name" style="width: 100%;">
<el-input v-model="queryParams.postName" placeholder="请输入项目名称" clearable <el-input v-model="queryParams.name" placeholder="请输入项目名称" clearable style="width: 15rem;"
@keyup.enter.native="handleQuery" /> @keyup.enter.native="handleQuery" />
</el-form-item> </el-form-item>
</el-col> </el-col>
@ -22,19 +22,19 @@
</el-col> </el-col>
<el-col :span="5"> <el-col :span="5">
<el-form-item label="现状分类"> <el-form-item label="现状分类">
<el-select v-model="queryParams.postCode" placeholder="现状分类" clearable> <el-select v-model="queryParams.xzfl" placeholder="现状分类" clearable>
<el-option v-for="dict in dict.type.xzfl" :key="dict.value" :label="dict.label" :value="dict.value" /> <el-option v-for="dict in dict.type.xzfl" :key="dict.value" :label="dict.label" :value="dict.value" />
</el-select> </el-select>
</el-form-item> </el-form-item>
</el-col> </el-col>
</el-row>
<el-row>
<el-col :span="5"> <el-col :span="5">
<el-form-item label="项目法人单位"> <el-form-item label="项目法人单位">
<el-input v-model="queryParams.xmfrdwxz" placeholder="请输入项目法人单位" clearable <el-input v-model="queryParams.xmfrdwxz" placeholder="请输入项目法人单位" clearable
@keyup.enter.native="handleQuery" /> @keyup.enter.native="handleQuery" />
</el-form-item> </el-form-item>
</el-col> </el-col>
</el-row>
<el-row>
<el-col :span="8"> <el-col :span="8">
<el-form-item> <el-form-item>
<el-button type="primary" icon="el-icon-search" size="mini" @click="handleQuery"></el-button> <el-button type="primary" icon="el-icon-search" size="mini" @click="handleQuery"></el-button>
@ -47,9 +47,6 @@
<!-- 表格内容区 --> <!-- 表格内容区 -->
<div class="tablebox"> <div class="tablebox">
<!-- 标签行 --> <!-- 标签行 -->
<div class="tablehead">
<!-- <div class="headtitle"><span>项目清单</span></div> -->
</div>
<!-- 导入弹窗 --> <!-- 导入弹窗 -->
<el-dialog title="导入" :visible.sync="upload.open" width="400px" append-to-body> <el-dialog title="导入" :visible.sync="upload.open" width="400px" append-to-body>
<el-upload ref="upload" :limit="1" accept=".xlsx, .xls" :headers="upload.headers" <el-upload ref="upload" :limit="1" accept=".xlsx, .xls" :headers="upload.headers"
@ -68,15 +65,19 @@
</el-dialog> </el-dialog>
<!-- 导出行 --> <!-- 导出行 -->
<div class="tablebtntwo"> <div class="tablebtntwo">
<el-row :gutter="10" class="mb8"> <!-- <el-row :gutter="10" class="mb8">
<el-col :span="1.5"> <el-col :span="1.5">
<!-- <el-button type="primary" icon="el-icon-upload2" size="medium" @click="handleExport"></el-button> --> <el-button type="primary" icon="el-icon-upload2" size="medium" @click="handleExport"></el-button>
</el-col> </el-col>
</el-row> </el-row> -->
</div> </div>
<el-table v-loading="loading" :data="postList" @selection-change="handleSelectionChange" stripe> <el-table v-loading="loading" :data="postList" @selection-change="handleSelectionChange" stripe>
<el-table-column type="selection" width="55" align="center" /> <el-table-column type="selection" width="55" align="center" />
<el-table-column label="序号" align="center" prop="id" /> <el-table-column label="序号" align="center">
<template slot-scope="scope">
{{ (scope.$index + 1) + (queryParams.pageNum - 1) * queryParams.pageSize }}
</template>
</el-table-column>
<el-table-column label="项目名称" align="center" prop="name" width="200" /> <el-table-column label="项目名称" align="center" prop="name" width="200" />
<el-table-column label="现状分类" align="center" prop="xzfl"> <el-table-column label="现状分类" align="center" prop="xzfl">
<template slot-scope="scope"> <template slot-scope="scope">
@ -84,6 +85,7 @@
</template> </template>
</el-table-column> </el-table-column>
<el-table-column label="项目法人单位" align="center" prop="xmfrdwxz" width="200" /> <el-table-column label="项目法人单位" align="center" prop="xmfrdwxz" width="200" />
<!-- <el-table-column label="统一信用代码" align="center" prop="tyshxydm" width="200" /> -->
<el-table-column label="项目建设起止时间" align="center" width="200"> <el-table-column label="项目建设起止时间" align="center" width="200">
<template slot-scope="scope"> <template slot-scope="scope">
{{ scope.row.begainTime }} {{ scope.row.endTime }} {{ scope.row.begainTime }} {{ scope.row.endTime }}
@ -91,10 +93,18 @@
</el-table-column> </el-table-column>
<el-table-column label="总投资额(万元)" align="center" width="130" prop="ztze" /> <el-table-column label="总投资额(万元)" align="center" width="130" prop="ztze" />
<el-table-column label="总用地面积(平方米)" align="center" prop="zydmj" /> <el-table-column label="总用地面积(平方米)" align="center" prop="zydmj" />
<!-- <el-table-column label="当前状态" align="center" prop="status">
<template slot-scope="scope">
<span :style="{ color: statusColors[statusMap[scope.row.status]] }">{{
statusMap[scope.row.status] }}</span>
</template>
</el-table-column> -->
<el-table-column label="操作" align="center" class-name="small-padding fixed-width"> <el-table-column label="操作" align="center" class-name="small-padding fixed-width">
<template slot-scope="scope"> <template slot-scope="scope">
<el-button size="mini" type="text" @click="getInfo(scope.row)"></el-button> <el-button size="mini" type="text" @click="getInfo(scope.row)"></el-button>
<el-button size="mini" type="text" @click="handleDelete(scope.row)" style="color: #F25353;">删除</el-button>
<el-button v-if="checkRole(['admin'])" size="mini" type="text" @click="handleDelete(scope.row)"
style="color: #F25353;">删除</el-button>
</template> </template>
</el-table-column> </el-table-column>
</el-table> </el-table>
@ -148,11 +158,11 @@ export default {
queryParams: { queryParams: {
pageNum: 1, pageNum: 1,
pageSize: 10, pageSize: 10,
postCode: undefined, xzfl: '',
postName: undefined, name: '',
xmfrdwxz: undefined, xmfrdwxz: '',
dateRange: [], dateRange: '', //
status: undefined status: ''
}, },
// //
upload: { upload: {
@ -173,13 +183,37 @@ export default {
/** 查询项目列表 */ /** 查询项目列表 */
getList() { getList() {
this.loading = true; this.loading = true;
getBasicInformationPage(this.queryParams).then((response) => {
//
const params = {
...this.queryParams,
begainTime: this.queryParams.dateRange ? this.queryParams.dateRange[0] : undefined,
endTime: this.queryParams.dateRange ? this.queryParams.dateRange[1] : undefined
};
console.log('【查询参数】', params); //
getBasicInformationPage(params).then((response) => {
this.postList = response.data.records; this.postList = response.data.records;
this.total = response.data.total; this.total = response.data.total;
this.loading = false; this.loading = false;
}).catch(error => {
console.error('查询失败:', error);
this.loading = false;
}); });
}, },
//
processDateRange() {
if (this.queryParams.dateRange && this.queryParams.dateRange.length === 2) {
return {
begainTime: this.queryParams.dateRange[0],
endTime: this.queryParams.dateRange[1]
};
}
return {};
},
/** 导入按钮操作 */ /** 导入按钮操作 */
handleImport() { handleImport() {
this.upload.open = true; this.upload.open = true;
@ -230,7 +264,15 @@ export default {
}, },
/** 重置按钮操作 */ /** 重置按钮操作 */
resetQuery() { resetQuery() {
this.resetForm("queryForm"); this.queryParams = {
pageNum: 1,
pageSize: 10,
xzfl: '',
name: '',
xmfrdwxz: '',
dateRange: '',
status: ''
};
this.handleQuery(); this.handleQuery();
}, },

@ -8,13 +8,13 @@
<el-col :span="6"> <el-col :span="6">
<el-form-item label="关键要素" style="width: 100%;"> <el-form-item label="关键要素" style="width: 100%;">
<el-input placeholder="请输入关键要素" clearable style="width: 14rem;" <el-input placeholder="请输入关键要素" clearable style="width: 14rem;"
v-model="searchForm.keyElement" /> v-model="searchForm.name" />
</el-form-item> </el-form-item>
</el-col> </el-col>
<el-col :span="6"> <el-col :span="6">
<el-form-item label="具体指标" style="width: 100%;"> <el-form-item label="具体指标" style="width: 100%;">
<el-input placeholder="请输入具体指标" clearable style="width: 14rem;" <el-input placeholder="请输入具体指标" clearable style="width: 14rem;"
v-model="searchForm.specificIndicator" /> v-model="searchForm.jtzb" />
</el-form-item> </el-form-item>
</el-col> </el-col>
<el-col :span="8"> <el-col :span="8">
@ -33,7 +33,7 @@
@click="dialogVisible = true; resetForm()">新增要素</el-button> @click="dialogVisible = true; resetForm()">新增要素</el-button>
<!-- 渲染所有要素 --> <!-- 渲染所有要素 -->
<div v-for="(element, index) in tableData" :key="index" class="tablebox"> <div v-for="(element, elementIndex) in tableData" :key="elementIndex" class="tablebox">
<div class="boxheader"> <div class="boxheader">
<div class="headerone"> <div class="headerone">
<div>{{ element.type == 1 ? '关键要素' : '重要要素' }}</div> <div>{{ element.type == 1 ? '关键要素' : '重要要素' }}</div>
@ -41,14 +41,14 @@
</div> </div>
<div class="headertwo"> <div class="headertwo">
<el-button type="primary" icon="el-icon-edit" size="mini" <el-button type="primary" icon="el-icon-edit" size="mini"
@click="handleDeleteElement(element)">删除要素</el-button> @click="handleDeleteElement(element, elementIndex)">删除要素</el-button>
<el-button type="primary" icon="el-icon-edit" size="mini" <el-button type="primary" icon="el-icon-edit" size="mini"
@click="handleUpdate(element)">编辑要素</el-button> @click="handleUpdate(element)">编辑要素</el-button>
<el-button type="primary" icon="el-icon-plus" <el-button type="primary" icon="el-icon-plus"
@click="showAddIndicatorDialog(element)">新增指标</el-button> @click="showAddIndicatorDialog(element)">新增指标</el-button>
</div> </div>
</div> </div>
<el-table :data="element.indicators" style="width: 100%"> <el-table :data="element.list" style="width: 100%">
<el-table-column label="序号" width="180"> <el-table-column label="序号" width="180">
<template slot-scope="scope"> <template slot-scope="scope">
{{ scope.$index + 1 }} {{ scope.$index + 1 }}
@ -60,7 +60,8 @@
<template slot-scope="scope"> <template slot-scope="scope">
<el-button size="mini" type="text" <el-button size="mini" type="text"
@click="handleUpdateIndicator(element, scope.row)">编辑指标</el-button> @click="handleUpdateIndicator(element, scope.row)">编辑指标</el-button>
<el-button size="mini" type="text" @click="handleDelete(element, scope.row)" <el-button size="mini" type="text"
@click="handleDelete(element, scope.row, elementIndex, scope.$index)"
style="color: #F25353;">删除指标</el-button> style="color: #F25353;">删除指标</el-button>
</template> </template>
</el-table-column> </el-table-column>
@ -70,36 +71,36 @@
<!-- 新增/编辑要素弹窗 --> <!-- 新增/编辑要素弹窗 -->
<el-dialog :title="form.id ? '编辑要素' : '新增要素'" :visible.sync="dialogVisible" width="30%"> <el-dialog :title="form.id ? '编辑要素' : '新增要素'" :visible.sync="dialogVisible" width="30%">
<el-form :model="form" label-width="80px"> <el-form :model="form" :rules="rules" ref="elementForm" label-width="80px">
<el-form-item label="类型"> <el-form-item label="类型" prop="type">
<el-select v-model="form.type" placeholder="请选择类型"> <el-select v-model="form.type" placeholder="请选择类型">
<el-option v-for="dict in dict.type.yslx" :key="dict.value" :label="dict.label" <el-option v-for="dict in dict.type.yslx" :key="dict.value" :label="dict.label"
:value="dict.value"></el-option> :value="dict.value"></el-option>
</el-select> </el-select>
</el-form-item> </el-form-item>
<el-form-item label="名称"> <el-form-item label="名称" prop="name">
<el-input v-model="form.name" placeholder="请输入名称"></el-input> <el-input v-model="form.name" placeholder="请输入名称"></el-input>
</el-form-item> </el-form-item>
</el-form> </el-form>
<span slot="footer" class="dialog-footer"> <span slot="footer" class="dialog-footer">
<el-button @click="dialogVisible = false"> </el-button> <el-button @click="dialogVisible = false"> </el-button>
<el-button type="primary" @click="handleAddElement"> </el-button> <el-button type="primary" @click="submitElementForm"> </el-button>
</span> </span>
</el-dialog> </el-dialog>
<!-- 新增/编辑指标弹窗 --> <!-- 新增/编辑指标弹窗 -->
<el-dialog :title="indicatorForm.id ? '编辑指标' : '新增指标'" :visible.sync="indicatorDialogVisible" width="30%"> <el-dialog :title="indicatorForm.id ? '编辑指标' : '新增指标'" :visible.sync="indicatorDialogVisible" width="30%">
<el-form :model="indicatorForm" label-width="80px"> <el-form :model="indicatorForm" :rules="rules" ref="indicatorForm" label-width="80px">
<el-form-item label="具体指标"> <el-form-item label="具体指标" prop="jtzb">
<el-input v-model="indicatorForm.jtzb" placeholder="请输入具体指标"></el-input> <el-input v-model="indicatorForm.jtzb" placeholder="请输入具体指标"></el-input>
</el-form-item> </el-form-item>
<el-form-item label="详细要求"> <el-form-item label="详细要求" prop="xxyq">
<el-input v-model="indicatorForm.xxyq" placeholder="请输入详细要求"></el-input> <el-input v-model="indicatorForm.xxyq" placeholder="请输入详细要求"></el-input>
</el-form-item> </el-form-item>
</el-form> </el-form>
<span slot="footer" class="dialog-footer"> <span slot="footer" class="dialog-footer">
<el-button @click="indicatorDialogVisible = false"> </el-button> <el-button @click="indicatorDialogVisible = false"> </el-button>
<el-button type="primary" @click="handleAddIndicator"> </el-button> <el-button type="primary" @click="submitIndicatorForm"> </el-button>
</span> </span>
</el-dialog> </el-dialog>
</div> </div>
@ -121,8 +122,8 @@ export default {
data() { data() {
return { return {
searchForm: { searchForm: {
keyElement: '', name: '',
specificIndicator: '' jtzb: ''
}, },
tableData: [], tableData: [],
dialogVisible: false, dialogVisible: false,
@ -136,8 +137,16 @@ export default {
id: 0, id: 0,
jtzb: '', jtzb: '',
xxyq: '', xxyq: '',
elementId: 0
}, },
currentElement: null currentElement: null,
currentElementIndex: -1,
rules: {
type: [{ required: true, message: '请选择要素类型', trigger: 'change' }],
name: [{ required: true, message: '请输入要素名称', trigger: 'blur' }],
jtzb: [{ required: true, message: '请输入具体指标', trigger: 'blur' }],
xxyq: [{ required: true, message: '请输入详细要求', trigger: 'blur' }]
}
}; };
}, },
methods: { methods: {
@ -157,18 +166,24 @@ export default {
// //
fetchElements() { fetchElements() {
getAllElements(this.searchForm).then(response => { getAllElements(this.searchForm).then(response => {
this.tableData = response.data.map(item => ({ if (response.code === 200) {
...item, this.tableData = response.data.map(item => ({
indicators: item.list || [] ...item,
})); list: item.list || []
}) }));
} else {
this.$message.error(response.msg || '获取数据失败');
}
}).catch(error => {
this.$message.error('获取数据失败: ' + (error.message || '未知错误'));
});
}, },
// //
resetSearchForm() { resetSearchForm() {
this.searchForm = { this.searchForm = {
keyElement: '', name: '',
specificIndicator: '' jtzb: ''
}; };
this.fetchElements(); this.fetchElements();
}, },
@ -180,6 +195,11 @@ export default {
type: '', type: '',
name: '' name: ''
}; };
this.$nextTick(() => {
if (this.$refs.elementForm) {
this.$refs.elementForm.clearValidate();
}
});
}, },
// //
@ -188,11 +208,38 @@ export default {
id: 0, id: 0,
jtzb: '', jtzb: '',
xxyq: '', xxyq: '',
elementId: 2 elementId: 0
}; };
this.$nextTick(() => {
if (this.$refs.indicatorForm) {
this.$refs.indicatorForm.clearValidate();
}
});
}, },
// //
submitElementForm() {
this.$refs.elementForm.validate(valid => {
if (valid) {
this.handleAddElement();
} else {
return false;
}
});
},
//
submitIndicatorForm() {
this.$refs.indicatorForm.validate(valid => {
if (valid) {
this.handleAddIndicator();
} else {
return false;
}
});
},
//
handleAddElement() { handleAddElement() {
const user = this.getUserInfo(); const user = this.getUserInfo();
const payload = { const payload = {
@ -205,9 +252,11 @@ export default {
const api = this.form.id ? editElemention : addElement; const api = this.form.id ? editElemention : addElement;
api(payload).then(response => { api(payload).then(response => {
this.$message.success(this.form.id ? '编辑成功' : '新增成功'); if (response.code === 200) {
this.dialogVisible = false; this.$message.success(this.form.id ? '要素编辑成功' : '要素新增成功');
this.fetchElements(); this.dialogVisible = false;
this.fetchElements();
} else {}
}) })
}, },
@ -215,7 +264,6 @@ export default {
handleUpdate(element) { handleUpdate(element) {
this.currentElement = element; this.currentElement = element;
this.form = { this.form = {
id: element.id,
type: element.type, type: element.type,
name: element.name name: element.name
}; };
@ -223,21 +271,43 @@ export default {
}, },
// //
handleDeleteElement(element) { //
this.$confirm('确定删除该要素及其所有指标吗?', '警告', { handleDeleteElement(element, elementIndex) {
this.$confirm(`确定删除要素"${element.name}"及其所有指标吗?`, '警告', {
confirmButtonText: '确定', confirmButtonText: '确定',
cancelButtonText: '取消', cancelButtonText: '取消',
type: 'warning' type: 'warning'
}).then(() => { }).then(() => {
// ID2 // IDID + ID
deleteElemention(2).then(() => { const idList = [element.id];
this.$message.success('删除成功'); if (element.list && element.list.length > 0) {
this.fetchElements(); // element.list.forEach(indicator => {
if (indicator.id) { // ID
idList.push(indicator.id);
}
});
}
//
console.log('删除要素请求参数:', {
idList: idList.join(','),
elementIndex
});
// API
deleteElemention(idList).then(response => {
if (response.code === 200) {
this.$message.success('删除成功');
//
this.tableData.splice(elementIndex, 1);
} else {
this.$message.error(response.msg || '删除失败');
}
}).catch(error => { }).catch(error => {
console.error('删除失败:', error);
this.$message.error('删除失败: ' + (error.message || '未知错误')); this.$message.error('删除失败: ' + (error.message || '未知错误'));
}); });
}).catch(() => { }).catch(() => {
//
this.$message.info('已取消删除'); this.$message.info('已取消删除');
}); });
}, },
@ -266,9 +336,13 @@ export default {
const api = this.indicatorForm.id ? editElemention : addElement; const api = this.indicatorForm.id ? editElemention : addElement;
api(payload).then(response => { api(payload).then(response => {
this.$message.success(this.indicatorForm.id ? '指标编辑成功' : '指标新增成功'); if (response.code === 200) {
this.indicatorDialogVisible = false; this.$message.success(this.indicatorForm.id ? '指标编辑成功' : '指标新增成功');
this.fetchElements(); this.indicatorDialogVisible = false;
this.fetchElements();
} else {
this.$message.error(response.msg || '操作失败');
}
}).catch(error => { }).catch(error => {
this.$message.error('操作失败: ' + (error.message || '未知错误')); this.$message.error('操作失败: ' + (error.message || '未知错误'));
}); });
@ -284,18 +358,32 @@ export default {
this.indicatorDialogVisible = true; this.indicatorDialogVisible = true;
}, },
// //
handleDelete(element, indicator) { handleDelete(element, indicator, elementIndex, indicatorIndex) {
this.$confirm('确定删除该指标吗?', '警告', { this.$confirm('确定删除该指标吗?', '警告', {
confirmButtonText: '确定', confirmButtonText: '确定',
cancelButtonText: '取消', cancelButtonText: '取消',
type: 'warning' type: 'warning'
}).then(() => { }).then(() => {
deleteElemention([indicator.id]).then(() => { console.log('删除指标请求参数:', {
this.$message.success('删除成功'); idList: [indicator.id].join(','),
this.fetchElements(); elementIndex,
}) indicatorIndex
});
deleteElemention([indicator.id]).then(response => {
if (response.code === 200) {
this.$message.success('删除成功');
// list
this.tableData[elementIndex].list.splice(indicatorIndex, 1);
} else {
this.$message.error(response.msg || '删除失败');
}
}).catch(error => {
this.$message.error('删除失败: ' + (error.message || '未知错误'));
});
}).catch(() => {
this.$message.info('已取消删除');
}); });
} }
}, },

@ -20,7 +20,7 @@
</el-col> </el-col>
<el-col :span="7"> <el-col :span="7">
<el-form-item label="产业" prop="cy" style="width: 100%;"> <el-form-item label="产业" prop="cy" style="width: 100%;">
<el-input v-model="queryParams.cy" placeholder="请输入产业" clearable style="width: 20.5rem;" <el-input v-model="queryParams.cy" placeholder="请输入产业" style="width: 20.5rem;"
@keyup.enter.native="handleQuery" /> @keyup.enter.native="handleQuery" />
</el-form-item> </el-form-item>
</el-col> </el-col>
@ -192,12 +192,6 @@ export default {
slmllb: [ slmllb: [
{ required: true, message: "上楼目录类别不能为空", trigger: "change" } { required: true, message: "上楼目录类别不能为空", trigger: "change" }
], ],
scyh: [
{ required: true, message: "上传用户不能为空", trigger: "blur" }
],
scsj: [
{ required: true, message: "上传时间不能为空", trigger: "change" }
]
}, },
// //
fileTypeMap: { fileTypeMap: {
@ -247,7 +241,7 @@ export default {
getAllCatalogs(this.queryParams).then(response => { getAllCatalogs(this.queryParams).then(response => {
this.postList = response.data.records.map(item => ({ this.postList = response.data.records.map(item => ({
...item, ...item,
updateTime: item.updateTime ? item.updateTime.split(' ')[0] : '' // updateTime: item.updateTime ? item.updateTime.split(' ')[0] : ''
})); }));
this.total = response.data.total; this.total = response.data.total;
this.loading = false; this.loading = false;

@ -128,29 +128,30 @@
</div> </div>
</el-dialog> </el-dialog>
<!-- 导入对话框 --> <!-- 导入对话框 -->
<el-dialog :title="upload.title" :visible.sync="upload.open" width="400px" append-to-body> <el-dialog :title="upload.title" :visible.sync="upload.open" width="400px" append-to-body>
<el-upload ref="upload" :limit="1" accept=".xlsx, .xls" :headers="upload.headers" <el-upload ref="upload" :limit="1" accept=".xlsx, .xls" :headers="upload.headers"
:action="upload.url + '?updateSupport=' + upload.updateSupport" :disabled="upload.isUploading" :action="upload.url + '?updateSupport=' + upload.updateSupport" :disabled="upload.isUploading"
:on-progress="handleFileUploadProgress" :on-success="handleFileSuccess" :auto-upload="false" drag> :on-progress="handleFileUploadProgress" :on-success="handleFileSuccess" :auto-upload="false" drag>
<i class="el-icon-upload"></i> <i class="el-icon-upload"></i>
<div class="el-upload__text">将文件拖到此处<em>点击上传</em></div> <div class="el-upload__text">将文件拖到此处<em>点击上传</em></div>
<div class="el-upload__tip text-center" slot="tip"> <div class="el-upload__tip text-center" slot="tip">
<span>仅允许导入xlsxlsx格式文件</span> <span>仅允许导入xlsxlsx格式文件</span>
<el-link type="primary" :underline="false" style="font-size: 12px; vertical-align: baseline" <el-link type="primary" :underline="false" style="font-size: 12px; vertical-align: baseline"
@click="importTemplate">下载模板</el-link> @click="importTemplate">下载模板</el-link>
</div> </div>
</el-upload> </el-upload>
<div slot="footer" class="dialog-footer"> <div slot="footer" class="dialog-footer">
<el-button type="primary" @click="submitFileForm"> </el-button> <el-button type="primary" @click="submitFileForm"> </el-button>
<el-button @click="upload.open = false"> </el-button> <el-button @click="upload.open = false"> </el-button>
</div> </div>
</el-dialog> </el-dialog>
</div> </div>
</template> </template>
<script> <script>
import { getToken } from "@/utils/auth";
import { getXfcyglPage, addXfcygl, updateXfcygl, deleteXfcygl } from "@/api/ManageApi/index"; import { getXfcyglPage, addXfcygl, updateXfcygl, deleteXfcygl } from "@/api/ManageApi/index";
import fileload from "@/components/FileUpload/index.vue" import fileload from "@/components/FileUpload/index.vue"
@ -191,17 +192,12 @@ export default {
}, },
// //
form: { form: {
id: undefined,
cyxf: undefined, cyxf: undefined,
cylb: undefined, cylb: undefined,
ycljschj: undefined, ycljschj: undefined,
slsyx: undefined, slsyx: undefined,
createBy: undefined, endTime:undefined,
createId: undefined, startTime:undefined
createTime: undefined,
updateBy: undefined,
updateId: undefined,
updateTime: undefined
}, },
// //
rules: { rules: {
@ -245,7 +241,7 @@ export default {
headers: { Authorization: "Bearer " + getToken() }, headers: { Authorization: "Bearer " + getToken() },
// //
// url: process.env.VUE_APP_BASE_API + "/tc/assetCurrent/import" // url: process.env.VUE_APP_BASE_API + "/tc/assetCurrent/import"
url: location.origin + "/gysl/xfcygl/exportXfcy", url: location.origin + "/gysl/xfcygl/imporXfcy",
}, },
}; };
}, },
@ -253,6 +249,16 @@ export default {
this.getList(); this.getList();
}, },
methods: { methods: {
/**导出 */
handleExport() {
this.download(
"/gysl/xfcygl/exportXfcy",
{
...this.form,
},
`细分产业管理${new Date().getTime()}.xlsx`
);
},
querySearchAsync(queryString, cb) { querySearchAsync(queryString, cb) {
let results = []; let results = [];

@ -15,12 +15,7 @@
<Message2 /> <Message2 />
</div> </div>
</div> </div>
<div class="grid-item item-1"> <div class="grid-item bottombox">
<!-- 整体项目情况 -->
<div class="allarea">
</div>
</div>
<div class="grid-item item-2 bottombox">
<!-- 关联项目 --> <!-- 关联项目 -->
<div class="itemhead"> <div class="itemhead">
<span>关联项目</span> <span>关联项目</span>
@ -43,7 +38,7 @@
</div> </div>
</div> </div>
<div class="grid-item item-2"> <div class="grid-item item-2">
<!-- 消息通知 --> <!-- 我的待办 -->
<div class="itemhead"> <div class="itemhead">
<span>我的待办</span> <span>我的待办</span>
</div> </div>
@ -104,9 +99,9 @@ export default {
}, },
getStatusClass(status) { getStatusClass(status) {
const statusClasses = { const statusClasses = {
1: 'status-red', // 1: 'status-red',
2: 'status-yellow', // 2: 'status-yellow',
3: 'status-green' // 3: 'status-green'
}; };
return statusClasses[status] || ''; return statusClasses[status] || '';
}, },
@ -129,7 +124,7 @@ export default {
<style scoped> <style scoped>
.grid-container { .grid-container {
display: grid; display: grid;
grid-template-columns: repeat(3, 1fr); grid-template-columns: repeat(2, 1fr);
/* 三列 */ /* 三列 */
grid-template-rows: auto auto auto; grid-template-rows: auto auto auto;
/* 三行 */ /* 三行 */
@ -144,8 +139,10 @@ export default {
border-radius: 0.5rem 0.5rem 0.5rem 0.5rem; border-radius: 0.5rem 0.5rem 0.5rem 0.5rem;
} }
.item-2{
width: auto;
}
.itemhead { .itemhead {
width: 100%;
border-left: 0.25rem solid #2B62F1; border-left: 0.25rem solid #2B62F1;
margin: 0.94rem 0; margin: 0.94rem 0;
height: 1.25rem; height: 1.25rem;
@ -182,8 +179,8 @@ export default {
} }
.allarea { .allarea {
width: 80rem; width: auto;
height: 14.5rem; height: auto;
padding: 1rem 1.5rem; padding: 1rem 1.5rem;
} }

@ -31,14 +31,14 @@ module.exports = {
// webpack-dev-server 相关配置 // webpack-dev-server 相关配置
devServer: { devServer: {
host: '0.0.0.0', host: '0.0.0.0',
// public:'192.168.0.119', public:'192.168.0.119',
port: port, port: port,
open: true, open: true,
proxy: { proxy: {
// detail: https://cli.vuejs.org/config/#devserver-proxy // detail: https://cli.vuejs.org/config/#devserver-proxy
[process.env.VUE_APP_BASE_API]: { [process.env.VUE_APP_BASE_API]: {
// target: `http://192.168.0.112:7071/`, target: `http://192.168.0.112:7071/`,
target: `http://39.101.188.84:7071/`, // target: `http://39.101.188.84:7071/`,
changeOrigin: true, changeOrigin: true,
pathRewrite: { pathRewrite: {
['^' + process.env.VUE_APP_BASE_API]: '' ['^' + process.env.VUE_APP_BASE_API]: ''

Loading…
Cancel
Save