whj 11 ヶ月 前
コミット
be31f062dc

+ 15 - 0
src/api/workplace/backlog.js

@@ -262,3 +262,18 @@ export function putTicketList (parameter) {
     method: 'Put'
   })
 }
+/**
+ * page func
+ * parameter: { }
+ * @param parameter
+ * @returns {*}
+ */
+export function getTemplateList (parameter) {
+  return axios({
+    url: '/work/place/template/list?'+stringify(parameter),
+    method: 'get',
+    headers: {
+      'Content-Type': 'application/json;charset=UTF-8'
+    }
+  })
+}

BIN
src/assets/icons/original.png


+ 1 - 1
src/views/custom/form/modules/SubmitForm.vue

@@ -3,7 +3,7 @@
     <a-row :gutter="48" slot="extra">
       <a-col :md="48" :sm="48">
         <a-space class="table-page-search-submitButtons">
-          <a-button :loading="confirmLoading" type="primary" @click="save()">保存</a-button>
+          <a-button :loading="confirmLoading" type="primary" @click="save()">提交</a-button>
           <a-button type="default" @click="handleCancel()">返回</a-button>
         </a-space>
       </a-col>

+ 63 - 189
src/views/workplace/newWoekplace/Workplace.vue

@@ -1,11 +1,11 @@
 <template>
   <div>
-    <div>
-      <div class="gutter-example">
-        <div style="display:flex;justify-content: space-between;align-items: center; padding-bottom:20px;">
-          <div style="display:flex; width:100px;height:17px;justify-content: space-between;align-items: center;">
-            <div style=" width: 17px;height: 17px;background: #3462FD;border-radius: 50%;"></div>
-            <div style="font-size: 18px;font-weight: 800;color: #333333;">快捷菜单</div>
+    <div v-show="visible">
+      <div class="gutter-example" style="padding:0 10px">
+        <div style="display:flex;justify-content: space-between;align-items: center; padding-bottom:10px;">
+          <div style="display:flex; width:80px;height:17px;justify-content: space-between;align-items: center;">
+            <div style=" width: 12px;height: 12px;background: #3462FD;border-radius: 50%;"></div>
+            <div style="font-size: 16px;font-weight: 800;color: #333333;">常用功能</div>
           </div>
         </div>
         <div class="manage">
@@ -14,18 +14,18 @@
           </a-button>
         </div>
         <a-row :gutter="[20,40]" v-if="commonMenus.length>0">
-          <a-col class="gutter-row" :span="3" v-for="item in commonMenus" :key="item.id" @click="handleClickMenu(item)">
+          <a-col class="gutter-row" :span="2" v-for="item in commonMenus" :key="item.id" @click="handleClickMenu(item)">
             <a-badge :count="item.waitDoNum">
               <div class="gutter-box">
                 <div style="margin-bottom:5px;">
-                  <img :src="item.menuIconPath" alt="" width="80" height="80">
+                  <img :src="item.menuIconPath" alt="" width="50" height="50">
                 </div>
                 {{ item.menuName }}
               </div>
             </a-badge>
           </a-col>
         </a-row>
-        <a-empty v-else description="请先配置快捷菜单" image="https://gw.alipayobjects.com/mdn/miniapp_social/afts/img/A*pevERLJC9v0AAAAAAAAAAABjAQAAAQ/original" :image-style="{
+        <a-empty v-else description="请先配置快捷菜单" :image="original" :image-style="{
       height: '60px',
     }">
           <a-button type="primary" @click="$refs.menusModal.base()">
@@ -34,28 +34,20 @@
         </a-empty>
         <br>
       </div>
-      <div class="gutter-example">
+      <div>
         <a-row :gutter="20">
           <a-col class="gutter-row" :span="24">
             <div class="information">
