Bläddra i källkod

增加电签状态

iZaiZaiA 3 år sedan
förälder
incheckning
860dd32b95

+ 0 - 2
package.json

@@ -21,13 +21,11 @@
         "remixicon": "^2.5.0",
         "vooks": "^0.2.12",
         "vue": "^3.2.40",
-        "vue-codemirror": "^6.1.1",
         "vue-router": "^4.1.5",
         "vue-utils-plus": "^1.0.3",
         "vuedraggable": "^4.1.0"
     },
     "devDependencies": {
-        "@codemirror/lang-json": "^6.0.0",
         "@vitejs/plugin-vue": "^3.1.2",
         "@vue/compiler-sfc": "^3.2.40",
         "autoprefixer": "^10.4.12",

+ 0 - 1
src/global/components/hc-dialog/index.vue

@@ -79,7 +79,6 @@ const isShow = ref(props.show)
 const isWidth = ref(props.widths)
 const isLoading = ref(props.loading)
 const isBgColor = ref(props.bgColor)
-const isRowFooter = ref(props.isRowFooter)
 
 //监听
 watch(() => [

+ 18 - 1
src/global/components/hc-table/index.vue

@@ -6,7 +6,7 @@
             <el-table-column type="selection" width="50" v-if="isCheck"/>
             <el-table-column type="index" prop="num" label="序号" width="80" v-if="isIndex"/>
             <template v-for="item in columns">
-                <el-table-column :prop="item.key" :label="item.name" :align="item.align ?? 'left'" :width="item.width ?? ''">
+                <el-table-column :prop="item.key" :label="item.name" :align="item.align ?? 'left'" :width="item.width ?? ''" :fixed="item.fixed ?? false">
                     <template #default="scope" v-if="item.isSlot">
                         <slot :name='item.key' :row="scope.row" :index="scope.$index"></slot>
                     </template>
@@ -162,5 +162,22 @@ defineExpose({
     .el-scrollbar .el-scrollbar__bar.is-vertical {
         right: 0;
     }
+    .el-scrollbar .el-scrollbar__bar.is-horizontal {
+        bottom: 2px;
+    }
+    .el-table__body-wrapper tr td.el-table-fixed-column--left,
+    .el-table__body-wrapper tr td.el-table-fixed-column--right,
+    .el-table__body-wrapper tr th.el-table-fixed-column--left,
+    .el-table__body-wrapper tr th.el-table-fixed-column--right,
+    .el-table__footer-wrapper tr td.el-table-fixed-column--left,
+    .el-table__footer-wrapper tr td.el-table-fixed-column--right,
+    .el-table__footer-wrapper tr th.el-table-fixed-column--left,
+    .el-table__footer-wrapper tr th.el-table-fixed-column--right,
+    .el-table__header-wrapper tr td.el-table-fixed-column--left,
+    .el-table__header-wrapper tr td.el-table-fixed-column--right,
+    .el-table__header-wrapper tr th.el-table-fixed-column--left,
+    .el-table__header-wrapper tr th.el-table-fixed-column--right {
+        --el-bg-color: #ebeef0;
+    }
 }
 </style>

+ 1 - 7
src/router/modules/base.js

@@ -375,16 +375,10 @@ export default [
     {
         path: '/hc-test',
         name: 'hc-test',
-        redirect: '/test/http/index',
+        redirect: '/test/index',
         meta: {title: '测试页面'},
         component: Layout,
         children: [
-            {
-                path: '/test/http/index',
-                name: 'test-http-index',
-                meta: {title: '请求测试'},
-                component: () => import('~src/test/http/index.vue')
-            },
             {
                 path: '/test/index',
                 name: 'test-index',

+ 0 - 1
src/router/modules/token.js

@@ -9,6 +9,5 @@ export default [
     'schedule-table',
     'order-service',
     'user-index',
-    'test-http-index',
     'test-index',
 ]

+ 0 - 43
src/test/http/components/HcCodeEditor.vue

@@ -1,43 +0,0 @@
-<template>
-    <codemirror :modelValue="code" :placeholder="placeholder" :style="{ height: '100%' }" :extensions="extensions" :disabled="isDisabled"/>
-</template>
-
-<script setup>
-import {ref, watch} from "vue";
-import { Codemirror } from 'vue-codemirror'
-import { json } from '@codemirror/lang-json'
-
-//参数
-const props = defineProps({
-    val: {
-        type: [String,Number],
-        default: ''
-    },
-    placeholder: {
-        type: [String,Number],
-        default: ''
-    },
-    data: {
-        type: Object,
-        default: () => ({})
-    },
-    disabled: {
-        type: Boolean,
-        default: true
-    },
-})
-
-//变量
-const code = ref(props.val)
-const isDisabled = ref(props.disabled)
-const extensions = ref([json()])
-
-//监听
-watch(() => [
-    props.val,
-    props.disabled
-], ([val, disabled]) => {
-    code.value = val
-    isDisabled.value = disabled
-})
-</script>

+ 0 - 238
src/test/http/index.vue

@@ -1,238 +0,0 @@
-<template>
-    <div class="hc-page-box">
-        <HcCard>
-            <template #header>
-                <div class="w-32">
-                    <el-select v-model="httpForm.type" placeholder="请求类型" size="large">
-                        <el-option v-for="item in typeData" :label="item" :value="item"/>
-                    </el-select>
-                </div>
-                <div class="w-full ml-3">
-                    <el-input v-model="httpForm.url" size="large" placeholder="请求地址,不要加 域名 和 api 字符" clearable @keyup="keyUpEvent"/>
-                </div>
-                <div class="ml-3">
-                    <el-button type="primary" hc-btn @click="searchClick">
-                        <HcIcon name="send-plane"/>
-                        <span>发起请求</span>
-                    </el-button>
-                </div>
-            </template>
-            <div class="hc-http-form-box">
-                <div class="http-form-config">
-                    <div class="title-box">快速配置</div>
-                    <div class="config-item">
-                        <div class="name-box">
-                            <div class="name">携带 项目ID</div>
-                            <div class="val">{{projectId}}</div>
-                        </div>
-                        <span class="switch">
-                            <el-switch v-model="httpForm.data.projectId" inline-prompt :active-value="projectId" active-text="是" inactive-value="" inactive-text="否" />
-                        </span>
-                    </div>
-                    <div class="config-item">
-                        <div class="name-box">
-                            <div class="name">携带 合同段ID</div>
-                            <div class="val">{{contractId}}</div>
-                        </div>
-                        <span class="switch">
-                            <el-switch v-model="httpForm.data.contractId" inline-prompt :active-value="contractId" active-text="是" inactive-value="" inactive-text="否"/>
-                        </span>
-                    </div>
-                </div>
-                <div class="http-form-data">
-                    <div class="title-box">
-                        <div class="title">提交数据表单</div>
-                        <div class="extra">
-                            <HcNewSwitch :datas="formDataTypeTab" :keys="formDataTypeKey" @change="formDataTypeChange"/>
-                        </div>
-                    </div>
-                    <div class="hc-table-ref-box form-data">
-                        <el-table :data="formDataTable" height="100%" row-key="key" border default-expand-all v-if="formDataTypeKey === 'form'">
-                            <el-table-column prop="key" label="字段名称" width="220">
-                                <template #default="scope">
-                                    <el-input v-model="scope.row.key"/>
-                                </template>
-                            </el-table-column>
-                            <el-table-column prop="val" label="参数内容">
-                                <template #default="scope">
-                                    <el-input v-model="scope.row.val"/>
-                                </template>
-                            </el-table-column>
-                            <el-table-column prop="action" label="操作" width="280" align="center">
-                                <template #default="scope">
-                                    <el-button type="primary" plain size="small" @click="addFormData(scope)">
-                                        <HcIcon name="add-box"/>
-                                        <span>添加同级</span>
-                                    </el-button>
-                                    <el-button type="primary" plain size="small" @click="addFormDatas(scope)">
-                                        <HcIcon name="add-circle"/>
-                                        <span>添加子级</span>
-                                    </el-button>
-                                    <el-button type="danger" plain size="small" @click="delFormData(scope)">
-                                        <HcIcon name="delete-bin-2"/>
-                                        <span>删除</span>
-                                    </el-button>
-                                </template>
-                            </el-table-column>
-                        </el-table>
-                        <HcCodeEditor :data="httpForm" placeholder="请先在表单模式下添加数据..." v-if="formDataTypeKey === 'code'"/>
-                    </div>
-                </div>
-                <div class="http-form-res">
-                    <div class="title-box">
-                        <div class="title">返回数据</div>
-                        <div class="extra">
-                            <el-button type="primary" hc-btn>
-                                <HcIcon name="database"/>
-                                <span>查看整体JSON数据</span>
-                            </el-button>
-                        </div>
-                    </div>
-                    <div class="http-form-res-box">
-                        <HcCodeEditor :data="httpForm" placeholder="请求响应结果区域..."/>
-                    </div>
-                </div>
-            </div>
-        </HcCard>
-    </div>
-</template>
-
-<script setup>
-import {ref,watch,onMounted} from "vue";
-import {useRouter, useRoute} from 'vue-router'
-import {useAppStore} from "~src/store";
-import HcCodeEditor from "./components/HcCodeEditor.vue";
-
-//初始变量
-const router = useRouter()
-const useRoutes = useRoute()
-const useAppState = useAppStore()
-
-//全局变量
-const projectId = ref(useAppState.getProjectId);
-const contractId = ref(useAppState.getContractId);
-
-const typeData = ref([ 'GET', 'POST'])
-
-//搜索表单
-const httpForm = ref({
-    type: 'GET', url: '', data: { projectId: '', contractId: '' }
-})
-
-//回车搜索
-const keyUpEvent = (e) => {
-    if (e.key === "Enter") {
-
-    }
-}
-
-//搜索
-const searchClick = () => {
-
-}
-
-//结构类型tab数据和相关处理
-const formDataTypeKey = ref('form')
-const formDataTypeTab = ref([
-    {key:'form',  name: '表单模式'},
-    {key:'code', name: '查看模式'}
-]);
-const formDataTypeChange = (item) => {
-    formDataTypeKey.value = item?.key;
-}
-
-//表单表格数据
-const formDataTable = ref([
-    {
-        key: '1', val: '1',
-        children: [
-            {key: '2', val: '2'},
-            {key: '3', val: '3'},
-        ]
-    }
-])
-
-//添加同级
-const addFormData = (scope) => {
-    console.log(scope)
-}
-
-//添加子级
-const addFormDatas = (scope) => {
-    console.log(scope)
-}
-
-//删除数据
-const delFormData = (scope) => {
-    console.log(scope)
-}
-</script>
-
-<style lang="scss" scoped>
-.hc-http-form-box {
-    position: relative;
-    display: flex;
-    height: 100%;
-    .http-form-config {
-        position: relative;
-        padding-right: 24px;
-        border-right: 1px solid #e4e7ed;
-        .config-item {
-            position: relative;
-            display: flex;
-            align-items: center;
-            padding: 14px 0;
-            .name-box {
-                position: relative;
-                margin-right: 40px;
-                .val {
-                    font-size: 14px;
-                    color: #aaa;
-                }
-            }
-        }
-        .config-item + .config-item {
-            border-top: 1px solid #e4e7ed;
-        }
-    }
-    .http-form-data {
-        position: relative;
-        padding: 0 24px;
-        flex: 1;
-        .hc-table-ref-box.form-data {
-            height: calc(100% - 60px);
-        }
-    }
-    .http-form-res {
-        flex: 1;
-        position: relative;
-        padding-left: 24px;
-        border-left: 1px solid #e4e7ed;
-        .http-form-res-box {
-            position: relative;
-            height: calc(100% - 60px);
-        }
-    }
-    .http-form-config, .http-form-data, .http-form-res {
-        .title-box {
-            position: relative;
-            margin-bottom: 20px;
-            font-size: 18px;
-            font-weight: 400;
-            display: flex;
-            align-items: center;
-            .title {
-                position: relative;
-                flex: 1;
-            }
-        }
-    }
-}
-</style>
-
-<style lang="scss">
-.http-form-data .hc-table-ref-box.form-data .el-table td.el-table__cell div {
-    display: flex;
-    align-items: center;
-}
-</style>

+ 1 - 1
src/views/login/index.vue

@@ -92,7 +92,7 @@
         <!--预先加载首页背景图-->
         <div class="hc-login-theme-home">
             <template v-for="item in theme.home">
-                <img :src="item.bg" :alt="item.name">
+                <img :src="item.bg" :alt="item.name" loading="lazy">
             </template>
         </div>
     </div>

+ 1 - 0
src/views/tasks/components/TableCard.vue

@@ -223,6 +223,7 @@ const tableListColumn = ref([
     {key:'taskContent', name: '任务描述'},
     {key:'reportUserName', name: '上报人', width: '120'},
     {key:'waitingUserList', name: '签字人员'},
+    {key:'eVisaContent', name: '电签状态'},
 ])
 const tableListData = ref([])
 const getTableData = () => {

+ 32 - 2
src/views/tentative/material/approach.vue

@@ -61,7 +61,7 @@
             <HcTable ref="tableRef" :column="tableColumn" :datas="tableData" :loading="tableLoading" isCheck @selection-change="tableSelection">
                 <template #action="{row}">
                     <HcTooltip keys="tentative_material_approach_annex">
-                        <el-button type="primary" size="small" plain>附件</el-button>
+                        <el-button type="primary" size="small" plain @click="viewAttachmentModalClick(row)">附件</el-button>
                     </HcTooltip>
                     <HcTooltip keys="tentative_material_approach_sampling">
                         <el-button type="primary" size="small" plain>取样记录</el-button>
@@ -171,6 +171,14 @@
             </template>
         </HcDialog>
 
+        <!--查看附件-->
+        <HcDialog :show="viewAttachmentModal" title="查看附件" widths="70rem" :footer="false" isTable @close="viewAttachmentModalClose">
+            <div>
+                <HcNewSwitch :datas="tabTypeTab" :keys="tabTypeKey" @change="tabTypeChange"/>
+            </div>
+
+            123456
+        </HcDialog>
 
     </div>
 </template>
@@ -242,7 +250,7 @@ const tableColumn = ref([
     {key:'key11', name: '生产地/厂家'},
     {key:'key12', name: '拟用部位'},
     {key:'key13', name: '记录人'},
-    {key:'action', name: '操作', width: 200},
+    {key:'action', name: '操作', width: 150, fixed: 'right', align: 'center'},
 ])
 
 //获取数据
@@ -352,6 +360,28 @@ const importModalClose = () => {
 }
 
 
+//查看附件
+const viewAttachmentModal = ref(false)
+const viewAttachmentModalClick = (row) => {
+    viewAttachmentModal.value = true
+}
+
+//类型tab数据和相关处理
+const tabTypeKey = ref('mark')
+const tabTypeTab = ref([
+    {key:'mark',  name: '生产合格证'},
+    {key:'query', name: '厂家质检报告'},
+    {key:'query1', name: '其他文件'},
+]);
+const tabTypeChange = (item) => {
+    tabTypeKey.value = item?.key
+}
+
+//关闭查看附件
+const viewAttachmentModalClose = () => {
+    viewAttachmentModal.value = false
+}
+
 </script>
 
 <style lang="scss" scoped>

+ 4 - 30
yarn.lock

@@ -22,7 +22,7 @@
     "@codemirror/view" "^6.0.0"
     "@lezer/common" "^1.0.0"
 
-"@codemirror/commands@6.x", "@codemirror/commands@^6.0.0":
+"@codemirror/commands@^6.0.0":
   version "6.1.1"
   resolved "https://registry.yarnpkg.com/@codemirror/commands/-/commands-6.1.1.tgz#f92a343f53f4ecff10fc1f4114d0c9e49e7715b7"
   integrity sha512-ibDohwkk7vyu3VsnZNlQhwk0OETBtlkYV+6AHfn5Zgq0sxa+yGVX+apwtC3M4wh6AH7yU5si/NysoECs5EGS3Q==
@@ -32,15 +32,7 @@
     "@codemirror/view" "^6.0.0"
     "@lezer/common" "^1.0.0"
 
-"@codemirror/lang-json@^6.0.0":
-  version "6.0.0"
-  resolved "https://registry.yarnpkg.com/@codemirror/lang-json/-/lang-json-6.0.0.tgz#6ac373248c2d44ceab6d5d58879cc543095e503e"
-  integrity sha512-DvTcYTKLmg2viADXlTdufrT334M9jowe1qO02W28nvm+nejcvhM5vot5mE8/kPrxYw/HJHhwu1z2PyBpnMLCNQ==
-  dependencies:
-    "@codemirror/language" "^6.0.0"
-    "@lezer/json" "^1.0.0"
-
-"@codemirror/language@6.x", "@codemirror/language@^6.0.0":
+"@codemirror/language@^6.0.0":
   version "6.2.1"
   resolved "https://registry.yarnpkg.com/@codemirror/language/-/language-6.2.1.tgz#cb10cd785a76e50ecd2fe2dc59ff66af8a41b87a"
   integrity sha512-MC3svxuvIj0MRpFlGHxLS6vPyIdbTr2KKPEW46kCoCXw2ktb4NTkpkPBI/lSP/FoNXLCBJ0mrnUi1OoZxtpW1Q==
@@ -70,12 +62,12 @@
     "@codemirror/view" "^6.0.0"
     crelt "^1.0.5"
 
-"@codemirror/state@6.x", "@codemirror/state@^6.0.0":
+"@codemirror/state@^6.0.0":
   version "6.1.2"
   resolved "https://registry.yarnpkg.com/@codemirror/state/-/state-6.1.2.tgz#182d46eabcc17c95508984d6add5a5a641dcd517"
   integrity sha512-Mxff85Hp5va+zuj+H748KbubXjrinX/k28lj43H14T2D0+4kuvEFIEIO7hCEcvBT8ubZyIelt9yGOjj2MWOEQA==
 
-"@codemirror/view@6.x", "@codemirror/view@^6.0.0":
+"@codemirror/view@^6.0.0":
   version "6.3.1"
   resolved "https://registry.yarnpkg.com/@codemirror/view/-/view-6.3.1.tgz#c2f1d8ad569351eb9f8d57956536fc63cd61aaa9"
   integrity sha512-NKPBphoV9W2Q6tKXk+ge4q5EhMOOC0rpwdGS80/slNSfsVqkN4gwXIEqSprXJFlf9aUKZU7WhPvqRBMNH+hJkQ==
@@ -128,14 +120,6 @@
   dependencies:
     "@lezer/common" "^1.0.0"
 
-"@lezer/json@^1.0.0":
-  version "1.0.0"
-  resolved "https://registry.yarnpkg.com/@lezer/json/-/json-1.0.0.tgz#848ad9c2c3e812518eb02897edd5a7f649e9c160"
-  integrity sha512-zbAuUY09RBzCoCA3lJ1+ypKw5WSNvLqGMtasdW6HvVOqZoCpPr8eWrsGnOVWGKGn8Rh21FnrKRVlJXrGAVUqRw==
-  dependencies:
-    "@lezer/highlight" "^1.0.0"
-    "@lezer/lr" "^1.0.0"
-
 "@lezer/lr@^1.0.0":
   version "1.2.3"
   resolved "https://registry.yarnpkg.com/@lezer/lr/-/lr-1.2.3.tgz#f44ca844f15f6762fde4eab877d110567e34ffa1"
@@ -1405,16 +1389,6 @@ vooks@^0.2.12:
   dependencies:
     evtd "^0.2.2"
 
-vue-codemirror@^6.1.1:
-  version "6.1.1"
-  resolved "https://registry.yarnpkg.com/vue-codemirror/-/vue-codemirror-6.1.1.tgz#246697ef4cfa6b2448dd592ade214bb7ff86611f"
-  integrity sha512-rTAYo44owd282yVxKtJtnOi7ERAcXTeviwoPXjIc6K/IQYUsoDkzPvw/JDFtSP6T7Cz/2g3EHaEyeyaQCKoDMg==
-  dependencies:
-    "@codemirror/commands" "6.x"
-    "@codemirror/language" "6.x"
-    "@codemirror/state" "6.x"
-    "@codemirror/view" "6.x"
-
 vue-demi@*:
   version "0.13.11"
   resolved "https://registry.yarnpkg.com/vue-demi/-/vue-demi-0.13.11.tgz#7d90369bdae8974d87b1973564ad390182410d99"