王震
2023-12-19 2fa578a18ed9055f8cb9863a8a0f02977cfa8350
src/views/basic/template/index.vue
@@ -12,7 +12,10 @@
            :ajaxFun="ajaxFun"
            ref="templateTable"
          >
            <template #toolbar></template>
            <template #toolbar>
              <el-button type="primary" @click="addOrUpdateHandle"
              v-if="permissions.technology_operationtemplate_add">新增</el-button>
            </template>
          </ttable>
        </el-col>
        <el-col :span="12" style="padding-left: 10px">
@@ -26,6 +29,7 @@
                  <el-button
                    style="float: right; padding: 3px 0"
                    type="text"
                    v-if="permissions.technology_operationtemplate_param_add"
                    @click="relateOperationParam()"
                    >添加</el-button
                  >
@@ -107,7 +111,8 @@
              <el-table-column label="单位" prop="unit" align="center">
              </el-table-column>
              <el-table-column label="操作" align="center">
              <el-table-column label="操作" align="center"
              v-if="permissions.technology_operationtemplate_param_edit">
                <template slot-scope="scope">
                  <el-button
                    type="text"
@@ -261,13 +266,7 @@
            searchInfoType: 'text'
          }
        ],
        toolbar: [
          {
            text: '新增',
            type: 'primary',
            fun: this.addOrUpdateHandle
          }
        ],
        toolbar: [],
        operator: [
          {
            text: '删除',
@@ -306,6 +305,9 @@
    },
    // 新增 / 修改
    addOrUpdateHandle(row) {
      if(!this.permissions.technology_operationtemplate_edit && row.id!=null){
        return
      }
      this.addOrUpdateVisible = true
      this.$nextTick(() => {
        this.$refs.addOrUpdate.init(row == null ? null : row.id)
@@ -430,6 +432,10 @@
    },
    // 删除
    deleteHandle(row) {
      if(!this.permissions.technology_operationtemplate_del){
        this.$message.error("该角色没有操作权限")
        return
      }
      this.$confirm('是否确认删除模板编号为' + row.templateNo, '提示', {
        confirmButtonText: '确定',
        cancelButtonText: '取消',