替换infopath项目,采用SharePoint SPFX框架
css
uatadmin
2024-08-21 426632e0a80fc7483ab07ec94e3d76f7bfdf2957
提交 | 用户 | age
957068 1 <template>
J 2   <div class="container-inquiry-title">
3     <header class="title-bar">
1d44c0 4       <h1 class="title">{{ props.title }}</h1>
200265 5       <div class="detail-button" @click="()=>{ emit('detailchange')}"  >
280110 6         <div class="detail-link">{{ detaiText }}</div>
J 7       </div>
957068 8     </header>
J 9     <div class="num-container">
10       {{ titleData.SPEC_CNLabel }}:{{ props.specCn }}
11     </div>
12     <slot></slot>
13   </div>
14 </template>
15
16 <script setup>
280110 17 import { reactive,defineProps,computed } from "vue";
957068 18 const props = defineProps({
J 19   specCn: {
20     type: String,
21     required: true
22   },
1d44c0 23   title: {
J 24     type: String,
25     default: "询价依赖单"
26   },
280110 27   isDetail: {
J 28     type: Boolean,
29     default: false
30   }
31 });
32 const emit = defineEmits(["detailchange"]);
33 const detaiText = computed(() => {
34   return  props.isDetail ? "返回审批" : "查看审批详情";
957068 35 });
J 36 const titleData = reactive({
37   title: "询价依赖单",
38   detailLink: "查看审批详情",
39   detailLinkUrl: "http://www.baidu.com",
40   SPEC_CNLabel: "申请单号",
41   subTitle: "询价单1",
42   content: "内容",
43 });
44 </script>
45
46 <style scoped lang="less">
47 @import url("~@/styles/var.less");
48 .title-bar {
49   color: #fff;
50   display: flex;
51   justify-content: space-between;
52   align-content: center;
53   gap: 5px;
54   background-color: @color-title-bg;
55   .title {
56     font-size: 20px;
57     margin: 0;
426632 58     padding: 2px 0px 2px 10px;
957068 59   }
J 60   .detail-link {
61     cursor: pointer;
62     font-size: 16px;
63     align-self: center;
64     padding-right: 20px;
65     color: #fff;
66   }
67 }
68 .sub-title {
69   display: flex;
70   .sub-title-label {
71     background-color: @color-sub-title-bg;
72     padding: 5px 10px;
73     font-size: 12px;
74     border: 1px solid #000;
75     flex: 0 0 200px;
76   }
77   .content {
78     flex: 1 1 auto;
79   }
80 }
81 .content {
82   border: 1px solid #000;
83   padding: 5px 10px;
84   font-size: 12px;
85   border-left: none;
86 }
87 .num-container {
200265 88   border-top: none;
U 89   color: #fff;
426632 90   background-color:#006dbb;
U 91   padding: 2px 0px 2px 10px;
957068 92 }
200265 93
a1125e 94 .title-bar{
200265 95   position: relative;
U 96 }
97
98 .detail-button{
99   position: absolute;
100   right: 0;
101   top: 50%;
102 }
103
957068 104 </style>