whj 11 tháng trước cách đây
mục cha
commit
84c0fd2160

+ 9 - 3
src/views/custom/form/modules/SubmitForm.vue

@@ -21,6 +21,7 @@
 import MComponent from './component/modules/Component.vue'
 import SelectInfo from './component/modules/SelectInfo'
 import { addCustomData } from '@/api/custom/form'
+import moment from 'moment'
 export default {
   components: {
     MComponent,
@@ -72,18 +73,23 @@ export default {
       } = this
       this.confirmLoading = true
       validateFieldsAndScroll((errors, values) => {
-        console.log(2)
         if (errors) {
           this.confirmLoading = false
           return
         }
-        console.log(3)
+        for (let key in values) {
+          if (values[key] instanceof moment) {
+            values[key] = this.BaseTool.Date.formatter(
+              values[key],
+              this.components.find((item) => item.value === key).attrs.format
+            )
+          }
+        }
         const params = {
           jsonString: JSON.stringify(values),
           flowId: this.record.flowId,
           formId: this.record.id,
         }
-        console.log(params)
         addCustomData(params).then((res) => {
           this.handleCancel()
         })

+ 4 - 0
src/views/workplace/publish/WaitPublish.vue

@@ -132,6 +132,7 @@ export default {
         {
           title: '序号',
           dataIndex: 'index',
+          width: '80px',
           customRender: (text, record, index) => {
             return `${
               (this.$refs.table.localPagination.current - 1) * this.$refs.table.localPagination.pageSize + index + 1
@@ -140,15 +141,18 @@ export default {
         },
         {
           title: '标题',
+          width: 300,
           ellipsis: true,
           dataIndex: 'taskName',
         },
         {
           title: '创建时间',
+          width: '120px',
           dataIndex: 'taskCreatedTime',
         },
         {
           title: '状态',
+          width: '120px',
           dataIndex: 'taskStatus',
           customRender: (text, record, index) => {
             return this.statusMap[text]

+ 80 - 78
src/views/workplace/publish/WaitWork.vue

@@ -1,89 +1,91 @@
 <template>
-  <a-card :bordered="false">
-    <a-drawer title="筛选" placement="top" :closable="false" :visible="filterVisible" @close="filterVisible=false">
-      <div class="table-page-search-wrapper" @keyup.enter="handleEnter">
-        <a-form layout="inline">
-          <a-row :gutter="48">
-            <a-col :md="8" :sm="24">
-              <a-form-item label="标题">
-                <a-input v-model.trim="queryParam.taskName" placeholder="请输入标题" />
-              </a-form-item>
-            </a-col>
-            <a-col :md="8" :sm="24">
-              <a-form-item label="任务创建时间">
-                <a-range-picker style="width:100%" showTime :format="BaseTool.Date.PICKER_NORM_DATETIME_PATTERN" v-model="createdTime" />
-              </a-form-item>
-            </a-col>
-            <a-col :md="8" :sm="24">
-              <a-form-item label="任务发起时间">
-                <a-range-picker style="width:100%" PICKER_NORM_DATE_PATTERN :format="BaseTool.Date.PICKER_NORM_DATETIME_PATTERN" v-model="applyTime" />
-              </a-form-item>
-            </a-col>
+  <div>
+    <a-card :bordered="false" v-show="visible">
+      <a-drawer title="筛选" placement="top" :closable="false" :visible="filterVisible" @close="filterVisible=false">
+        <div class="table-page-search-wrapper" @keyup.enter="handleEnter">
+          <a-form layout="inline">
+            <a-row :gutter="48">
+              <a-col :md="8" :sm="24">
+                <a-form-item label="标题">
+                  <a-input v-model.trim="queryParam.taskName" placeholder="请输入标题" />
+                </a-form-item>
+              </a-col>
+              <a-col :md="8" :sm="24">
+                <a-form-item label="任务创建时间">
+                  <a-range-picker style="width:100%" showTime :format="BaseTool.Date.PICKER_NORM_DATETIME_PATTERN" v-model="createdTime" />
+                </a-form-item>
+              </a-col>
+              <a-col :md="8" :sm="24">
+                <a-form-item label="任务发起时间">
+                  <a-range-picker style="width:100%" PICKER_NORM_DATE_PATTERN :format="BaseTool.Date.PICKER_NORM_DATETIME_PATTERN" v-model="applyTime" />
+                </a-form-item>
+              </a-col>
 
-            <a-col :md=" 24" :sm="24" style="text-align: right">
-              <span class="table-page-search-submitButtons">
-                <a-button type="primary" @click="$refs.table.refresh(true)">查询</a-button>
-                <a-button style="margin-left: 8px" @click="resetSearchForm">重置</a-button>
-              </span>
-            </a-col>
-          </a-row>
-        </a-form>
-      </div>
-    </a-drawer>
-    <div v-show="visible">
-      <div class="table-page-search-wrapper" @keyup.enter="handleEnter">
-        <a-form layout="inline">
-          <a-row :gutter="48">
-            <a-col :md="6" :sm="24">
-              <a-form-item label="关键字">
-                <a-input v-model.trim="queryParam.taskName" placeholder="请输入标题" />
-              </a-form-item>
-            </a-col>
-            <a-col :md="6 || 24" :sm="24">
-              <span class="table-page-search-submitButtons">
-                <a-button type="primary" @click="$refs.table.refresh(true)">查询</a-button>
-                <a-button type="primary" style="margin-left: 8px" @click="filterVisible=true">筛选</a-button>
-                <a-button style="margin-left: 8px" @click="resetSearchForm">重置</a-button>
-              </span>
+              <a-col :md=" 24" :sm="24" style="text-align: right">
+                <span class="table-page-search-submitButtons">
+                  <a-button type="primary" @click="$refs.table.refresh(true)">查询</a-button>
+                  <a-button style="margin-left: 8px" @click="resetSearchForm">重置</a-button>
+                </span>
+              </a-col>
+            </a-row>
+          </a-form>
+        </div>
+      </a-drawer>
+      <div>
+        <div class="table-page-search-wrapper" @keyup.enter="handleEnter">
+          <a-form layout="inline">
+            <a-row :gutter="48">
+              <a-col :md="6" :sm="24">
+                <a-form-item label="关键字">
+                  <a-input v-model.trim="queryParam.taskName" placeholder="请输入标题" />
+                </a-form-item>
+              </a-col>
+              <a-col :md="6 || 24" :sm="24">
+                <span class="table-page-search-submitButtons">
+                  <a-button type="primary" @click="$refs.table.refresh(true)">查询</a-button>
+                  <a-button type="primary" style="margin-left: 8px" @click="filterVisible=true">筛选</a-button>
+                  <a-button style="margin-left: 8px" @click="resetSearchForm">重置</a-button>
+                </span>
+              </a-col>
+            </a-row>
+          </a-form>
+        </div>
+
+        <div class="table-operator" style="margin-bottom: 8px;">
+          <a-row>
+            <a-col :md="16">
+              <!-- <a-button type="primary" icon="plus" @click="handleAdd()">新增</a-button> -->
+              <a-dropdown v-action:edit v-if="selectedRowKeys.length > 0">
+                <a-menu slot="overlay">
+                  <a-popconfirm title="是否要删除所选数据?" @confirm="batchDelete()">
+                    <a-menu-item key="1"><a-icon type="delete" /><a>删除</a></a-menu-item>
+                  </a-popconfirm>
+                </a-menu>
+                <a-button style="margin-left: 8px">
+                  批量操作 <a-icon type="down" />
+                </a-button>
+              </a-dropdown>
             </a-col>
           </a-row>
-        </a-form>
-      </div>
+        </div>
 
-      <div class="table-operator" style="margin-bottom: 8px;">
-        <a-row>
-          <a-col :md="16">
-            <!-- <a-button type="primary" icon="plus" @click="handleAdd()">新增</a-button> -->
-            <a-dropdown v-action:edit v-if="selectedRowKeys.length > 0">
-              <a-menu slot="overlay">
-                <a-popconfirm title="是否要删除所选数据?" @confirm="batchDelete()">
-                  <a-menu-item key="1"><a-icon type="delete" /><a>删除</a></a-menu-item>
-                </a-popconfirm>
-              </a-menu>
-              <a-button style="margin-left: 8px">
-                批量操作 <a-icon type="down" />
-              </a-button>
-            </a-dropdown>
-          </a-col>
-        </a-row>
-      </div>
-
-      <s-table ref="table" :scroll="{x: 1300, y: BaseTool.Constant.scrollY }" size="default" rowKey="id" :columns="columns" :data="loadData" :alert="options.alert" :rowSelection="options.rowSelection" showPagination="auto">
-        <span slot="action" slot-scope="record">
-          <template>
-            <a @click="handleView(record.id)">查看</a>
-            <operation-button @click="handleAudit(record.id)">审核</operation-button>
+        <s-table ref="table" :scroll="{x: 1300, y: BaseTool.Constant.scrollY }" size="default" rowKey="id" :columns="columns" :data="loadData" :alert="options.alert" :rowSelection="options.rowSelection" showPagination="auto">
+          <span slot="action" slot-scope="record">
+            <template>
+              <a @click="handleView(record.id)">查看</a>
+              <operation-button @click="handleAudit(record.id)">审核</operation-button>
+            </template>
+          </span>
+          <template #readFlag="text">
+            <a-icon type="eye" v-if="text" style="color: #1890ff" />
+            <a-icon type="eye-invisible" v-else />
           </template>
-        </span>
-        <template #readFlag="text">
-          <a-icon type="eye" v-if="text" style="color: #1890ff" />
-          <a-icon type="eye-invisible" v-else />
-        </template>
-      </s-table>
-    </div>
+        </s-table>
+      </div>
+    </a-card>
     <AuditDetail ref="auditDetail" @ok="handleOk" />
     <Detail ref="detail" @ok="handleOk" />
-  </a-card>
+  </div>
 </template>
 
 <script>

+ 103 - 37
src/views/workplace/publish/modules/AuditDetail.vue

@@ -1,40 +1,64 @@
 <template>
-  <a-card :bordered="false" v-show="visible" class="card" :title="modalTitle">
-    <a-row :gutter="48" slot="extra">
-      <a-col :md="48" :sm="48">
-        <a-space class="table-page-search-submitButtons">
-          <a-button type="default" @click="handleCancel()">返回</a-button>
-        </a-space>
-      </a-col>
-    </a-row>
+  <div v-show="visible">
     <!-- <div class="btn">
       <a-space class="table-page-search-submitButtons">
         <a-button :loading="confirmLoading" type="primary" @click="save()">提交</a-button>
         <a-button type="default" @click="handleCancel()">返回</a-button>
       </a-space>
     </div> -->
-    <title-divider title="业务信息" width="140px"></title-divider>
-    <a-descriptions :column="2" bordered>
-      <template v-for="item in descriptions">
-        <a-descriptions-item v-if="item.type==='dataSelect'" :key="item.value" :label="item.label">
-          {{ detail[item.attrs.connect[1].bind] }}
-        </a-descriptions-item>
-        <a-descriptions-item v-else :key="item.value" :label="item.label">
-          {{ detail[item.value] }}
-        </a-descriptions-item>
-      </template>
 
-    </a-descriptions>
-    <title-divider title="审批处理" width="140px"></title-divider>
-    <a-row type="flex" justify="space-between">
-      <a-col :span="10">
-        <a-form :form="form" :labelCol="BaseTool.Constant.labelCol" :wrapperCol="BaseTool.Constant.wrapperCol">
+    <a-row :gutter="20">
+      <a-col :span="18">
+        <div class="detail card">
+          <title-divider title="业务信息" width="140px"></title-divider>
+          <a-descriptions :column="2" bordered>
+            <template v-for="item in descriptions">
+              <a-descriptions-item v-if="item.type==='dataSelect'" :key="item.value" :label="item.label">
+                {{ detail[item.attrs.connect[1].bind] }}
+              </a-descriptions-item>
+              <a-descriptions-item v-else :key="item.value" :label="item.label">
+                {{ detail[item.value] }}
+              </a-descriptions-item>
+            </template>
+          </a-descriptions>
+          <title-divider title="审核进度" width="140px"></title-divider>
+          <a-list item-layout="vertical" :data-source="model.recordList">
+            <a-list-item slot="renderItem" key="item.title" slot-scope="item">
+              <a-list-item-meta>
+                <template #title>
+                  <div style="width:100%;height:35px;display:flex;justify-content: space-between;align-items: center;font-size: 14px;">
+                    <span>{{ item.createdUserName }} - {{ statusMap[item.handleStatus] }}</span> <span>{{ item.createdTime }}</span>
+                  </div>
+                </template>
+
+                <a-avatar :style="{ backgroundColor: colors[item.handleStatus%4], verticalAlign: 'middle' }" slot="avatar">
+                  <my-icon v-if="icons[item.handleStatus].includes('icon-')" :type="icons[item.handleStatus]"></my-icon>
+                  <a-icon v-else :type="icons[item.handleStatus]"></a-icon>
+                </a-avatar>
+              </a-list-item-meta>
+              <div>
+                <div style="font-size: 12px">{{ item.handleRemark }}</div>
+                <a-space>
+                  <img v-for="file in item.imageList" :key="file.id" :src="file.url" :alt="file.name" width="80px" @click="$refs.imgView.base(file.url)" />
+                </a-space>
+                <br>
+                <a-space direction="vertical">
+                  <a style="font-size: 12px" v-for="file in item.fileList" :key="file.id" target="_blank" :href="file.url"><a-icon type="file" />{{ file.name }}</a>
+                </a-space>
+              </div>
+
+            </a-list-item>
+          </a-list>
+        </div>
+      </a-col>
+      <a-col :span="6">
+        <a-form class="card" :form="form" :labelCol="BaseTool.Constant.labelCol2" :wrapperCol="BaseTool.Constant.wrapperCol2">
           <a-form-item v-show="false">
             <a-input v-decorator="['taskBomId']" type="hidden" />
             <a-input v-decorator="['taskId']" type="hidden" />
           </a-form-item>
           <a-form-item label="审批">
-            <a-radio-group v-decorator="['handleStatus', {initialValue:3, rules: [{required: true, message: '审批不能为空'}]}]" @change="handleSelect">
+            <a-radio-group v-decorator="['handleStatus', {initialValue:3}]" @change="handleSelect">
               <template v-for="(label,value) in statusMap">
                 <a-radio v-if="value>2&&value<6" :key="value" :value="parseInt(value)">{{label}}</a-radio>
               </template>
@@ -46,30 +70,50 @@
           <a-form-item label="附件">
             <UploadFile v-decorator="['fileList']" />
           </a-form-item>
-          <a-form-item label="审批备注">
-            <a-textarea v-decorator="['handleRemark', {initialValue:'同意',rules: [{required: true, message: '审批备注不能为空'}]}]" />
+          <a-form-item label="备注">
+            <a-textarea v-decorator="['handleRemark', {initialValue:'同意'}]" />
           </a-form-item>
-          <a-form-item label=" ">
-            <a-button :loading="confirmLoading" type="primary" @click="save()">提交</a-button>
+          <a-form-item>
+            <div class="btn">
+              <a-space>
+                <a-button :loading="confirmLoading" type="primary" @click="save()">提交</a-button>
+                <a-button type="default" @click="handleCancel()">返回</a-button>
+              </a-space>
+            </div>
           </a-form-item>
         </a-form>
       </a-col>
-      <a-col :span="10">
-
-      </a-col>
     </a-row>
-  </a-card>
+    <ImgView ref="imgView" />
+  </div>
 </template>
 
 <script>
 import { verifyWorkflow } from '@/api/workflow/publish'
 import UploadFile from '@/components/Upload/CUploadFile.vue'
 import UploadImg from '@/components/Upload/CUploadImg.vue'
+import ImgView from '@/components/viewImg/index.vue'
 export default {
   name: 'WorkflowTaskBomFieldDetail',
-  components: { UploadFile, UploadImg },
+  components: { UploadFile, UploadImg, ImgView },
   data() {
     return {
+      colors: {
+        1: '#666',
+        2: '#1890ff',
+        3: '#52c41a',
+        4: '#f5222d',
+        5: '#faad14',
+        6: '#faad14',
+      },
+      icons: {
+        1: 'highlight',
+        2: 'icon-huojian',
+        3: 'check',
+        4: 'close',
+        5: 'exclamation',
+        6: 'exclamation',
+      },
       confirmLoading: false,
       modalTitle: null,
       visible: false,
@@ -141,12 +185,34 @@ export default {
 <style lang="less" scoped>
 .card {
   min-height: calc(100vh - 150px);
+  max-height: calc(100vh - 150px);
+  background: #fff;
+  padding: 20px;
+  border-radius: 4px;
+  overflow-y: auto;
+  //隐藏滚动条
+  // &::-webkit-scrollbar {
+  //   display: none;
+  // }
+  //滚动条整体部分
+  &::-webkit-scrollbar {
+    width: 6px;
+    height: 6px;
+  }
+  //滚动条的轨道(里面装有Thumb)
+  &::-webkit-scrollbar-track {
+    background-color: #f1f1f1;
+  }
+  //滚动条里面的小方块,能向上向下移动(或往左往右移动,取决于是垂直滚动条还是水平滚动条)
+  &::-webkit-scrollbar-thumb {
+    background-color: #c1c1c1;
+  }
 }
 .btn {
   text-align: center;
-  position: absolute;
-  bottom: 20px;
-  left: 50%;
-  transform: translateX(-50%);
+  width: 100%;
+}
+/deep/ .ant-radio-wrapper {
+  margin-right: 4px;
 }
 </style>