소스 검색

Merge branch 'dev_xlk'

allen 2 년 전
부모
커밋
4bc2cced53

+ 52 - 0
src/api/suport/flow.js

@@ -0,0 +1,52 @@
+import request from '@/utils/request'
+
+// 查询构建流程列表
+export function listFlow(query) {
+  return request({
+    url: '/suport/flow/list',
+    method: 'get',
+    params: query
+  })
+}
+
+// 查询构建流程详细
+export function getInfo(id) {
+  return request({
+    url: '/suport/flow/' + id,
+    method: 'get'
+  })
+}
+
+// 新增构建流程
+export function addFlow(data) {
+  return request({
+    url: '/suport/flow',
+    method: 'post',
+    data: data
+  })
+}
+
+// 修改构建流程
+export function updateFlow(data) {
+  return request({
+    url: '/suport/flow',
+    method: 'put',
+    data: data
+  })
+}
+
+// 删除构建流程
+export function delFlow(id) {
+  return request({
+    url: '/suport/flow/' + id,
+    method: 'delete'
+  })
+}
+
+// 查看构建结果
+export function getFlow(subTaskId) {
+  return request({
+    url: '/suport/flow/getFlow/' + subTaskId,
+    method: 'get'
+  })
+}

+ 44 - 0
src/api/suport/piont.js

@@ -0,0 +1,44 @@
+import request from '@/utils/request'
+
+// 查询检查点管理列表
+export function listPiont(query) {
+  return request({
+    url: '/suport/piont/list',
+    method: 'get',
+    params: query
+  })
+}
+
+// 查询检查点管理详细
+export function getPiont(id) {
+  return request({
+    url: '/suport/piont/' + id,
+    method: 'get'
+  })
+}
+
+// 新增检查点管理
+export function addPiont(data) {
+  return request({
+    url: '/suport/piont',
+    method: 'post',
+    data: data
+  })
+}
+
+// 修改检查点管理
+export function updatePiont(data) {
+  return request({
+    url: '/suport/piont',
+    method: 'put',
+    data: data
+  })
+}
+
+// 删除检查点管理
+export function delPiont(id) {
+  return request({
+    url: '/suport/piont/' + id,
+    method: 'delete'
+  })
+}

+ 105 - 0
src/views/extract/info/buildFlow.vue

@@ -0,0 +1,105 @@
+<template>
+  <div :loading="loading">
+    <el-form ref="form" :model="form" :rules="rules" label-width="80px">
+      <el-form-item label="故障名称" prop="errorAppearance">
+        <el-input v-model="form.errorAppearance" placeholder="请输入故障名称" :readonly="readonly"/>
+      </el-form-item>
+      <el-form-item label="排故流程" prop="flowEncode">
+        <el-input
+          :readonly="readonly"
+          v-model="form.flowEncode"
+          type="textarea"
+          placeholder="请输入排故流程"
+        />
+      </el-form-item>
+    </el-form>
+    <div>
+      <el-button v-show="!readonly" type="primary" @click="submitForm">确 定</el-button>
+      <el-button v-show="!readonly" @click="cancel">取 消</el-button>
+    </div>
+  </div>
+</template>
+  
+<script>
+import { updateFlow, addFlow, getFlow } from "@/api/suport/flow";
+
+export default {
+  props: {
+    subTask: {
+      type: Object,
+    },
+    readonly: {
+      type: Boolean,
+    },
+  },
+
+  data() {
+    return {
+      loading: false,
+      // 弹出层标题
+      title: "",
+      // 是否显示弹出层
+      open: false,
+      // 表单参数
+      form: {},
+      // 表单校验
+      rules: {},
+    };
+  },
+  created() {
+    this.getResult()
+  },
+  methods: {
+    getResult(){
+      this.loading = true
+      getFlow(this.subTask.id).then(response => {
+        if(response.data){
+          this.form = response.data
+        }
+        this.loading = false
+      });
+    },
+    
+    /** 提交按钮 */
+    submitForm() {
+      this.$refs["form"].validate((valid) => {
+        if (valid) {
+          this.form.subTaskId = this.subTask.id
+          if (this.form.id != null) {
+            updateFlow(this.form).then((response) => {
+              this.$modal.msgSuccess("修改成功");
+              this.open = false;
+              this.$emit("closeInfo");
+            });
+          } else {
+            addFlow(this.form).then((response) => {
+              this.$modal.msgSuccess("新增成功");
+              this.open = false;
+              this.$emit("closeInfo");
+            });
+          }
+        }
+      });
+    },
+
+    // 取消按钮
+    cancel() {
+      this.open = false;
+      this.reset();
+    },
+
+    // 表单重置
+    reset() {
+      this.form = {
+        id: null,
+        name: null,
+        desc: null,
+        createBy: null,
+        createTime: null,
+        updateBy: null,
+        updateTime: null,
+      };
+    },
+  },
+};
+</script>

