|
@@ -9,80 +9,96 @@
|
|
|
用户仅需提交必要评估物数据和测算数据,由平台自动生成商业级评估报告。
|
|
|
</p>
|
|
|
</div>
|
|
|
- <div class="option">
|
|
|
- <div class="create-btn">
|
|
|
- <button class="cssbuttons-io-button" @click="goto('house/parent')">
|
|
|
- 房地产
|
|
|
- <div class="icon">
|
|
|
- <svg height="24" width="24" viewBox="0 0 24 24" xmlns="http://www.w3.org/2000/svg">
|
|
|
- <path d="M0 0h24v24H0z" fill="none"></path>
|
|
|
- <path d="M16.172 11l-5.364-5.364 1.414-1.414L20 12l-7.778 7.778-1.414-1.414L16.172 13H4v-2z"
|
|
|
- fill="currentColor"></path>
|
|
|
- </svg>
|
|
|
- </div>
|
|
|
- </button>
|
|
|
- <button class="cssbuttons-io-button" @click="goto('assets/parent')">
|
|
|
- 资产
|
|
|
- <div class="icon">
|
|
|
- <svg height="24" width="24" viewBox="0 0 24 24" xmlns="http://www.w3.org/2000/svg">
|
|
|
- <path d="M0 0h24v24H0z" fill="none"></path>
|
|
|
- <path d="M16.172 11l-5.364-5.364 1.414-1.414L20 12l-7.778 7.778-1.414-1.414L16.172 13H4v-2z"
|
|
|
- fill="currentColor"></path>
|
|
|
- </svg>
|
|
|
- </div>
|
|
|
- </button>
|
|
|
- <button class="cssbuttons-io-button" @click="goto('planning')">
|
|
|
- 土地
|
|
|
- <div class="icon">
|
|
|
- <svg height="24" width="24" viewBox="0 0 24 24" xmlns="http://www.w3.org/2000/svg">
|
|
|
- <path d="M0 0h24v24H0z" fill="none"></path>
|
|
|
- <path d="M16.172 11l-5.364-5.364 1.414-1.414L20 12l-7.778 7.778-1.414-1.414L16.172 13H4v-2z"
|
|
|
- fill="currentColor"></path>
|
|
|
- </svg>
|
|
|
- </div>
|
|
|
- </button>
|
|
|
- </div>
|
|
|
- <div class="example-list">
|
|
|
- <el-card class="report-item no-border" shadow="never" v-for="(doc, id) in page">
|
|
|
- <div class="report-icon">
|
|
|
- <img :src="docLog(doc.docType)" style="width: 52px; height: 52px;" />
|
|
|
- </div>
|
|
|
- <div class="report-text">
|
|
|
- <div>
|
|
|
- <span class="report-text-type">{{ doc.businessType + doc.businessCate + '【' + doc.docNo + '】' }}</span>
|
|
|
- <span> 一 </span>
|
|
|
- <span class="report-text-name">{{ doc.docName }}</span>
|
|
|
+ <div style="display:flex;">
|
|
|
+ <div class="option" style="display: inline-block">
|
|
|
+ <div class="create-btn">
|
|
|
+ <button class="cssbuttons-io-button" @click="goto('house/parent')">
|
|
|
+ 房地产
|
|
|
+ <div class="icon">
|
|
|
+ <svg height="24" width="24" viewBox="0 0 24 24" xmlns="http://www.w3.org/2000/svg">
|
|
|
+ <path d="M0 0h24v24H0z" fill="none"></path>
|
|
|
+ <path d="M16.172 11l-5.364-5.364 1.414-1.414L20 12l-7.778 7.778-1.414-1.414L16.172 13H4v-2z" fill="currentColor"></path>
|
|
|
+ </svg>
|
|
|
+ </div>
|
|
|
+ </button>
|
|
|
+ <button class="cssbuttons-io-button" @click="goto('assets/parent')">
|
|
|
+ 资产
|
|
|
+ <div class="icon">
|
|
|
+ <svg height="24" width="24" viewBox="0 0 24 24" xmlns="http://www.w3.org/2000/svg">
|
|
|
+ <path d="M0 0h24v24H0z" fill="none"></path>
|
|
|
+ <path d="M16.172 11l-5.364-5.364 1.414-1.414L20 12l-7.778 7.778-1.414-1.414L16.172 13H4v-2z" fill="currentColor"></path>
|
|
|
+ </svg>
|
|
|
</div>
|
|
|
- <div style="padding-top: 5px;">
|
|
|
- <span>
|
|
|
- <el-icon>
|
|
|
- <Avatar />
|
|
|
- </el-icon>
|
|
|
- {{ doc.consignor }}</span>
|
|
|
- <span>
|
|
|
- <el-tag style="margin-left: 5px;">
|
|
|
- {{ doc.businessType }}
|
|
|
- </el-tag>
|
|
|
- <el-tag style="margin-left: 5px;" type="success">
|
|
|
- {{ doc.businessCate }}
|
|
|
- </el-tag>
|
|
|
- </span>
|
|
|
- <span style="float: right; color:darkgrey">
|
|
|
- {{ doc.updateTime }}
|
|
|
- </span>
|
|
|
+ </button>
|
|
|
+ <button class="cssbuttons-io-button" @click="goto('planning')">
|
|
|
+ 土地
|
|
|
+ <div class="icon">
|
|
|
+ <svg height="24" width="24" viewBox="0 0 24 24" xmlns="http://www.w3.org/2000/svg">
|
|
|
+ <path d="M0 0h24v24H0z" fill="none"></path>
|
|
|
+ <path d="M16.172 11l-5.364-5.364 1.414-1.414L20 12l-7.778 7.778-1.414-1.414L16.172 13H4v-2z" fill="currentColor"></path>
|
|
|
+ </svg>
|
|
|
</div>
|
|
|
+ </button>
|
|
|
+ </div>
|
|
|
+ <div class="example-list" style="min-height:500px;">
|
|
|
+ <div class="input-container">
|
|
|
+ <el-input v-model="listQuery.docName" style="max-width: 300px; margin-bottom: 10px;" placeholder="关键字搜索" class="input-with-select">
|
|
|
+ <template #append>
|
|
|
+ <el-button type="primary" @click="getDocuments()"><el-icon color="#ff6154"><Search /></el-icon></el-button>
|
|
|
+ </template>
|
|
|
+ </el-input>
|
|
|
</div>
|
|
|
- <div class="report-button">
|
|
|
- <el-icon>
|
|
|
- <Download />
|
|
|
- </el-icon>
|
|
|
+ <div class="dayChoice_div">
|
|
|
+ <el-button link style="border:0;width:10px;margin-right: 10px;" @click="activeBtn--, choiceDay(activeBtn)" :disabled="activeBtn <= 0"><el-icon>
|
|
|
+ <Back />
|
|
|
+ </el-icon></el-button>
|
|
|
+ <el-button v-for="(item, index) in days" :key="index" text :class="{ show: index === activeBtn }" style="border:0;width:10px;margin:0" @click="choiceDay(index)">{{ item.id }}</el-button>
|
|
|
+ <el-button link style="border:0;width:10px" @click="activeBtn++, choiceDay(activeBtn)" :disabled="activeBtn >= (days.length - 1)"><el-icon>
|
|
|
+ <Right />
|
|
|
+ </el-icon></el-button>
|
|
|
</div>
|
|
|
- </el-card>
|
|
|
+ <el-card class="report-item no-border" shadow="never" v-for="(doc, id) in page">
|
|
|
+ <div class="report-icon">
|
|
|
+ <img :src="docLog(doc.docType)" style="width: 52px; height: 52px;" />
|
|
|
+ </div>
|
|
|
+ <div class="report-text">
|
|
|
+ <div>
|
|
|
+ <span class="report-text-type">{{ doc.businessType + doc.businessCate + '【' + doc.docNo + '】' }}</span>
|
|
|
+ <span> 一 </span>
|
|
|
+ <span class="report-text-name">{{ doc.docName }}</span>
|
|
|
+ </div>
|
|
|
+ <div style="padding-top: 5px;">
|
|
|
+ <span>
|
|
|
+ <el-icon>
|
|
|
+ <Avatar />
|
|
|
+ </el-icon>
|
|
|
+ {{ doc.consignor }}</span>
|
|
|
+ <span>
|
|
|
+ <el-tag style="margin-left: 5px;">
|
|
|
+ {{ doc.businessType }}
|
|
|
+ </el-tag>
|
|
|
+ <el-tag style="margin-left: 5px;" type="success">
|
|
|
+ {{ doc.businessCate }}
|
|
|
+ </el-tag>
|
|
|
+ </span>
|
|
|
+ <span style="float: right; color:darkgrey">
|
|
|
+ {{ doc.updateTime }}
|
|
|
+ </span>
|
|
|
+ </div>
|
|
|
+ </div>
|
|
|
+ <div class="report-button" @click="downloadFile(doc.docUrl, doc.docName)">
|
|
|
+ <el-icon>
|
|
|
+ <Download />
|
|
|
+ </el-icon>
|
|
|
+ </div>
|
|
|
+ </el-card>
|
|
|
+ </div>
|
|
|
</div>
|
|
|
+ <el-tree ref="treeDataYear" style="width: 300px;display: inline-block;margin-top: 10px;margin-left:20px" :data="treeDataYear" accordion node-key="id" highlight-current :default-expanded-keys="[1]" :default-checked-keys="[101]" icon="none" :check-on-click-node="true" @node-click="nodeClick" />
|
|
|
</div>
|
|
|
+
|
|
|
<div class="pagination">
|
|
|
- <el-pagination background layout="prev, pager, next" style="--el-color-primary: #ff6154"
|
|
|
- :page-count="listQuery.pages" v-model:current-page="listQuery.current" @current-change="getDocuments" />
|
|
|
+ <el-pagination background layout="prev, pager, next" style="--el-color-primary: #ff6154" :page-count="listQuery.pages" v-model:current-page="listQuery.current" @current-change="getDocuments" />
|
|
|
</div>
|
|
|
</div>
|
|
|
</div>
|
|
@@ -97,30 +113,213 @@ import documentProduction from '@/api/documentProduction';
|
|
|
import wordLog from '../../assets/icons/word.png'
|
|
|
import excelLog from '../../assets/icons/excel.png'
|
|
|
import folderLog from '../../assets/icons/folder.png'
|
|
|
+import fileUtil from '@/utils/file'
|
|
|
|
|
|
export default {
|
|
|
data() {
|
|
|
return {
|
|
|
+ activeBtn: 0,
|
|
|
+ days: [],
|
|
|
+ treeDataYear: [],
|
|
|
page: [],
|
|
|
listQuery: {
|
|
|
current: 1,
|
|
|
size: 10,
|
|
|
pages: null,
|
|
|
- total: null
|
|
|
+ total: null,
|
|
|
+ createDate: null,
|
|
|
+ docName: null
|
|
|
}
|
|
|
}
|
|
|
},
|
|
|
+ mounted() {
|
|
|
+ // 使用$nextTick 等页面加载完毕之后,再选中tree组件默认节点,防止加载顺序问题
|
|
|
+ this.$nextTick(function () {
|
|
|
+ // 这行会生效
|
|
|
+ let childrenIndex = 0;
|
|
|
+ // 默认拿当前月份
|
|
|
+ switch (new Date().getMonth() + 1) {
|
|
|
+ case 12:
|
|
|
+ childrenIndex = 0;
|
|
|
+ break;
|
|
|
+ case 11:
|
|
|
+ childrenIndex = 1;
|
|
|
+ break;
|
|
|
+ case 10:
|
|
|
+ childrenIndex = 2;
|
|
|
+ break;
|
|
|
+ case 9:
|
|
|
+ childrenIndex = 3;
|
|
|
+ break;
|
|
|
+ case 8:
|
|
|
+ childrenIndex = 4;
|
|
|
+ break;
|
|
|
+ case 7:
|
|
|
+ childrenIndex = 5;
|
|
|
+ break;
|
|
|
+ case 6:
|
|
|
+ childrenIndex = 6;
|
|
|
+ break;
|
|
|
+ case 5:
|
|
|
+ childrenIndex = 7;
|
|
|
+ break;
|
|
|
+ case 4:
|
|
|
+ childrenIndex = 8;
|
|
|
+ break;
|
|
|
+ case 3:
|
|
|
+ childrenIndex = 9;
|
|
|
+ break;
|
|
|
+ case 2:
|
|
|
+ childrenIndex = 10;
|
|
|
+ break;
|
|
|
+ case 1:
|
|
|
+ childrenIndex = 11;
|
|
|
+ break;
|
|
|
+ }
|
|
|
+ this.$refs.treeDataYear.setCurrentKey(this.treeDataYear[0].children[childrenIndex].id);
|
|
|
+ this.setDay(this.$refs.treeDataYear.getCurrentNode())
|
|
|
+ });
|
|
|
+ },
|
|
|
computed: {
|
|
|
// 非setup语法,需要使用mapStores()才能访问
|
|
|
// 直接放在生命周期函数也可以访问,但是似乎会导致持久化失效,没找到解决办法,建议还是用mapStores
|
|
|
// 名字会变成id + 'Store' 的形式,比如id本来是user,那么这种方式使用就需要变成this.userStore.xxx
|
|
|
- ...mapStores(useUserStore),
|
|
|
+ ...mapStores(useUserStore)
|
|
|
},
|
|
|
created() {
|
|
|
this.login();
|
|
|
- this.getDocuments();
|
|
|
+ // this.getDocuments();
|
|
|
+ this.setYearMonth();
|
|
|
},
|
|
|
methods: {
|
|
|
+ nodeClick(node) {
|
|
|
+ this.setDay(node);
|
|
|
+ },
|
|
|
+ choiceDay(index) {
|
|
|
+ this.activeBtn = index;
|
|
|
+ this.listQuery.createDate = this.days[index].date;
|
|
|
+ this.getDocuments();
|
|
|
+ },
|
|
|
+ // 设置横向的天数
|
|
|
+ setDay(node) {
|
|
|
+ this.days = [];
|
|
|
+ if (node.year) {
|
|
|
+ // 计算是平年还是闰年
|
|
|
+ let dayLength = 31;
|
|
|
+ if ((node.year % 4 === 0 && node.year % 100 !== 0) || (node.year % 400 === 0)) {
|
|
|
+ // 闰年且二月
|
|
|
+ if (node.month === 2) {
|
|
|
+ dayLength = 28;
|
|
|
+ } else if ([1, 3, 5, 7, 8, 10, 12].includes(node.month)) {
|
|
|
+ dayLength = 31;
|
|
|
+ } else {
|
|
|
+ dayLength = 30;
|
|
|
+ }
|
|
|
+ } else {
|
|
|
+ if (node.month === 2) {
|
|
|
+ dayLength = 29;
|
|
|
+ } else if ([1, 3, 5, 7, 8, 10, 12].includes(node.month)) {
|
|
|
+ dayLength = 31;
|
|
|
+ } else {
|
|
|
+ dayLength = 30;
|
|
|
+ }
|
|
|
+ }
|
|
|
+ for (let index = 1; index <= dayLength; index++) {
|
|
|
+ this.days.push({ id: index, date: node.year + '-' + node.month + '-' + index });
|
|
|
+ }
|
|
|
+ }
|
|
|
+ // 默认选中当前月的第一天
|
|
|
+ this.choiceDay(0)
|
|
|
+ },
|
|
|
+ // 设置tree组件节点
|
|
|
+ setYearMonth() {
|
|
|
+ const currentYear = new Date().getFullYear(); // 获取当前年份
|
|
|
+ let idVal = 100;
|
|
|
+ for (let i = 0; i < 10; i++) {
|
|
|
+ const month = [{
|
|
|
+ id: null,
|
|
|
+ label: '十二月',
|
|
|
+ year: null,
|
|
|
+ month: null
|
|
|
+ },
|
|
|
+ {
|
|
|
+ id: null,
|
|
|
+ label: '十一月',
|
|
|
+ year: null,
|
|
|
+ month: null
|
|
|
+ },
|
|
|
+ {
|
|
|
+ id: null,
|
|
|
+ label: '十月',
|
|
|
+ year: null,
|
|
|
+ month: null
|
|
|
+ },
|
|
|
+ {
|
|
|
+ id: null,
|
|
|
+ label: '九月',
|
|
|
+ year: null,
|
|
|
+ month: null
|
|
|
+ },
|
|
|
+ {
|
|
|
+ id: null,
|
|
|
+ label: '八月',
|
|
|
+ year: null,
|
|
|
+ month: null
|
|
|
+ },
|
|
|
+ {
|
|
|
+ id: null,
|
|
|
+ label: '七月',
|
|
|
+ year: null,
|
|
|
+ month: null
|
|
|
+ },
|
|
|
+ {
|
|
|
+ id: null,
|
|
|
+ label: '六月',
|
|
|
+ year: null,
|
|
|
+ month: null
|
|
|
+ },
|
|
|
+ {
|
|
|
+ id: null,
|
|
|
+ label: '五月',
|
|
|
+ year: null,
|
|
|
+ month: null
|
|
|
+ },
|
|
|
+ {
|
|
|
+ id: null,
|
|
|
+ label: '四月',
|
|
|
+ year: null,
|
|
|
+ month: null
|
|
|
+ },
|
|
|
+ {
|
|
|
+ id: null,
|
|
|
+ label: '三月',
|
|
|
+ year: null,
|
|
|
+ month: null
|
|
|
+ },
|
|
|
+ {
|
|
|
+ id: null,
|
|
|
+ label: '二月',
|
|
|
+ year: null,
|
|
|
+ month: null
|
|
|
+ },
|
|
|
+ {
|
|
|
+ id: null,
|
|
|
+ label: '一月',
|
|
|
+ year: null,
|
|
|
+ month: null
|
|
|
+ }];
|
|
|
+ let m = 12;
|
|
|
+ for (let n = 1; n <= month.length; n++) {
|
|
|
+ // 设置id
|
|
|
+ month[n - 1].id = n + idVal;
|
|
|
+ // 设置节点的年月
|
|
|
+ month[n - 1].year = currentYear - i;
|
|
|
+ month[n - 1].month = m--;
|
|
|
+ }
|
|
|
+ this.treeDataYear.push({ id: i + 1, label: currentYear - i, children: month })
|
|
|
+ idVal = idVal + 100;
|
|
|
+ }
|
|
|
+ },
|
|
|
goto(path) {
|
|
|
this.$router.push(`/home/${path}`)
|
|
|
},
|
|
@@ -137,7 +336,7 @@ export default {
|
|
|
for (var i = 0; i < cs_arr.length; i++) { //遍历数组,拿到json对象
|
|
|
params[cs_arr[i].split('=')[0]] = cs_arr[i].split('=')[1]
|
|
|
}
|
|
|
-
|
|
|
+
|
|
|
let token = params.token;
|
|
|
if (token) {
|
|
|
loginByOAInfo(token).then(res => {
|
|
@@ -167,7 +366,19 @@ export default {
|
|
|
default:
|
|
|
return wordLog;
|
|
|
}
|
|
|
-
|
|
|
+ },
|
|
|
+ // 下载文件
|
|
|
+ downloadFile(docUrl, docName) {
|
|
|
+ if (docUrl && docName) {
|
|
|
+ let downloadUrl = '/file/download?fileDiskPath=' + docUrl + '&fileName=' + docName
|
|
|
+ fileUtil.download(downloadUrl);
|
|
|
+ } else {
|
|
|
+ ElMessage({
|
|
|
+ showClose: true,
|
|
|
+ message: '文档还未生成,请完成生成步骤!',
|
|
|
+ type: 'warning'
|
|
|
+ })
|
|
|
+ }
|
|
|
}
|
|
|
|
|
|
}
|
|
@@ -175,6 +386,39 @@ export default {
|
|
|
}
|
|
|
</script>
|
|
|
<style scoped>
|
|
|
+:deep(.el-input__wrapper.is-focus) {
|
|
|
+ --el-input-focus-border: #ff6154;
|
|
|
+ --el-input-focus-border-color: #ff6154;
|
|
|
+}
|
|
|
+:deep(.el-button--text:hover) {
|
|
|
+ color: #ff6154;
|
|
|
+}
|
|
|
+
|
|
|
+:deep(.el-button--text) {
|
|
|
+ color: #ff6154;
|
|
|
+}
|
|
|
+.input-container {
|
|
|
+ display: flex; /* 使用 Flexbox 布局 */
|
|
|
+ justify-content: flex-end; /* 右对齐 */
|
|
|
+}
|
|
|
+.show {
|
|
|
+ color: #ff6154;
|
|
|
+ background-color: #FDF0EE;
|
|
|
+}
|
|
|
+
|
|
|
+.dayChoice_div {
|
|
|
+ height: 45px;
|
|
|
+ /* 灰色边框线 */
|
|
|
+ border: 1px solid #cccccc;
|
|
|
+ /* 圆角 */
|
|
|
+ border-radius: 10px;
|
|
|
+ line-height: 38px;
|
|
|
+ text-align: center;
|
|
|
+ padding-left: 10px;
|
|
|
+ padding-right: 10px;
|
|
|
+ margin-bottom: 20px;
|
|
|
+}
|
|
|
+
|
|
|
.base {
|
|
|
min-height: calc(100vh - 80px);
|
|
|
width: 100%;
|
|
@@ -285,6 +529,24 @@ p {
|
|
|
justify-content: center;
|
|
|
display: flex;
|
|
|
}
|
|
|
-</style>
|
|
|
|
|
|
|
|
|
+:deep(.el-tree-node__content:hover) {
|
|
|
+ border-radius: 5px;
|
|
|
+ color: #ff6154;
|
|
|
+ background-color: #FDF0EE !important;
|
|
|
+}
|
|
|
+
|
|
|
+:deep(v-deep .el-tree-node.is-current>.el-tree-node__content) {
|
|
|
+ margin: 5px;
|
|
|
+ border-radius: 5px;
|
|
|
+ color: #ff6154;
|
|
|
+ background-color: #FDF0EE !important;
|
|
|
+}
|
|
|
+
|
|
|
+:deep(.el-tree--highlight-current .el-tree-node.is-current>.el-tree-node__content) {
|
|
|
+ border-radius: 5px;
|
|
|
+ color: #ff6154;
|
|
|
+ background-color: #FDF0EE !important;
|
|
|
+}
|
|
|
+</style>
|