qushaowei
2024-01-11 240c74ffb2b98faddf76648116ca9eeb61ee2cde
src/views/eam/ABC/StreamList.vue
@@ -1,12 +1,16 @@
<template>
  <a-card :bordered="false">
  <a-card
    title='ABC评分'
    :bordered="false"
  >
    <!-- 查询区域 -->
    <div class="table-page-search-wrapper">
      <a-form layout="inline" @keyup.enter.native="searchQuery">
        <a-row :gutter="24">
          <a-col
          :span="6"
      <a-form
        layout="inline"
        @keyup.enter.native="searchQuery"
          >
        <a-row :gutter="24">
          <a-col :span="6">
            <a-form-item 
            :labelCol="labelCol"
            :wrapperCol="wrapperCol"
@@ -34,7 +38,12 @@
        @click="searchReset"
        icon="reload"
      >重置</a-button>
      <a-button @click="handleAdd" type="primary" icon="plus" v-if="nodeSort===1">新增</a-button>
      <a-button
        @click="handleAdd"
        type="primary"
        icon="plus"
        v-if="nodeSort===1"
      >新增</a-button>
      <!-- <a-button type="primary" icon="download" @click="handleExportXls('设备ABC评价')">导出</a-button>
      <a-upload name="file" :showUploadList="false" :multiple="false" :headers="tokenHeader" :action="importExcelUrl" @change="handleImportExcel">
        <a-button type="primary" icon="import">导入</a-button>
@@ -45,9 +54,15 @@
    <!-- table区域-begin -->
    <div>
      <div class="ant-alert ant-alert-info" style="margin-bottom: 16px;">
      <div
        class="ant-alert ant-alert-info"
        style="margin-bottom: 16px;"
      >
        <i class="anticon anticon-info-circle ant-alert-icon"></i> 已选择 <a style="font-weight: 600">{{ selectedRowKeys.length }}</a>项
        <a style="margin-left: 24px" @click="onClearSelected">清空</a>
        <a
          style="margin-left: 24px"
          @click="onClearSelected"
        >清空</a>
      </div>
      <a-table
@@ -56,39 +71,77 @@
        bordered
        rowKey="id"
        class="j-table-force-nowrap"
        :scroll="{x:true}"
        :columns="columns"
        :dataSource="dataSource"
        :pagination="ipagination"
        :loading="loading"
        :rowSelection="{selectedRowKeys: selectedRowKeys, onChange: onSelectChange, type:'radio'}"
        :customRow="clickThenSelect"
        @change="handleTableChange">
        @change="handleTableChange"
      >
        <!-- :scroll="{x:true}" -->
        <template slot="htmlSlot" slot-scope="text">
        <template
          slot="htmlSlot"
          slot-scope="text"
        >
          <div v-html="text"></div>
        </template>
        <template slot="imgSlot" slot-scope="text,record">
          <span v-if="!text" style="font-size: 12px;font-style: italic;">无图片</span>
          <img v-else :src="getImgView(text)" :preview="record.id" height="25px" alt="" style="max-width:80px;font-size: 12px;font-style: italic;"/>
        <template
          slot="imgSlot"
          slot-scope="text,record"
        >
          <span
            v-if="!text"
            style="font-size: 12px;font-style: italic;"
          >无图片</span>
          <img
            v-else
            :src="getImgView(text)"
            :preview="record.id"
            height="25px"
            alt=""
            style="max-width:80px;font-size: 12px;font-style: italic;"
          />
        </template>
        <template slot="fileSlot" slot-scope="text">
          <span v-if="!text" style="font-size: 12px;font-style: italic;">无文件</span>
        <template
          slot="fileSlot"
          slot-scope="text"
        >
          <span
            v-if="!text"
            style="font-size: 12px;font-style: italic;"
          >无文件</span>
          <a-button
            v-else
            :ghost="true"
            type="primary"
            icon="download"
            size="small"
            @click="downloadFile(text)">
            @click="downloadFile(text)"
          >
            下载
          </a-button>
        </template>
        <span slot="action" slot-scope="text, record">
        <span
          slot="action"
          slot-scope="text, record"
        >
          <div v-if="nodeValue===record.status">
            <a @click="handleStreamNext(record)" :disabled="nodeSort===1&&nodeValue!==record.status" v-if="button1!={}">{{button1.name}}</a>
          <a-divider type="vertical" v-if="button2!={}"/>
            <a @click="handleStreamLast(record)" :disabled="nodeSort===1" v-if="button2!={}" >{{button2.name}}</a>
            <a
              @click="handleStreamNext(record)"
              :disabled="nodeSort===1&&nodeValue!==record.status"
              v-if="button1!={}"
            >{{button1.name}}</a>
            <a-divider
              type="vertical"
              v-if="button2!={}"
            />
            <a
              @click="handleStreamLast(record)"
              :disabled="nodeSort===1"
              v-if="button2!={}"
            >{{button2.name}}</a>
         </div>
         <div v-if="nodeSort===1&&nodeValue===record.status">
          <a-divider type="vertical" />
