Эх сурвалжийг харах

Merge remote-tracking branch 'origin/demo_' into demo_

3254194295 2 жил өмнө
parent
commit
fa4dd29fe9

+ 1 - 1
src/api/customize/fieldTemplateData.js

@@ -129,7 +129,7 @@ export function deleteCustomFieldTemplateDatas(parameter) {
  * @param parameter
  * @returns {*}
  */
-export function deleteCustomFieldTemplateData(parameter) {
+export function deleteCustomFieldTemplateData (parameter) {
   return axios({
     url: '/customize/fieldTemplateData/' + parameter.id,
     method: 'DELETE',

+ 4 - 16
src/views/sb/scraps/SbAuditUnifyForm.vue

@@ -89,7 +89,7 @@
               @click="handleEdit(record)"
             >修改</operation-button>
             <operation-button
-              v-if="record.status == 1"
+              v-if="record.status == 1 && $auth('customize-fieldTemplateData-del')"
               :type="2"
               title="是否要删除该条数据?"
               @confirm="batchDelete(record.id)">删除</operation-button>
@@ -128,9 +128,9 @@ import HistoryTable from '@/views/activiti/HistoryTable'
 import DetailAuditScrap from '@/views/sb/scraps/modules/DetailAudit'
 import { fetchCustomFieldTemplateByRemark } from '@/api/customize/fieldTemplate'
 import SbCustomFormView from './modules/SbCustomFormView'
-import { deleteSbScrapForms, fetchSbScrapForm, exportSbScrapForm } from '@/api/sb/scraps'
+import { fetchSbScrapForm, exportSbScrapForm } from '@/api/sb/scraps'
 import { startSbInfoScrap, stopSbInfoScrapForAudit } from '@/api/activiti/activiti-sb-scrap'
-import { getCustomFieldTemplateDataPage, fetchCustomFieldTemplateVOData } from '@/api/customize/fieldTemplateData'
+import { getCustomFieldTemplateDataPage, fetchCustomFieldTemplateVOData, deleteCustomFieldTemplateData } from '@/api/customize/fieldTemplateData'
 export default {
   name: 'SbAuditUnifyForm',
   components: {
@@ -405,21 +405,9 @@ export default {
       }
     },
     batchDelete (id) {
-      let ids = []
-      if (this.BaseTool.String.isBlank(id)) {
-        const length = this.selectedRows.length
-        if (length === 0) {
-          this.$message.info('请选择要删除的记录')
-          return
-        }
-        ids = this.selectedRows.map(item => item.id)
-      } else {
-        ids = [id]
-      }
-      deleteSbScrapForms(ids).then(res => {
+      deleteCustomFieldTemplateData({ id: id }).then(res => {
         this.$message.info('删除成功')
         this.handleOk()
-        this.$refs.table.clearSelected()
       })
     },
     handleAdd () {