+ 45 - 7
src/views/extract/subTask/index.vue

@@ -50,6 +50,14 @@
                 @click="createClass(scope.row)"
                 v-hasPermi="['extract:subTask:edit']"
               >构建</el-button>
+              <el-button
+                v-show="scope.row.type == 3 && scope.row.status == 0"
+                size="mini"
+                type="text"
+                icon="el-icon-warning-outline"
+                @click="createFlow(scope.row)"
+                v-hasPermi="['extract:subTask:edit']"
+              >构建</el-button>
               <el-button
                 v-show="scope.row.type == 1 && scope.row.status == 3"
                 size="mini"
@@ -74,6 +82,14 @@
                 @click="viewResult2(scope.row)"
                 v-hasPermi="['extract:subTask:edit']"
               >查看构建结果</el-button>
+              <el-button
+                v-show="scope.row.type == 3 && scope.row.status == 3"
+                size="mini"
+                type="text"
+                icon="el-icon-warning-outline"
+                @click="viewFlow(scope.row)"
+                v-hasPermi="['extract:subTask:edit']"
+              >查看构建结果</el-button>
             </template>
           </el-table-column>
         </el-table>
@@ -132,13 +148,14 @@
       </div>
     </el-dialog>
     <el-dialog :title="tripletInfoOpenTitle" v-if="tripletInfoOpen" :visible.sync="tripletInfoOpen" width="80%" append-to-body destroy-on-close :close-on-click-modal="false">
-      <!-- <TripletInfo :subTask="subTask" :subTaskOpen.sync="tripletInfoOpen" @closeInfo="closeInfo"></TripletInfo> -->
       <IndexV2 :subTask="subTask" @closeInfo="closeInfo" :readonly="tripletInfoReadOnly"/>
     </el-dialog>
     <el-dialog :title="createInfoOpenTitle" v-if="createInfoOpen" :visible.sync="createInfoOpen" width="80%" append-to-body destroy-on-close :close-on-click-modal="false">
-      <!-- <CreateInfo :subTask="subTask" :subTaskOpen.sync="createInfoOpen" @closeInfo="closeInfo"></CreateInfo> -->
       <classCreateV :subTask="subTask" @closeInfo="closeInfo" :readonly="createInfoReadOnly"/>
     </el-dialog>
+    <el-dialog :title="flowInfoOpenTitle" v-if="flowInfoOpen" :visible.sync="flowInfoOpen" width="80%" append-to-body destroy-on-close :close-on-click-modal="false">
+      <buildFlow :subTask="subTask" @closeInfo="closeInfo" :readonly="flowInfoReadOnly"/>
+    </el-dialog>
     <el-dialog title="分句结果" v-if="viewSentenceOpen" :visible.sync="viewSentenceOpen" width="80%" append-to-body destroy-on-close :close-on-click-modal="false">
       <p v-for="sentence in sentenceList" :key="sentence.id">
          {{ sentence.id }}. {{ sentence.text }}
@@ -153,10 +170,11 @@ import { getSentence } from "@/api/extract/result";
 import TripletInfo from '@/views/extract/info';
 import IndexV2 from '@/views/extract/info/indexV2';
 import classCreateV from '@/views/extract/info/classCreateV';