@@ -96,7 +149,10 @@
            <a class="ant-dropdown-link">更多 <a-icon type="down" /></a>
            <a-menu slot="overlay">
              <a-menu-item>
                <a-popconfirm title="确定删除吗?" @confirm="() => handleDelete(record.id)">
                  <a-popconfirm
                    title="确定删除吗?"
                    @confirm="() => handleDelete(record.id)"
                  >
                  <a>删除</a>
                </a-popconfirm>
              </a-menu-item>
@@ -112,16 +168,29 @@
    </div>
    <a-tabs defaultActiveKey="1">
      <a-tab-pane tab="操作记录" key="1" >
      <a-tab-pane
        tab="操作记录"
        key="1"
      >
        <StreamOperationList :mainId="streamOperationMainId" />
      </a-tab-pane>
      <a-tab-pane tab="ABC评分" key="2" forceRender>
      <a-tab-pane
        tab="ABC评分"
        key="2"
        forceRender
      >
        <ABCAssessmentList :mainId="aBCAssessmentMainId" />
      </a-tab-pane>
    </a-tabs>
    <stream-modal ref="modalForm" @ok="modalFormOk"></stream-modal>
    <node-model ref="nodeModel" @ok="modalFormOk"></node-model>
    <stream-modal
      ref="modalForm"
      @ok="modalFormOk"
    ></stream-modal>
    <node-model
      ref="nodeModel"
      @ok="modalFormOk"
    ></node-model>
  </a-card>
</template>
@@ -172,26 +241,23 @@
            title:'单据号',
            align:"center",
            dataIndex: 'num',
            width:400
          },
          {
            title:'当前节点',
            align:"center",
            dataIndex: 'status_dictText',
            width:300
          },
          {
            title:'单据类型',
            align:"center",
            dataIndex: 'type_dictText',
            width:300
          },
          {
            title:'发起时间',
            align:"center",
            dataIndex: 'createTime',
            width:300
          },
        // width: 300
          {
            title:'发起人',
            align:"center",
@@ -201,10 +267,9 @@
            title: '操作',
            dataIndex: 'action',
            align:"center",
            fixed:"right",
            width:200,
            scopedSlots: { customRender: 'action' },
          }
        // fixed: "right",
        ],
        url: {
          list: "/eam/stream/list",
@@ -219,8 +284,8 @@
        /* 分页参数 */
        ipagination:{
          current: 1,
          pageSize: 5,
          pageSizeOptions: ['5', '10', '50'],
        pageSize: 20,
        pageSizeOptions: ['5', '10', '20', '50'],
          showTotal: (total, range) => {
            return range[0] + "-" + range[1] + " 共" + total + "条"
          },
@@ -351,5 +416,5 @@
  }
</script>
<style scoped>
  @import '~@assets/less/common.less'
@import '~@assets/less/common.less';
</style>