-              <div style="display:flex;justify-content: space-between;align-items: center; padding-bottom:20px;">
-                <div style="display:flex; width:100px;height:17px;justify-content: space-between;align-items: center;">
-                  <div style=" width: 17px;height: 17px;background: #3462FD;border-radius: 50%;"></div>
-                  <div style="font-size: 18px;font-weight: 800;color: #333333;">待办事项</div>
-                </div>
-              </div>
-              <a-tabs size="small" :tabBarGutter="10">
-                <a-tab-pane :key="item.name" :tab="item.name+'('+item.num+')'" v-for="item in model.noticeList">
-                  <ul class="notice">
-                    <li v-for="list in item.itemList" :key="list.id" @click="handleVerify(list,item.verifyTyp)">
-                      <div class="notice-info">
-                        <div>{{ list.name }}</div>
-                        <div class="time">
-                          {{ list.createdUserName }} {{ list.createdTime }}
-                        </div>
-                      </div>
-                    </li>
-                  </ul>
+              <a-tabs v-model="activeKey" :tabBarGutter="10" @change="getData">
+                <template #tabBarExtraContent>
+                  <a-input-search placeholder="关键字搜索" allowClear v-model="params.name" enter-button @search="getData"></a-input-search>
+                </template>
+                <a-tab-pane :key="item.key" :tab="item.name" v-for="item in tabs">
+                  <a-row :gutter="[10,10]">
+                    <a-col :span="6" v-for="list in dataList" :key="list.id">
+                      <div class="notice" @click="handleClick(list,activeKey)"><span class="icon"><a-icon type="file-text" theme="filled" /></span> {{ list.name }}</div>
+                    </a-col>
+                  </a-row>
                 </a-tab-pane>
               </a-tabs>
             </div>
@@ -64,143 +56,73 @@
       </div>
     </div>
     <MenusModal ref="menusModal" @ok="getCommonMenuMine" />
+    <TemplateForm ref="TemplateForm" @ok="handleOk" />
   </div>
 </template>
 
 <script>
 import { STable } from '@/components'
-// import { getWaitData } from '@/api/workplace/backlog'
+import { getTemplateList } from '@/api/workplace/backlog'
 import MenusModal from './modules/MenusModal'
 import { getCommonMenuMine } from '@/api/common/menu-mine'
