threethousanddream 4 ヶ月 前
コミット
ad30f84aa2

+ 12 - 3
src/views/temp/chartsTemp.vue

@@ -396,9 +396,18 @@ const onAudit = template => {
 }
 // 禁用组件模板
 const onPublish = temp => {
-  if (!temp.status) return
-  state.publishForm = {id: temp.id, status: 0, disableReason: ''}
-  state.showPublish = true
+  if (temp.status) {
+    state.publishForm = {id: temp.id, status: 0, disableReason: ''}
+    state.showPublish = true
+  } else {
+    state.auditForm = {
+      id: temp.id,
+      reason: '',
+      pass: true,
+      category: temp.category || 0,
+    }
+    state.showAudit = true
+  }
 }
 // 提交禁用
 const onPublishConfirm = () => {

+ 12 - 3
src/views/temp/visualTemp.vue

@@ -409,9 +409,18 @@ const onPublishConfirm = () => {
 }
 // 发起模板禁用
 const onPublish = temp => {
-  if (!temp.status) return
-  state.publishForm = {id: temp.id, status: 0, disableReason: ''}
-  state.showPublish = true
+  if (temp.status) {
+    state.publishForm = {id: temp.id, status: 0, disableReason: ''}
+    state.showPublish = true
+  } else {
+    state.auditForm = {
+      id: temp.id,
+      reason: '',
+      pass: true,
+      category: temp.category || 0,
+    }
+    state.showAudit = true
+  }
 }
 // 重置列表筛选条件
 const onReset = () => {

+ 0 - 1
src/views/visual/reportList.vue

@@ -280,7 +280,6 @@ const onAudit = visual => {
 }
 // 发起报表禁用
 const onPublish = visual => {
-  if (visual.status === 0) return
   state.publishForm = {
     id: visual.id,
     status: visual.status === 0 ? 1 : 0,

+ 0 - 1
src/views/visual/visualList.vue

@@ -281,7 +281,6 @@ const onAudit = visual => {
 }
 // 发起大屏禁用
 const onPublish = visual => {
-  if (!visual.status) return
   state.publishForm = {
     id: visual.id,
     status: visual.status === 0 ? 1 : 0,