1234567891011121314151617181920212223242526272829303132333435363738394041424344454647484950515253545556575859606162636465666768697071727374757677787980818283848586878889 |
- <template>
- <view>
- <view class="certification-card serve-main ">
- <view class="serve-box flex_c_s" @click="goModifyIt">
- <view class="font-32-1D">{{viewStatus?'服务类目':'已选服务类目'}}</view>
- <view class="flex_c_r" v-if="viewStatus">
- <view class="font-32-05">{{ project && project.length >0 ? '去修改':'选择' }}</view>
- <up-icon name="arrow-right" color="#C9CDD4" size="16"></up-icon>
- </view>
- </view>
- <view class="hr-solid-top serve-box-contnt" v-if="project && project.length > 0">
- <view class="serve-item" v-for="item in project" :key="item.id">{{ item.businessName }}</view>
- </view>
- </view>
- <view v-for="item in project" :key="item.id" class="serve-img-boxs">
- <Certificate :data="item" v-if="item.isFiles"/>
- </view>
-
- <view class="certification-card whether-or-not flex_c_s" v-if="project && project.length > 0">
- <view class="font-32-1D">是否展示资质</view>
- <view class="radio-box flex_c_c" v-if="viewStatus">
- <view v-for="item in radoiList" :key="item.value" @click="racioClick(item)" class="radio-item flex_c_c">
- <view class="font-32-1D radio-name">{{ item.name }}</view>
- <view :class="formData.whether === item.value ? 'whether-radio-active' : 'whether-radio'"></view>
- </view>
- </view>
- <view class="radio-box flex_c_c" v-else>
- <view class="radio-item flex_c_c">
- <view class="font-32-1D radio-name">{{ project.whether === '1'?'是':'否' }}</view>
- <view class="whether-radio-active"></view>
- </view>
- </view>
- </view>
- </view>
- </template>
- <script setup>
- import { inject } from 'vue';
- import Certificate from './Certificate.vue';
- import { computed } from 'vue';
- const formData = inject('formData');
- // const { project } = formData;
- const project = computed(() => formData.project || []);
- console.log("TCL: project=============", project)
- const props=defineProps({
- viewStatus: {
- type: Boolean,
- default: true
- },
- })
- const radoiList = [
- {
- name: '是',
- value: '1'
- },
- {
- name: '否',
- value: '2'
- },
- ];
- const goModifyIt = async() => {
- try {
- uni.navigateTo({
- url: `/pages_home/pages/certification/Class?data=${encodeURIComponent(JSON.stringify(project.value))}`
- });
- } catch (error) {
- console.log("TCL: goModifyIt -> error", error)
- }
- }
- const racioClick = (item) => {
- try {
- Object.assign(formData, { whether: item.value });
- } catch (error) {
- console.log("TCL: racioClick -> error", error)
- }
- }
- </script>
- <style lang="scss" scoped>
- @import "./index.scss";
- </style>
|