+import original from '@/assets/icons/original.png'
+
+import { fetchCustomForm } from '@/api/custom/form'
+import TemplateForm from '@/views/custom/form/modules/SubmitForm.vue'
 export default {
-  name: 'NewWorkplaceBacklog',
+  name: 'Workplace',
   components: {
     STable,
     MenusModal,
+    TemplateForm,
   },
   data() {
     return {
       visible: true,
+      original,
       commonMenus: [],
       // 加载数据方法 必须为 Promise 对象
-      model: {
-        noticeList: [],
-      },
+      tabs: [
+        {
+          name: '常用模板',
+          key: 1,
+        },
+      ],
+      activeKey: 1,
+      params: {},
+      dataList: [],
     }
   },
   computed: {},
   created() {
-    // this.getData()
+    this.getData()
     this.getCommonMenuMine()
   },
   methods: {
     getData() {
-      getWaitData().then((res) => {
-        this.model = res.data
-      })
+      switch (this.activeKey) {
+        case 1:
+          getTemplateList(this.params).then((res) => {
+            this.dataList = res.data
+          })
+          break
+      }
     },
     getCommonMenuMine() {
       getCommonMenuMine().then((res) => {
         this.commonMenus = res.data
       })
     },
-    handleVerify(record, type) {
+    handleClick(record, type) {
       switch (type) {
-        // 招标公告审批
+        // 常用模板
         case 1:
-          fetchVerifyArticle({ id: record.objId, verifyType: type }).then((res) => {
-            this.visible = false
-            const modal = this.$refs.articleVerify
-            modal.base(res.data, 1)
-          })
-          break
-        // 项目发布审批
-        case 2:
-          fetchInquiry({ id: record.objId, verifyType: type }).then((res) => {
-            this.visible = false
-            const modal = this.$refs.projectReleaseVerify
-            modal.base(res.data, record)
-          })
-          break
-        // 入库单审批
-        case 3:
-          fetchInquiryInStore({ id: record.objId }).then((res) => {
+          fetchCustomForm({ id: record.id }).then((res) => {
             this.visible = false
-            const modal = this.$refs.inStoreVerify
-            modal.base(res.data, record)
-          })
-          break
-        // 供应商入库审批
-        case 5:
-          fetchCompanyInfo({ id: record.objId }).then((res) => {
-            this.visible = false
-            const modal = this.$refs.supplierInStore
+            const modal = this.$refs.TemplateForm
             modal.base(res.data)
           })
-
-          break
-        // 招标项目供应商报名审批
-        case 6:
-          fetchSupplierApply({ id: record.objId }).then((res) => {
-            this.visible = false
-            const modal = this.$refs.supplierApplyArticleVerify
-            modal.base(res.data, record)
-          })
-          break
-        // 订单审批
-        case 7:
-          getFeeOrderInfo({ id: record.objId }).then((res) => {
-            this.visible = false
-            const modal = this.$refs.orderVerify
-            modal.base(res.data, record)
-          })
-          break
-        // 手动开标审批
-        case 8:
-          fetchInquiry({ id: record.objId }).then((res) => {
-            this.visible = false
-            const modal = this.$refs.bidVerify
-            modal.base(res.data, record)
-          })
           break
-        // 询价项目评审
-        case 9:
-          this.visible = false
-          record.type = 1
-          this.$refs.projectVerify.base(record)
-          break
-        // 招标项目评审
-        case 10:
-          this.visible = false
-          record.type = 2
-          this.$refs.projectVerify.base(record)
-          break
-        // 供应商考核
-        case 11:
-          this.visible = false
-          this.$refs.supplierVerify.base(record)
-          break
-        case 12:
-          fetchInquiry({ id: record.objId }).then((res) => {
-            this.visible = false
-            const modal = this.$refs.failureVerify
-            modal.base(res.data, record)
-          })
-          break
-        case 13:
-          fetchInquiryInStore({ id: record.objId }).then((res) => {
-            this.visible = false
-            const modal = this.$refs.inStoreVerify
-            modal.base(res.data, record)
-          })
-          break
-      }
-    },
-    handleClickMenu(record) {
-      if (record.menuName !== '过程考核') {
-        this.$router.push(record.menuRouterUrl)
-      } else {
-        this.$router.push('/process/assess/bom')
       }
     },
     handleOk() {
@@ -219,7 +141,6 @@ export default {
 }
 .gutter-example {
   position: relative;
-
   .manage {
     position: absolute;
     z-index: 22;
@@ -230,79 +151,32 @@ export default {
 .gutter-box {
   text-align: center;
   color: #666;
-  font-size: 16px;
-  cursor: pointer;
-
-  .icon {
-    color: #fff;
-    margin: 0 auto;
-    background: linear-gradient(to right, #3066ec);
-    width: 80px;
-    height: 80px;
-    border-radius: 20px;
-    font-size: 30px;
-    line-height: 80px;
-  }
-}
-.btn {
-  height: 113px;
-  width: 100%;
-  color: #fff !important;
-  font-size: 28px;
-  border-radius: 20px;
-  display: flex;
-  align-items: center;
-  justify-content: space-around;
-}
-.btn:hover {
+  font-size: 14px;
   cursor: pointer;
 }
+
 .information {
   background: #fff;
-  padding: 30px 12px;
+  padding: 10px 12px;
   height: 600px;
   color: #666;
 }
-.discolor {
-  background: #efeffb;
-}
-.demo-infinite-container {
-  overflow: auto;
-  height: 400px;
-}
 .notice {
   font-size: 14px;
   font-family: PingFang SC;
   font-weight: 500;
-  color: #999999;
-  height: 450px;
-  padding: 20px 50px;
-  overflow-y: auto;
-  .notice-info {
-    display: flex;
-    margin-bottom: 20px;
-    justify-content: space-between;
-    align-items: center;
-    list-style: disc;
-    cursor: pointer;
-    div:nth-child(1) {
-      padding-right: 20px;
-      overflow: hidden;
-      text-overflow: ellipsis;
-      white-space: nowrap;
-    }
-    .time {
-      min-width: 138px;
-    }
+  color: #333;
+  cursor: pointer;
+  padding: 10px;
+  //单行
+  overflow: hidden;
+  text-overflow: ellipsis;
+  white-space: nowrap;
+  .icon {
+    color: #1890ff;
+    margin-right: 5px;
   }
 }
-/deep/ .ant-table-placeholder {
-  height: 360px;
-  display: flex;
-  flex-direction: column;
-  align-items: center;
-  justify-content: center;
-}
 ::-webkit-scrollbar {
   width: 0;
   height: 0;