From d529e4e9f3b00ce5ff0d9d65670e37e422ec660c Mon Sep 17 00:00:00 2001
From: fei <791364011@qq.com>
Date: 星期一, 22 十二月 2025 20:19:56 +0800
Subject: [PATCH] 修改了代码
---
src/views/archiveManager/index.vue | 67 ++++++++++++++++++++++++++-------
1 files changed, 53 insertions(+), 14 deletions(-)
diff --git a/src/views/archiveManager/index.vue b/src/views/archiveManager/index.vue
index 2e54b22..ca8568a 100644
--- a/src/views/archiveManager/index.vue
+++ b/src/views/archiveManager/index.vue
@@ -366,7 +366,15 @@
@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
size="mini"
type="text"
@@ -389,6 +397,7 @@
@click="handleSubmit(scope.row)"
v-hasPermi="['system:records:edit']"
>鎻愪氦妗堝嵎</el-button>
+
<el-button
v-if="scope.row.ownData||userId===1"
@@ -872,6 +881,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
@@ -1295,7 +1305,22 @@
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)
+
+ },
handleInfo(row)
{
@@ -1305,8 +1330,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)
},
//
@@ -1314,10 +1340,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('妫�鏌ラ檮浠舵暟閲忓け璐ワ紝璇风◢鍚庨噸璇�')
})
},
/** 淇敼鎸夐挳鎿嶄綔 */
@@ -1457,8 +1497,7 @@
/** 鍒嗛厤鐢ㄦ埛鎿嶄綔 */
handleAuthUser: function(row) {
const roleId = 2
- var archiveRecordsId = row.recordId
-
+ var archiveRecordsId = row.id
this.$router.push("/archiveManager/infoManagerAu/user/" + roleId+"/"+archiveRecordsId)
},
/** 鍒犻櫎鎸夐挳鎿嶄綔 */
@@ -1480,12 +1519,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`)
}
},
@@ -1731,7 +1770,7 @@
// if (selectedAnnotations.length > 0) {
// filename += `_anno${selectedAnnotations.join('')}`;
// }
- filename += `_${new Date().getTime()}.xlsx`;
+ filename += `_${new Date().getTime()}.xls`;
link.download = filename;
@@ -2011,7 +2050,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);
@@ -2030,7 +2069,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);
@@ -2049,13 +2088,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