产业标签详情

xuhongjie
严飞永 2 weeks ago
parent b553ae530a
commit b7dcb89468

@ -93,7 +93,7 @@ export default {
wysmxInfo: {
immediate: true,
handler(newVal) {
console.log('接收到的 wysmxInfo 数据:', newVal);
// console.log(' wysmxInfo :', newVal);
this.form = newVal.map(item => ({
// id: item.id,
xmId: item.xmId,

@ -87,7 +87,7 @@ export default {
}
},
created() {
console.log('anotherInfo 内容:', this.anotherInfo);
// console.log('anotherInfo :', this.anotherInfo);
},
data() {
return {
@ -213,7 +213,7 @@ export default {
try {
// xmId
console.log('当前项目ID:', this.xmId);
// console.log('ID:', this.xmId);
//
const requestData = {

@ -94,7 +94,7 @@ export default {
endTime: this.queryParams.dateRange ? this.queryParams.dateRange[1] : undefined
};
console.log('【查询参数】', params); //
// console.log('', params);
getBasicInformationPage(params).then((response) => {
this.postList = response.data.records;

@ -1,284 +0,0 @@
<template>
<div>
<!-- 政务端页面 -->
<!-- 表单查询项 -->
<div class="headerbox">
<el-form :model="queryParams" ref="queryForm" size="small" :inline="true" v-show="showSearch"
label-width="200">
<el-row>
<el-col :span="5">
<el-form-item label="项目名称" style="width: 100%;">
<el-input v-model="queryParams.name" placeholder="请输入项目名称" clearable
@keyup.enter.native="handleQuery" />
</el-form-item>
</el-col>
</el-row>
</el-form>
</div>
<!-- 表格内容区 -->
<div class="tablebox">
<el-table v-loading="loading" :data="postList" @selection-change="handleSelectionChange" stripe>
<el-table-column type="selection" width="55" align="center" />
<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" width="200" />
<el-table-column label="现状分类" align="center" prop="xzfl">
<template slot-scope="scope">
<span>{{ xzflMap[scope.row.xzfl] }}</span>
</template>
</el-table-column>
<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">
<template slot-scope="scope">
{{ formatMonth(scope.row.begainTime) }} {{ formatMonth(scope.row.endTime) }}
</template>
</el-table-column>
<el-table-column label="总投资额(万元)" align="center" width="130" prop="ztze" />
<el-table-column label="总用地面积(平方米)" align="center" width="180" 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>
<pagination v-show="total > 0" :total="total" :page.sync="queryParams.current"
:limit.sync="queryParams.size" @pagination="getList" />
</div>
</div>
</template>
<script>
import { getBasicInformationPage, deleteBasicInformation } from "@/api/ManageApi/index";
import { getToken } from "@/utils/auth";
import { checkPermi, checkRole } from "@/utils/permission";
export default {
dicts: ["xzfl"],
data() {
return {
//
loading: true,
//
ids: [],
//
single: true,
//
multiple: true,
//
showSearch: true,
//
total: 0,
//
postList: [],
//
statusColors: {
'审核通过': '#6EDABE',
'待填报': '#FFBF6B',
'待审核': '#7693D8'
},
//
statusMap: {
1: '待填报',
2: '待审核',
3: '审核通过'
},
xzflMap: {
1: '已建',
2: '在建',
3: '拟建'
},
//
queryParams: {
current: 1,
size: 10,
xzfl: undefined,
name: undefined,
xmfrdwxz: undefined,
startTime: undefined,
endTime: undefined,
status: undefined
},
//
upload: {
open: false, //
isUploading: false, //
updateSupport: 0, //
headers: { Authorization: "Bearer " + getToken() }, //
url: process.env.VUE_APP_BASE_API + "/gysl/basicInformation/import", //
},
};
},
created() {
this.getList();
},
methods: {
checkPermi,
checkRole,
/** 格式化月份显示 */
formatMonth(dateStr) {
if (!dateStr) return '';
// YYYY-MM
if (/^\d{4}-\d{2}$/.test(dateStr)) return dateStr;
// YYYY-MM-DD 7
if (/^\d{4}-\d{2}-\d{2}$/.test(dateStr)) return dateStr.substring(0, 7);
return dateStr;
},
/** 查询项目列表 */
getList() {
this.loading = true;
//
const params = {
...this.queryParams,
begainTime: this.formatMonth(this.queryParams.begainTime),
endTime: this.formatMonth(this.queryParams.endTime)
};
console.log('发送前的查询参数:', JSON.stringify(params, null, 2));
getBasicInformationPage(params).then((response) => {
console.log('API响应:', response);
this.postList = response.data.records;
this.total = response.data.total;
this.loading = false;
}).catch(error => {
console.error('API请求错误:', error);
console.error('错误详情:', error.response);
this.loading = false;
});
},
/** 导入按钮操作 */
handleImport() {
this.upload.open = true;
},
/** 下载模板操作 */
importTemplate() {
this.download(
"/gysl/basicInformation/importTemplate",
{},
`项目导入模板${new Date().getTime()}.xlsx`
);
},
handleSelectionChange(selection) {
this.ids = selection.map(item => item.id);
this.single = selection.length !== 1;
this.multiple = !selection.length;
},
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();
},
/** 导出按钮操作 */
handleExport() {
this.download(
"/gysl/basicInformation/exportInfo",
{
idList: this.ids[0]
},
`基本信息${new Date().getTime()}.xlsx`
);
},
/** 删除按钮操作 */
handleDelete(row) {
const ids = row.id || this.ids;
this.$modal
.confirm('是否确认删除项目id为"' + ids + '"的数据项?')
.then(() => {
return deleteBasicInformation(ids);
})
.then(() => {
this.getList();
this.$modal.msgSuccess("删除成功");
})
.catch(() => { });
},
/** 详情按钮操作 */
getAdd(row, type) {
this.$store.commit("SET_CRUMBS", this.$route.meta.title + "新增");
const id = row.id || this.ids[0];
this.$router.push({ path: `/manage-add/${id}`, query: { action: type } });
},
/** 重置按钮操作 */
resetQuery() {
this.queryParams = {
current: 1,
size: 10,
xzfl: undefined,
name: undefined,
xmfrdwxz: undefined,
begainTime: undefined,
endTime: undefined,
status: undefined,
};
this.getList();
},
/** 搜索按钮操作 */
handleQuery() {
this.queryParams.current = 1;
this.getList();
},
},
};
</script>
<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;
}
.headbtn {
display: flex;
}
.tablebtntwo {
margin-top: 1rem;
margin-bottom: 1rem;
}
</style>

@ -119,7 +119,7 @@ export default {
endTime: this.queryParams.dateRange ? this.queryParams.dateRange[1] : undefined
};
console.log('【查询参数】', params); //
// console.log('', params);
getBasicInformationPage(params).then((response) => {
this.postList = response.data.records;

@ -194,7 +194,7 @@ export default {
endTime: this.queryParams.dateRange ? this.queryParams.dateRange[1] : undefined
};
console.log('【查询参数】', params); //
// console.log('', params);
getBasicInformationPage(params).then((response) => {
this.postList = response.data.records;

@ -223,7 +223,7 @@ export default {
endTime: this.formatMonth(this.queryParams.endTime)
};
console.log('发送前的查询参数:', JSON.stringify(params, null, 2));
// console.log(':', JSON.stringify(params, null, 2));
getBasicInformationPage(params).then((response) => {
console.log('API响应:', response);

@ -291,7 +291,7 @@ export default {
tempBasicInformation(tempData)
.then(response => {
this.$message.success('暂存成功');
console.log('暂存数据:', response);
// console.log(':', response);
})
.catch(error => {
this.$message.error('暂存失败');
@ -308,7 +308,7 @@ export default {
const response = await getqyBasicInformationPage(params);
return response.data.total || 0; // 0
} catch (error) {
console.error('获取企业总数失败:', error);
// console.error(':', error);
return 0;
}
},

@ -69,15 +69,15 @@
<!-- 详情弹窗 -->
<el-dialog title="详情" :visible.sync="dialogVisible" width="50%">
<el-form :model="detailData" label-width="120px">
<el-form :model="detailData" label-width="200px">
<el-row>
<el-col :span="12">
<el-form-item label="企业名称">
<el-form-item label="企业名称:">
<span>{{ detailData.name }}</span>
</el-form-item>
</el-col>
<el-col :span="12">
<el-form-item label="统一信用代码">
<el-form-item label="统一信用代码:">
<span>{{ detailData.tyshxydm }}</span>
</el-form-item>
</el-col>
@ -85,12 +85,12 @@
<el-row>
<el-col :span="12">
<el-form-item label="标签标记场景代码">
<el-form-item label="标签标记场景代码:">
<span>{{ detailData.bqdm }}</span>
</el-form-item>
</el-col>
<el-col :span="12">
<el-form-item label="标签代码">
<el-form-item label="标签代码:">
<span>{{ detailData.state }}</span>
</el-form-item>
</el-col>
@ -98,12 +98,38 @@
<el-row>
<el-col :span="12">
<el-form-item label="用户类型">
<el-form-item label="标签值编码:">
<span>{{ detailData.yhlx }}</span>
</el-form-item>
</el-col>
<el-col :span="12">
<el-form-item label="标签注释">
<el-form-item label="有效状态:">
<span>{{ detailData.bqzs }}</span>
</el-form-item>
</el-col>
</el-row>
<el-row>
<el-col :span="12">
<el-form-item label="标签注释:">
<span>{{ detailData.bqzt }}</span>
</el-form-item>
</el-col>
<el-col :span="12">
<el-form-item label="用户类型:">
<span>{{ detailData.bqzs }}</span>
</el-form-item>
</el-col>
</el-row>
<el-row>
<el-col :span="12">
<el-form-item label="标签标记用户:">
<span>{{ detailData.bqzt }}</span>
</el-form-item>
</el-col>
<el-col :span="12">
<el-form-item label="标签标记单位:">
<span>{{ detailData.bqzs }}</span>
</el-form-item>
</el-col>
@ -111,12 +137,12 @@
<el-row>
<el-col :span="12">
<el-form-item label="标签状态">
<el-form-item label="标签状态">
<span>{{ detailData.bqzt }}</span>
</el-form-item>
</el-col>
<el-col :span="12">
<el-form-item label="标签注释">
<el-form-item label="数据来源名称:">
<span>{{ detailData.bqzs }}</span>
</el-form-item>
</el-col>
@ -173,7 +199,7 @@ export default {
tyshxydm: '123456789012345678',
bqdm: 'DEFAULT',
state: '有效',
yhlx: '默认用户类型',
yhlx: '企业用户',
bqzs: '默认标签注释',
bqzt: '默认标签状态'
}

@ -1,47 +0,0 @@
upload: {
open: false,
isUploading: false,
headers: { Authorization: "Bearer " + getToken() },
url: process.env.VUE_APP_BASE_API + "/gysl/ml/importMl"
}
/** 导出按钮操作 */
handleExport() {
console.log('【导出参数】', JSON.stringify(this.queryParams, null, 2));
this.$modal.confirm('确认导出所有数据?').then(() => {
return exportCatalog(this.queryParams);
}).then(response => {
this.download(response.msg);
}).catch(error => {
console.error('导出失败:', error);
});
},
/** 导入按钮操作 */
handleImport() {
this.upload.open = true;
},
/** 下载模板操作 */
importTemplate() {
this.download("/gysl/ml/importTemplate", {}, `目录导入模板_${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(response.msg, "导入结果", { dangerouslyUseHTMLString: true });
this.getList();
},
//
submitFileForm() {
this.$refs.upload.submit();
}
Loading…
Cancel
Save