+
+
@@ -75,11 +76,11 @@
>新增
-
+
-
+
{{ scope.$index + 1 }}
@@ -103,13 +104,13 @@
删除
-
+ handleCommand(command, scope.$index, scope.row)">
更多
- 查看详情
- 下载
@@ -130,6 +131,7 @@
+
@@ -139,12 +141,15 @@ import { getArchivesCatalogList, removeArchivesRoleAndDict } from '@/api/company
import {queryArchivesPage, removeArchivesById} from '@/api/company/archives/archives'
import ArchivesCatalogForm from '@/views/knowledge/views/archives/form/ArchivesCatalogForm'
import ArchivesForm from '@/views/knowledge/views/archives/form/ArchivesForm'
+import {downloadFilesAsZip} from '@/utils/downloadZIP'
+import ArchivesShowForm from '@/views/knowledge/views/archives/form/ArchivesShowForm'
export default {
name: 'ArchivesTable',
components: {
ArchivesCatalogForm,
- ArchivesForm
+ ArchivesForm,
+ ArchivesShowForm
},
props: {
activeTab: {
@@ -217,9 +222,13 @@ export default {
} finally {
this.treeLoading = false
}
+ if (this.chooseData){
+ await this.$tab.refreshPage(this.$route)
+ }
},
// 节点事件
handleNodeClick(e) {
+ this.loading = true
this.chooseData = e
this.chooseDataId = e.dataId
this.queryParams.dataId = e.dataId
@@ -270,9 +279,11 @@ export default {
},
/** 获取表格数据 */
async getTabList(){
+ this.loading = true
const res = await queryArchivesPage(this.queryParams)
this.list = res.data.records
this.total = res.data.total
+ this.loading = false
},
openTableFrom(row){
const data = {
@@ -291,6 +302,51 @@ export default {
await this.getTabList()
this.$modal.msgSuccess('删除成功')
}catch {}
+ },
+ // 下载ZIP
+ async downloadItem(row){
+ const fileObject = {
+ zipName: row.archivesName,
+ files: row.archivesUrls.split(",").map(item => {
+ return {
+ name: item.split("|")[1],
+ url: item.split("|")[0],
+ uid: item.split("|")[2],
+ status: item.split("|")[3]
+ }
+ })
+ }
+ await downloadFilesAsZip(fileObject)
+ },
+ handleCommand(command, index, row){
+ switch (command){
+ case 'showItem':
+ row = {
+ ...row,
+ activeTab: this.activeTab
+ }
+ this.$refs["archivesShowFormRef"].open(row)
+ break
+ case 'downloadItem':
+ this.downloadItem(row)
+ break
+ default:
+ break
+ }
+ },
+ // 记录项颜色
+ getRowClass(row, rowIndex){
+ if (this.activeTab !== 'contract_type'){
+ return '';
+ }
+ const diffTime = new Date(row.row.expireTime) - new Date()
+ const diffDays = Math.ceil(diffTime / (1000 * 60 * 60 * 24));
+ if (diffDays < 0 || diffDays <= 30){
+ return 'one-month-row';
+ }else if (diffDays <= 90){
+ return 'three-months-row';
+ }
+ return ''
}
}
}
@@ -335,4 +391,12 @@ div {
::v-deep .el-tree-node__expand-icon.is-leaf {
display: none;
}
+
+::v-deep .el-table .one-month-row td{
+ background-color: #ffcccc !important; /* 红色背景 */
+}
+
+::v-deep .el-table .three-months-row td{
+ background-color: #ffffcc !important; /* 黄色背景 */
+}
diff --git a/src/views/knowledge/views/archives/form/ArchivesCatalogForm.vue b/src/views/knowledge/views/archives/form/ArchivesCatalogForm.vue
index 7ba657a..c75a96b 100644
--- a/src/views/knowledge/views/archives/form/ArchivesCatalogForm.vue
+++ b/src/views/knowledge/views/archives/form/ArchivesCatalogForm.vue
@@ -89,6 +89,26 @@
+
+
+
+
+
+
+
+
+
+
-
-
-
- {{ dict.label }}
-
-
-
+
+
+
+
+
+
+
+
+
+
+
diff --git a/src/views/rescue/index.vue b/src/views/rescue/index.vue
index bc5e7ca..f64d5e9 100644
--- a/src/views/rescue/index.vue
+++ b/src/views/rescue/index.vue
@@ -198,13 +198,13 @@
@click="designateDriver(scope.row)"
>指派司机
-
+
+
+
+
- >路线
+
{
- this.driverList = response.rows;
+ this.driverList = response.data;
});
},
// 取消按钮