+import buildFlow from '@/views/extract/info/buildFlow';
 export default {
   name: "SubTask",
   dicts: ['extract_sub_task_status', 'extract_sub_task_list'],
-  components: { TripletInfo,IndexV2,classCreateV },
+  components: { TripletInfo,IndexV2,classCreateV,buildFlow },
   props: {
     task: {
       type: Object,
@@ -204,13 +222,20 @@ export default {
       },
       tripletInfoOpenTitle: "",
       tripletInfoOpen: false,
+      tripletInfoReadOnly: false,
+
       createInfoOpenTitle: "",
       createInfoOpen: false,
+      createInfoReadOnly: false,
+
+      flowInfoOpenTitle: "",
+      flowInfoOpen: false,
+      flowInfoReadOnly: false,
+
       subTask: {},
       viewSentenceOpen: false,
       sentenceList: [],
-      tripletInfoReadOnly: false,
-      createInfoReadOnly: false,
+
     };
   },
   created() {
@@ -333,7 +358,13 @@ export default {
     createClass(row){
       this.createInfoReadOnly = false
       this.createInfoOpen = true
-      this.createtInfoOpenTitle = this.dict.label.extract_sub_task_list[row.type]
+      this.createInfoOpenTitle = this.dict.label.extract_sub_task_list[row.type]
+      this.subTask = row
+    },
+    createFlow(row){
+      this.flowInfoReadOnly = false
+      this.flowInfoOpen = true
+      this.flowInfoOpenTitle = this.dict.label.extract_sub_task_list[row.type]
       this.subTask = row
     },
     handleViewLog(row){
@@ -342,6 +373,7 @@ export default {
       });
     },
     closeInfo(){
+      this.flowInfoOpen = false
       this.createInfoOpen = false
       this.tripletInfoOpen = false
       this.tripletInfoOpenTitle = ''
@@ -363,7 +395,13 @@ export default {
     viewResult2(row){
       this.createInfoReadOnly = true
       this.createInfoOpen = true
-      this.createtInfoOpenTitle = this.dict.label.extract_sub_task_list[row.type]
+      this.createInfoOpenTitle = this.dict.label.extract_sub_task_list[row.type]
+      this.subTask = row
+    },
+    viewFlow(row){
+      this.flowInfoReadOnly = true
+      this.flowInfoOpen = true
+      this.flowInfoOpenTitle = this.dict.label.extract_sub_task_list[row.type]
       this.subTask = row
     }
   }

+ 1 - 1
src/views/neo4j/class_relation/index.vue

@@ -204,7 +204,7 @@ export default {
     this.getEntityClassOption();
   },
   activated(){
-    this. tEntityClassOption();
+    this.tEntityClassOption();
   },
   methods: {
     /** 查询实体类关系列表 */

+ 3 - 22
src/views/showInfo/breakdown/index.vue

@@ -97,9 +97,8 @@
           icon="el-icon-upload2"
           size="mini"
           @click="handleImport"
-          v-hasPermi="['showInfo:vehicle:add']"
-          >导入</el-button
-        >
+          v-hasPermi="['showInfo:breakdown:add']"
+          >导入</el-button>
       </el-col>
       <right-toolbar :showSearch.sync="showSearch" @queryTable="getList"></right-toolbar>
     </el-row>
@@ -302,27 +301,9 @@
             placeholder="请选择修复日期">
           </el-date-picker>
         </el-form-item>
+        
           </el-col>
         </el-row>
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
       </el-form>
       <div slot="footer" class="dialog-footer">
         <el-button type="primary" @click="submitForm">确 定</el-button>

+ 362 - 0
src/views/suport/flow/index.vue

@@ -0,0 +1,362 @@
+<template>
+  <div class="app-container">
+    <el-form :model="queryParams" ref="queryForm" size="small" :inline="true" v-show="showSearch" label-width="68px">
+      <el-form-item label="故障名称" prop="errorAppearance">
+        <el-input
+          v-model="queryParams.errorAppearance"
+          placeholder="请输入故障名称"
+          clearable
+          @keyup.enter.native="handleQuery"
+        />
+      </el-form-item>
+      <el-form-item>
+        <el-button type="primary" icon="el-icon-search" size="mini" @click="handleQuery">搜索</el-button>
+        <el-button icon="el-icon-refresh" size="mini" @click="resetQuery">重置</el-button>
+      </el-form-item>
+    </el-form>
+
+    <el-row :gutter="10" class="mb8">
+      <el-col :span="1.5">
+        <el-button
+          type="primary"
+          plain
+          icon="el-icon-plus"
+          size="mini"
+          @click="handleAdd"
+          v-hasPermi="['suport:flow:add']"
+        >新增</el-button>
+      </el-col>
+      <el-col :span="1.5">
+        <el-button
+          type="success"
+          plain
+          icon="el-icon-edit"
+          size="mini"
+          :disabled="single"
+          @click="handleUpdate"
+          v-hasPermi="['suport:flow:edit']"
+        >修改</el-button>
+      </el-col>
+      <el-col :span="1.5">
+        <el-button
+          type="danger"
+          plain
+          icon="el-icon-delete"
+          size="mini"
+          :disabled="multiple"
+          @click="handleDelete"
+          v-hasPermi="['suport:flow:remove']"
+        >删除</el-button>
+      </el-col>
+      <el-col :span="1.5">
+        <el-button
+          type="warning"
+          plain
+          icon="el-icon-download"
+          size="mini"
+          @click="handleExport"
+          v-hasPermi="['suport:flow:export']"
+        >导出</el-button>
+      </el-col>
+      <el-col :span="1.5">
+        <el-button
+          type="primary"
+          plain
+          icon="el-icon-upload2"
+          size="mini"
+          @click="handleImport"
+          v-hasPermi="['suport:flow:add']"
+          >导入</el-button>
+      </el-col>
+      <right-toolbar :showSearch.sync="showSearch" @queryTable="getList"></right-toolbar>
+    </el-row>
+
+    <el-table v-loading="loading" :data="flowList" @selection-change="handleSelectionChange">
+      <el-table-column type="selection" width="55" align="center" />
+      <el-table-column label="故障名称" align="center" prop="errorAppearance" />
+      <el-table-column label="流程数据" align="center" prop="flowEncode" />
+      <el-table-column label="操作" align="center" class-name="small-padding fixed-width">
+        <template slot-scope="scope">
+          <el-button
+            size="mini"
+            type="text"
+            icon="el-icon-edit"
+            @click="handleUpdate(scope.row)"
+            v-hasPermi="['suport:flow:edit']"
+          >修改</el-button>
+          <el-button
+            size="mini"
+            type="text"
+            icon="el-icon-delete"
+            @click="handleDelete(scope.row)"
+            v-hasPermi="['suport:flow:remove']"
+          >删除</el-button>
+        </template>
+      </el-table-column>
+    </el-table>
+    
+    <pagination
+      v-show="total>0"
+      :total="total"
+      :page.sync="queryParams.pageNum"
+      :limit.sync="queryParams.pageSize"
+      @pagination="getList"
+    />
+
+    <!-- 添加或修改故障名称对话框 -->
+    <el-dialog :title="title" :visible.sync="open" width="500px" append-to-body>
+      <el-form ref="form" :model="form" :rules="rules" label-width="80px">
+        <el-form-item label="故障名称" prop="errorAppearance">
+          <el-input v-model="form.errorAppearance" placeholder="请输入故障名称" />
+        </el-form-item>
+        <el-form-item label="流程数据" prop="flowEncode">
+          <el-input v-model="form.flowEncode" type="textarea" placeholder="请输入内容" />
+        </el-form-item>
+      </el-form>
+      <div slot="footer" class="dialog-footer">
+        <el-button type="primary" @click="submitForm">确 定</el-button>
+        <el-button @click="cancel">取 消</el-button>
+      </div>
+    </el-dialog>
+
+    <!-- 导入故障 -->
+    <el-dialog
+      :title="upload.title"
+      :visible.sync="upload.open"
+      width="400px"
+      append-to-body
+      :close-on-click-modal="false"
+    >
+      <el-upload
+        ref="upload"
+        :limit="1"
+        accept=".xlsx, .xls"
+        :headers="upload.headers"
+        :action="upload.url + '?updateSupport=' + upload.updateSupport"
+        :disabled="upload.isUploading"
+        :on-progress="handleFileUploadProgress"
+        :on-success="handleFileSuccess"
+        :auto-upload="false"
+        drag
+      >
+        <i class="el-icon-upload"></i>
+        <div class="el-upload__text">将文件拖到此处,或<em>点击上传</em></div>
+        <div class="el-upload__tip text-center" slot="tip">
+          <div class="el-upload__tip" slot="tip">
+            <el-checkbox v-model="upload.updateSupport" /> 是否更新已经存在的数据
+          </div>
+          <span>仅允许导入xls、xlsx格式文件。</span>
+          <el-link
+            type="primary"
+            :underline="false"
+            style="font-size: 12px; vertical-align: baseline"
+            @click="importTemplate"
+            >下载模板</el-link
+          >
+        </div>
+      </el-upload>
+      <div slot="footer" class="dialog-footer">
+        <el-button type="primary" @click="submitFileForm">确 定</el-button>
+        <el-button @click="upload.open = false">取 消</el-button>
+      </div>
+    </el-dialog>
+  </div>
+</template>
+
+<script>
+import { listFlow, getFlow, delFlow, addFlow, updateFlow } from "@/api/suport/flow";
+import { getToken } from "@/utils/auth";
+
+export default {
+  name: "Flow",
+  data() {
+    return {
+      // 遮罩层
+      loading: true,
+      // 选中数组
+      ids: [],
+      // 非单个禁用
+      single: true,
+      // 非多个禁用
+      multiple: true,
+      // 显示搜索条件
+      showSearch: true,
+      // 总条数
+      total: 0,
+      // 故障名称表格数据
+      flowList: [],
+      // 弹出层标题
+      title: "",
+      // 是否显示弹出层
+      open: false,
+      // 查询参数
+      queryParams: {
+        pageNum: 1,
+        pageSize: 10,
+        errorCode: null,
+        flowEncode: null,
+        flowTreeJson: null,
+      },
+      // 表单参数
+      form: {},
+      // 表单校验
+      rules: {
+      },
+      upload: {
+        // 是否显示弹出层
+        open: false,
+        // 弹出层标题
+        title: "",
+        // 是否禁用上传
+        isUploading: false,
+        // 是否更新已经存在的用户数据
+        updateSupport: 0,
+        // 设置上传的请求头部
+        headers: { Authorization: "Bearer " + getToken() },
+        // 上传的地址
+        url: process.env.VUE_APP_BASE_API + "/suport/flow/importData",
+      },
+    };
+  },
+  created() {
+    this.getList();
+  },
+  activated(){
+    this.getList();
+  },
+  methods: {
+    /** 查询故障名称列表 */
+    getList() {
+      this.loading = true;
+      listFlow(this.queryParams).then(response => {
+        this.flowList = response.rows;
+        this.total = response.total;
+        this.loading = false;
+      });
+    },
+    // 取消按钮
+    cancel() {
+      this.open = false;
+      this.reset();
+    },
+    // 表单重置
+    reset() {
+      this.form = {
+        id: null,
+        errorCode: null,
+        flowEncode: null,
+        flowTreeJson: null,
+        createBy: null,
+        createTime: null,
+        updateBy: null,
+        updateTime: null
+      };
+      this.resetForm("form");
+    },
+    /** 搜索按钮操作 */
+    handleQuery() {
+      this.queryParams.pageNum = 1;
+      this.getList();
+    },
+    /** 重置按钮操作 */
+    resetQuery() {
+      this.resetForm("queryForm");
+      this.handleQuery();
+    },
+    // 多选框选中数据
+    handleSelectionChange(selection) {
+      this.ids = selection.map(item => item.id)
+      this.single = selection.length!==1
+      this.multiple = !selection.length
+    },
+    /** 新增按钮操作 */
+    handleAdd() {
+      this.reset();
+      this.open = true;
+      this.title = "添加故障名称";
+    },
+    /** 修改按钮操作 */
+    handleUpdate(row) {
+      this.reset();
+      const id = row.id || this.ids
+      getFlow(id).then(response => {
+        this.form = response.data;
+        this.open = true;
+        this.title = "修改故障名称";
+      });
+    },
+    /** 提交按钮 */
+    submitForm() {
+      this.$refs["form"].validate(valid => {
+        if (valid) {
+          if (this.form.id != null) {
+            updateFlow(this.form).then(response => {
+              this.$modal.msgSuccess("修改成功");
+              this.open = false;
+              this.getList();
+            });
+          } else {
+            addFlow(this.form).then(response => {
+              this.$modal.msgSuccess("新增成功");
+              this.open = false;
+              this.getList();
+            });
+          }
+        }
+      });
+    },
+    /** 删除按钮操作 */
+    handleDelete(row) {
+      const ids = row.id || this.ids;
+      this.$modal.confirm('是否确认删除故障名称编号为"' + ids + '"的数据项?').then(function() {
+        return delFlow(ids);
+      }).then(() => {
+        this.getList();
+        this.$modal.msgSuccess("删除成功");
+      }).catch(() => {});
+    },
+    /** 导出按钮操作 */
+    handleExport() {
+      this.download('suport/flow/export', {
+        ...this.queryParams
+      }, `flow_${new Date().getTime()}.xlsx`)
+    },
+
+    /** 导入按钮操作 */
+    handleImport() {
+      this.upload.title = "排故流程";
+      this.upload.open = true;
+    },
+    /** 下载模板操作 */
+    importTemplate() {
+      this.download(
+        "suport/flow/importTemplate",
+        {},
+        `排故流程导入模板.xlsx`
+      );
+    },
+    // 文件上传中处理
+    handleFileUploadProgress(event, file, fileList) {
+      this.upload.isUploading = true;
+    },
+    // 文件上传成功处理
+    handleFileSuccess(response, file, fileList) {
+      this.upload.open = false;
+      this.upload.isUploading = false;
+      this.$refs.upload.clearFiles();
+      this.$alert(
+        "<div style='overflow: auto;overflow-x: hidden;max-height: 70vh;padding: 10px 20px 0;'>" +
+          response.msg +
+          "</div>",
+        "导入结果",
+        { dangerouslyUseHTMLString: true }
+      );
+      this.getList();
+    },
+    // 提交上传文件
+    submitFileForm() {
+      this.$refs.upload.submit();
+    },
+  }
+};
+</script>

+ 357 - 0
src/views/suport/piont/index.vue

@@ -0,0 +1,357 @@
+<template>
+  <div class="app-container">
+    <el-form :model="queryParams" ref="queryForm" size="small" :inline="true" v-show="showSearch" label-width="68px">
+      <el-form-item label="编码" prop="code">
+        <el-input
+          v-model="queryParams.code"
+          placeholder="请输入编码"
+          clearable
+          @keyup.enter.native="handleQuery"
+        />
+      </el-form-item>
+      <el-form-item>
+        <el-button type="primary" icon="el-icon-search" size="mini" @click="handleQuery">搜索</el-button>
+        <el-button icon="el-icon-refresh" size="mini" @click="resetQuery">重置</el-button>
+      </el-form-item>
+    </el-form>
+
+    <el-row :gutter="10" class="mb8">
+      <el-col :span="1.5">
+        <el-button
+          type="primary"
+          plain
+          icon="el-icon-plus"
+          size="mini"
+          @click="handleAdd"
+          v-hasPermi="['suport:piont:add']"
+        >新增</el-button>
+      </el-col>
+      <el-col :span="1.5">
+        <el-button
+          type="success"
+          plain
+          icon="el-icon-edit"
+          size="mini"
+          :disabled="single"
+          @click="handleUpdate"
+          v-hasPermi="['suport:piont:edit']"
+        >修改</el-button>
+      </el-col>
+      <el-col :span="1.5">
+        <el-button
+          type="danger"
+          plain
+          icon="el-icon-delete"
+          size="mini"
+          :disabled="multiple"
+          @click="handleDelete"
+          v-hasPermi="['suport:piont:remove']"
+        >删除</el-button>
+      </el-col>
+      <el-col :span="1.5">
+        <el-button
+          type="warning"
+          plain
+          icon="el-icon-download"
+          size="mini"
+          @click="handleExport"
+          v-hasPermi="['suport:piont:export']"
+        >导出</el-button>
+      </el-col>
+      <el-col :span="1.5">
+        <el-button
+          type="primary"
+          plain
+          icon="el-icon-upload2"
+          size="mini"
+          @click="handleImport"
+          v-hasPermi="['suport:piont:add']"
+          >导入</el-button>
+      </el-col>
+      <right-toolbar :showSearch.sync="showSearch" @queryTable="getList"></right-toolbar>
+    </el-row>
+
+    <el-table v-loading="loading" :data="piontList" @selection-change="handleSelectionChange">
+      <el-table-column type="selection" width="55" align="center" />
+      <el-table-column label="编码" align="center" prop="code" />
+      <el-table-column label="检查点" align="center" prop="checkPiont" />
+      <el-table-column label="操作" align="center" class-name="small-padding fixed-width">
+        <template slot-scope="scope">
+          <el-button
+            size="mini"
+            type="text"
+            icon="el-icon-edit"
+            @click="handleUpdate(scope.row)"
+            v-hasPermi="['suport:piont:edit']"
+          >修改</el-button>
+          <el-button
+            size="mini"
+            type="text"
+            icon="el-icon-delete"
+            @click="handleDelete(scope.row)"
+            v-hasPermi="['suport:piont:remove']"
+          >删除</el-button>
+        </template>
+      </el-table-column>
+    </el-table>
+    
+    <pagination
+      v-show="total>0"
+      :total="total"
+      :page.sync="queryParams.pageNum"
+      :limit.sync="queryParams.pageSize"
+      @pagination="getList"
+    />
+
+    <!-- 添加或修改检查点管理对话框 -->
+    <el-dialog :title="title" :visible.sync="open" width="500px" append-to-body>
+      <el-form ref="form" :model="form" :rules="rules" label-width="80px">
+        <el-form-item label="编码" prop="code">
+          <el-input v-model="form.code" placeholder="请输入编码" />
+        </el-form-item>
+        <el-form-item label="检查点" prop="checkPiont">
+          <el-input v-model="form.checkPiont" type="textarea" placeholder="请输入内容" />
+        </el-form-item>
+      </el-form>
+      <div slot="footer" class="dialog-footer">
+        <el-button type="primary" @click="submitForm">确 定</el-button>
+        <el-button @click="cancel">取 消</el-button>
+      </div>
+    </el-dialog>
+
+    <!-- 导入检查点 -->
+    <el-dialog
+      :title="upload.title"
+      :visible.sync="upload.open"
+      width="400px"
+      append-to-body
+      :close-on-click-modal="false"
+    >
+      <el-upload
+        ref="upload"
+        :limit="1"
+        accept=".xlsx, .xls"
+        :headers="upload.headers"
+        :action="upload.url + '?updateSupport=' + upload.updateSupport"
+        :disabled="upload.isUploading"
+        :on-progress="handleFileUploadProgress"
+        :on-success="handleFileSuccess"
+        :auto-upload="false"
+        drag
+      >
+        <i class="el-icon-upload"></i>
+        <div class="el-upload__text">将文件拖到此处,或<em>点击上传</em></div>
+        <div class="el-upload__tip text-center" slot="tip">
+          <div class="el-upload__tip" slot="tip">
+            <el-checkbox v-model="upload.updateSupport" /> 是否更新已经存在的数据
+          </div>
+          <span>仅允许导入xls、xlsx格式文件。</span>
+          <el-link
+            type="primary"
+            :underline="false"
+            style="font-size: 12px; vertical-align: baseline"
+            @click="importTemplate"
+            >下载模板</el-link
+          >
+        </div>
+      </el-upload>
+      <div slot="footer" class="dialog-footer">
+        <el-button type="primary" @click="submitFileForm">确 定</el-button>
+        <el-button @click="upload.open = false">取 消</el-button>
+      </div>
+    </el-dialog>
+  </div>
+</template>
+
+<script>
+import { listPiont, getPiont, delPiont, addPiont, updatePiont } from "@/api/suport/piont";
+import { getToken } from "@/utils/auth";
+
+export default {
+  name: "Piont",
+  data() {
+    return {
+      // 遮罩层
+      loading: true,
+      // 选中数组
+      ids: [],
+      // 非单个禁用
+      single: true,
+      // 非多个禁用
+      multiple: true,
+      // 显示搜索条件
+      showSearch: true,
+      // 总条数
+      total: 0,
+      // 检查点管理表格数据
+      piontList: [],
+      // 弹出层标题
+      title: "",
+      // 是否显示弹出层
+      open: false,
+      // 查询参数
+      queryParams: {
+        pageNum: 1,
+        pageSize: 10,
+        code: null,
+        checkPiont: null,
+      },
+      // 表单参数
+      form: {},
+      // 表单校验
+      rules: {
+      },
+      upload: {
+        // 是否显示弹出层
+        open: false,
+        // 弹出层标题
+        title: "",
+        // 是否禁用上传
+        isUploading: false,
+        // 是否更新已经存在的用户数据
+        updateSupport: 0,
+        // 设置上传的请求头部
+        headers: { Authorization: "Bearer " + getToken() },
+        // 上传的地址
+        url: process.env.VUE_APP_BASE_API + "/suport/piont/importData",
+      },
+    };
+  },
+  created() {
+    this.getList();
+  },
+  methods: {
+    /** 查询检查点管理列表 */
+    getList() {
+      this.loading = true;
+      listPiont(this.queryParams).then(response => {
+        this.piontList = response.rows;
+        this.total = response.total;
+        this.loading = false;
+      });
+    },
+    // 取消按钮
+    cancel() {
+      this.open = false;
+      this.reset();
+    },
+    // 表单重置
+    reset() {
+      this.form = {
+        id: null,
+        code: null,
+        checkPiont: null,
+        createBy: null,
+        createTime: null,
+        updateBy: null,
+        updateTime: null
+      };
+      this.resetForm("form");
+    },
+    /** 搜索按钮操作 */
+    handleQuery() {
+      this.queryParams.pageNum = 1;
+      this.getList();
+    },
+    /** 重置按钮操作 */
+    resetQuery() {
+      this.resetForm("queryForm");
+      this.handleQuery();
+    },
+    // 多选框选中数据
+    handleSelectionChange(selection) {
+      this.ids = selection.map(item => item.id)
+      this.single = selection.length!==1
+      this.multiple = !selection.length
+    },
+    /** 新增按钮操作 */
+    handleAdd() {
+      this.reset();
+      this.open = true;
+      this.title = "添加检查点管理";
+    },
+    /** 修改按钮操作 */
+    handleUpdate(row) {
+      this.reset();
+      const id = row.id || this.ids
+      getPiont(id).then(response => {
+        this.form = response.data;
+        this.open = true;
+        this.title = "修改检查点管理";
+      });
+    },
+    /** 提交按钮 */
+    submitForm() {
+      this.$refs["form"].validate(valid => {
+        if (valid) {
+          if (this.form.id != null) {
+            updatePiont(this.form).then(response => {
+              this.$modal.msgSuccess("修改成功");
+              this.open = false;
+              this.getList();
+            });
+          } else {
+            addPiont(this.form).then(response => {
+              this.$modal.msgSuccess("新增成功");
+              this.open = false;
+              this.getList();
+            });
+          }
+        }
+      });
+    },
+    /** 删除按钮操作 */
+    handleDelete(row) {
+      const ids = row.id || this.ids;
+      this.$modal.confirm('是否确认删除检查点管理编号为"' + ids + '"的数据项?').then(function() {
+        return delPiont(ids);
+      }).then(() => {
+        this.getList();
+        this.$modal.msgSuccess("删除成功");
+      }).catch(() => {});
+    },
+    /** 导出按钮操作 */
+    handleExport() {
+      this.download('suport/piont/export', {
+        ...this.queryParams
+      }, `piont_${new Date().getTime()}.xlsx`)
+    },
+
+    /** 导入按钮操作 */
+    handleImport() {
+      this.upload.title = "检查点管理";
+      this.upload.open = true;
+    },
+    /** 下载模板操作 */
+    importTemplate() {
+      this.download(
+        "suport/piont/importTemplate",
+        {},
+        `检查点管理导入模板.xlsx`
+      );
+    },
+    // 文件上传中处理
+    handleFileUploadProgress(event, file, fileList) {
+      this.upload.isUploading = true;
+    },
+    // 文件上传成功处理
+    handleFileSuccess(response, file, fileList) {
+      this.upload.open = false;
+      this.upload.isUploading = false;
+      this.$refs.upload.clearFiles();
+      this.$alert(
+        "<div style='overflow: auto;overflow-x: hidden;max-height: 70vh;padding: 10px 20px 0;'>" +
+          response.msg +
+          "</div>",
+        "导入结果",
+        { dangerouslyUseHTMLString: true }
+      );
+      this.getList();
+    },
+    // 提交上传文件
+    submitFileForm() {
+      this.$refs.upload.submit();
+    },
+  }
+};
+</script>