123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148149150151152153154155156157158159160161162163164165166167168169170171172173174175176177178179180181182183184185186187188189190191192193194195196197198199200201202203204205206207208209210211212213214215216217218219220221222 |
- <template>
- <view class="uni-column container">
- <view style="margin: 12rpx;">
- <view class="margenTop" style="font-size: 30rpx;font-weight: bold;">批次号:{{product.lotCode}}</view>
- <view class="margenTop" style="font-size: 30rpx;font-weight: bold;">产品描述:{{product.productDescription}}</view>
- <view class="margenTop" style="font-size: 30rpx;font-weight: bold; flex-direction: row;">
- <view >工艺版本:{{product.technologyVersion}}</view>
- <view style="margin-left: 200rpx;" >工序:{{product.processAlias}}</view>
- </view>
- </view>
- <view class='middle'>
- <view class='segment'></view>
- <uni-icons type="paperclip" size="30" ></uni-icons>
- <view class='segment'></view>
- </view>
- <view style="overflow: auto;">
- <view :class="{'list-container':true}"
- v-for="(item, index) in drawingList" :key="item.id">
- <view ><text style="text-align: center; font-size: 28rpx; padding: 48rpx 0 24rpx 0;color: #1684fc;" @click="handleOpenDrawing(item)">{{item.drawingName}}</text></view>
-
- </view>
- </view>
-
- </view>
-
- </template>
- <script setup>
- import{getDrawingList,getTechnologicalProcess} from '@/api/business/drawing.js'
- import {
- ref
- } from 'vue'
- import {
- onLoad,
- } from '@dcloudio/uni-app'
- import { store } from '../../store';
- const technologicalProcessId = ref("")
- const drawingList = ref([])
- const processCode = ref("")
- const productId = ref("")
- const product = ref({})
- const lotCode = ref("")
- const processAlias = ref("")
- onLoad((options) => {
- console.log(options,1111)
- technologicalProcessId.value = options.param4
- lotCode.value = options.param2
- productId.value = options.param1
- processCode.value = options.param3
- processAlias.value = options.param5
- init();
-
- })
- function init() {
- console.log(product.value)
- getTechnologicalProcess(technologicalProcessId.value).then(response=>{
- console.log(response,1123)
- if(response.code ==200){
- product.value = response.data
- product.value.lotCode = lotCode.value
- product.value.processAlias = processAlias.value
- getDrawingList({productVersion:product.value.technologyVersion,processCode:processCode.value,productId:productId.value}).then(res=>{
- if(res.code == 200){
- drawingList.value = res.data
- // product.value = drawingList.value[0].product
- // product.value.technologyVersion = drawingList.value[0].technologyVersion
- // product.value.processAlias = drawingList.value[0].processAlias
- // product.value.lotCode = lotCode.value
-
- }
- })
- }
- })
-
- }
-
- function handleOpenDrawing(row){
-
-
-
- // 检查 filteredProcess 是否有元素,并选择第一个元素
-
-
- var encodeUrl = row.url;
- console.log(row)
- // 构建查询参数字符串
- var queryParam = `param1=${encodeUrl}`;
-
- // 使用模板字符串构建完整的URL
- var navigateUrl = `/pages/pdfviewer/index?${queryParam}`;
-
- // 导航到指定页面
- uni.navigateTo({
- url: navigateUrl
- });
- }
- </script>
- <style lang="scss">
- .container {
- height: 100%;
- background-color: #f5f5f5;
- }
- .middle {
- display: flex;
- flex-direction: row;
- align-items: center;
- justify-content: center;
- margin-top: 20rpx;
- }
- .scroll-container {
- position: absolute;
- top: 24rpx;
- right: 0;
- bottom: 160rpx;
- left: 0;
- }
- .segment {
- width: 280rpx;
- background-color: rgba(213, 213, 213, 1);
- border: 1rpx solid rgba(213, 213, 213, 1);
- }
- .selected {
- border: 1px solid #1684fc;
- }
- .margenTop{
- margin: 20rpx;
- }
- .list-item {
- background-color: #fff;
- position: relative;
- padding: 16rpx;
- padding-bottom: 24rpx;
- margin: 0 24rpx;
- margin-bottom: 24rpx;
- border-radius: 8rpx;
- .title-container {
- justify-content: space-between;
- margin-top: 8rpx;
- margin-bottom: 16rpx;
- .title {
- height: 48rpx;
- align-items: center;
- .label {
- color: #1684fc;
- font-size: 32rpx;
- font-weight: bold;
- &.code {
- color: #000000;
- margin-left: 32rpx;
- }
- }
- }
- }
-
- .item-info {
- margin-bottom: 16rpx;
- .label {
- font-size: 28rpx;
- width: 152rpx;
- color: #808080;
- &.right {
- flex: 1;
- color: #808080;
- }
- }
- }
- .right-info {
- justify-content: flex-end;
- margin-top: 2rpx;
- .label {
- font-size: 28rpx;
- color: #ff0000;
- }
- }
- }
- .bottom {
- position: fixed;
- right: 0;
- bottom: 0;
- left: 0;
- height: 100rpx;
- padding: 16rpx 24rpx;
- align-items: center;
- background-color: #FFFFFF;
- justify-content: space-between;
- .bottom-btn {
- flex: 1;
- font-size: 28rpx;
- color: #FFFFFF;
- &.left-btn {
- background-color: #1684fc;
- }
- &.right-btn {
- background-color: rgb(255, 121, 1);
- margin-left: 24rpx;
- }
- }
- }
- </style>
|