From d4034a42b997716517eae3a845925de04bfbbe66 Mon Sep 17 00:00:00 2001
From: fei <791364011@qq.com>
Date: 星期五, 26 十二月 2025 19:59:51 +0800
Subject: [PATCH] 修改了代码
---
src/views/archiveManager/index.vue | 138 +++++++++++++++++++++++++++++++++++++++++----
1 files changed, 124 insertions(+), 14 deletions(-)
diff --git a/src/views/archiveManager/index.vue b/src/views/archiveManager/index.vue
index b4187c5..7ee8e76 100644
--- a/src/views/archiveManager/index.vue
+++ b/src/views/archiveManager/index.vue
@@ -366,7 +366,45 @@
@click="handleInfo(scope.row)"
v-hasPermi="['system:records:edit']"
>缂栬緫鍗峰唴鐩綍</el-button>
+ <el-button
+ v-if="userId===1"
+ size="mini"
+ type="text"
+ icon="el-icon-edit"
+ @click="CheckInfo(scope.row)"
+ v-hasPermi="['system:records:edit']"
+ >鏌ョ湅鍗峰唴鐩綍</el-button>
+ <el-button
+ v-if="userId===1"
+
+ size="mini"
+ type="text"
+ icon="el-icon-edit"
+ @click="backInfo(scope.row)"
+ v-hasPermi="['system:records:edit']"
+ >瀵煎嚭澶囪�冭〃</el-button>
+
+ <el-button
+ v-if="userId===1"
+
+ size="mini"
+ type="text"
+ icon="el-icon-edit"
+ @click="JuanInfo(scope.row)"
+ v-hasPermi="['system:records:edit']"
+ >瀵煎嚭鍗峰唴鐩綍</el-button>
+
+
+ <el-button
+ v-if="userId===1"
+
+ size="mini"
+ type="text"
+ icon="el-icon-edit"
+ @click="pageInfo(scope.row)"
+ v-hasPermi="['system:records:edit']"
+ >瀵煎嚭妗堝嵎灏侀潰</el-button>
<el-button
size="mini"
type="text"
@@ -389,6 +427,7 @@
@click="handleSubmit(scope.row)"
v-hasPermi="['system:records:edit']"
>鎻愪氦妗堝嵎</el-button>
+
<el-button
v-if="scope.row.ownData||userId===1"
@@ -872,6 +911,7 @@
import { listAllCategory } from "@/api/system/category"
import { listAllProjectName } from "@/api/system/projectName"
import { listPlaceName, listAllPlaceName } from "@/api/system/placeName"
+import { judge } from "@/api/system/materials"
export default {
components: {
VueOfficeExcel
@@ -1004,6 +1044,9 @@
],
projectName: [
{ required: true, message: "寤鸿椤圭洰鍚嶇О涓嶈兘涓虹┖", trigger: "blur" }
+ ],
+ pageCount: [
+ { required: true, message: "妗堝嵎椤垫暟涓嶈兘涓虹┖", trigger: "blur" }
]
}
}
@@ -1292,7 +1335,60 @@
this.vis = false;
this.title = "娣诲姞妗f璁板綍"
},
+
/*鏌ョ湅璇︽儏*/
+ CheckInfo(row)
+ {
+
+ var mid = row.id
+ const roleId = 2
+ // alert(mid)
+
+ var recordId = mid
+ var pageCount = row.pageCount
+ var sho = false
+ // this.$router.push("/archiveManager/infoManagerAu/user/" + roleId+"/"+recordId)
+ this.$router.push("/archiveManager/infoManagerAu/archiveMaterialManager/" + recordId+"/"+pageCount+"/"+sho)
+
+ },
+ /*瀵煎嚭澶囪�冭〃*/
+ backInfo(row)
+ {
+
+ var id = row.id
+
+ id = Number(id)
+
+ var recordId = row.recordId
+ this.download('/system/materials/exportBack/'+id+'/'+recordId, {
+
+ }, `澶囪�冭〃_${new Date().getTime()}.pdf`)
+ },
+
+ /*瀵煎嚭鍗峰唴鐩綍*/
+ JuanInfo(row)
+ {
+ var id = row.id
+
+ id = Number(id)
+
+ var recordId = row.recordId
+ this.download('/system/materials/exportJuan/'+id, {
+
+ }, `鍗峰唴鐩綍_${new Date().getTime()}.xls`)
+ },
+ /*瀵煎嚭妗堝嵎灏侀潰*/
+ pageInfo(row)
+ {
+ var id = row.id
+
+ id = Number(id)
+
+ var recordId = row.recordId
+ this.download('/system/materials/exportPageInfo/'+id+'/'+recordId, {
+
+ }, `妗堝嵎灏侀潰_${new Date().getTime()}.xls`)
+ },
handleInfo(row)
{
@@ -1302,8 +1398,9 @@
var recordId = mid
var pageCount = row.pageCount
+ var sho = true
// this.$router.push("/archiveManager/infoManagerAu/user/" + roleId+"/"+recordId)
- this.$router.push("/archiveManager/infoManagerAu/archiveMaterialManager/" + recordId+"/"+pageCount)
+ this.$router.push("/archiveManager/infoManagerAu/archiveMaterialManager/" + recordId+"/"+pageCount+"/"+sho)
},
//
@@ -1311,10 +1408,24 @@
{
//alert(row.id)
var id = row.id
- var status = '褰曞叆瀹屾垚'
- updateStatusById(status, id).then(response=>{
- this.$modal.msgSuccess("鎻愪氦鎴愬姛")
- this.getList()
+ // 鍦ㄦ彁浜や箣鍓嶏紝璋冪敤鍚庣鎺ュ彛妫�鏌ユ槸鍚﹀凡缁忎笂浼犻檮浠�
+ judge(id).then(response => {
+ // console.log(response)
+ // alert(response.data)
+ if (response.data===undefined||response.data === false) {
+ // 濡傛灉鏂囦欢鏁伴噺涓�0锛屾彁绀虹敤鎴峰厛涓婁紶闄勪欢
+ this.$modal.msgWarning('璇峰厛涓婁紶闄勪欢锛屽啀杩涜鎻愪氦鎿嶄綔')
+ } else {
+ // 濡傛灉宸茬粡涓婁紶浜嗛檮浠讹紝缁х画鎻愪氦鎿嶄綔
+ var status = '褰曞叆瀹屾垚'
+ updateStatusById(status, id).then(response=>{
+ this.$modal.msgSuccess("鎻愪氦鎴愬姛")
+ this.getList()
+ })
+ }
+ }).catch(error => {
+ console.error('妫�鏌ラ檮浠舵暟閲忓け璐�:', error)
+ this.$modal.msgError('妫�鏌ラ檮浠舵暟閲忓け璐ワ紝璇风◢鍚庨噸璇�')
})
},
/** 淇敼鎸夐挳鎿嶄綔 */
@@ -1454,8 +1565,7 @@
/** 鍒嗛厤鐢ㄦ埛鎿嶄綔 */
handleAuthUser: function(row) {
const roleId = 2
- var archiveRecordsId = row.recordId
-
+ var archiveRecordsId = row.id
this.$router.push("/archiveManager/infoManagerAu/user/" + roleId+"/"+archiveRecordsId)
},
/** 鍒犻櫎鎸夐挳鎿嶄綔 */
@@ -1477,12 +1587,12 @@
// 鍙鍑洪�変腑鐨勮褰�
this.download('system/records/export', {
ids: this.ids.join(',') // 灏嗛�変腑鐨処D鏁扮粍杞崲涓洪�楀彿鍒嗛殧鐨勫瓧绗︿覆
- }, `records_${new Date().getTime()}.xlsx`)
+ }, `records_${new Date().getTime()}.xls`)
} else {
// 娌℃湁閫変腑璁板綍鏃讹紝瀵煎嚭绗﹀悎鏌ヨ鏉′欢鐨勬墍鏈夎褰�
this.download('system/records/export', {
...this.queryParams
- }, `records_${new Date().getTime()}.xlsx`)
+ }, `records_${new Date().getTime()}.xls`)
}
},
@@ -1728,7 +1838,7 @@
// if (selectedAnnotations.length > 0) {
// filename += `_anno${selectedAnnotations.join('')}`;
// }
- filename += `_${new Date().getTime()}.xlsx`;
+ filename += `_${new Date().getTime()}.xls`;
link.download = filename;
@@ -2008,7 +2118,7 @@
// 鐩存帴涓嬭浇
const link = document.createElement('a');
link.href = url;
- link.download = `${prefix}_${new Date().getTime()}.xlsx`;
+ link.download = `${prefix}_${new Date().getTime()}.xls`;
document.body.appendChild(link);
link.click();
document.body.removeChild(link);
@@ -2027,7 +2137,7 @@
const url = URL.createObjectURL(blob);
const link = document.createElement('a');
link.href = url;
- link.download = `record_${id}_${new Date().getTime()}.xlsx`;
+ link.download = `record_${id}_${new Date().getTime()}.xls`;
document.body.appendChild(link);
link.click();
document.body.removeChild(link);
@@ -2046,13 +2156,13 @@
{
this.download('/system/records/model', {
- }, `records_${new Date().getTime()}.xlsx`)
+ }, `records_${new Date().getTime()}.xls`)
},
handleExportTemplateOther()
{
this.download('/system/records/modelOther', {
- }, `records_${new Date().getTime()}.xlsx`)
+ }, `records_${new Date().getTime()}.xls`)
},
/** 瀵煎叆鎿嶄綔*/
async handleImportData({file}){
--
Gitblit v1.9.1