bugfix and performance improvements

This commit is contained in:
quantulr
2023-08-11 17:29:39 +08:00
parent 45ed576dfa
commit b0206985cc
28 changed files with 378 additions and 105 deletions

View File

@ -222,13 +222,13 @@ getList();
})
}}
</el-button>
<el-button link type="text">
{{
t("admin.table.managementOf", {
type: t("admin.common.achievement"),
})
}}
</el-button>
<!-- <el-button link type="text">-->
<!-- {{-->
<!-- t("admin.table.managementOf", {-->
<!-- type: t("admin.common.achievement"),-->
<!-- })-->
<!-- }}-->
<!-- </el-button>-->
<el-button link type="text" @click="handleDelete(row.id)">
{{ t("admin.common.delete") }}
</el-button>

View File

@ -190,6 +190,13 @@
>
<el-input v-model="form.bankPhone" placeholder="请输入开户行电话" />
</el-form-item> -->
<el-form-item :label="t('webContact.phone')" prop="phone">
<el-input
v-model="form.phone"
:placeholder="t('webContact.phonePlaceholder')"
/>
</el-form-item>
<el-form-item :label="t('admin.form.email')" prop="email">
<el-input
v-model="form.email"
@ -200,11 +207,9 @@
"
/>
</el-form-item>
<el-form-item :label="t('webContact.phone')" prop="phone">
<el-input
v-model="form.phone"
:placeholder="t('webContact.phonePlaceholder')"
/>
<!-- 其他联系方式-->
<el-form-item :label="t('admin.form.otherContact')" prop="otherContact">
<el-input v-model="form.otherContact"></el-input>
</el-form-item>
<el-form-item :label="t('admin.form.address')" prop="address">
<el-input

View File

@ -101,14 +101,14 @@
<!-- @click="checkEnterpriseInfo(row.id)"-->
<!-- >{{ t("tips.browseEnterpriseInformation") }}-->
<!-- </el-button>-->
<el-button
<!-- TODO: <el-button
v-if="queryParams.status == 0"
size="small"
type="text"
icon="Close"
@click="releaseCancel(row.id)"
>{{ t("tips.moveToDraftBox") }}
</el-button>
</el-button>-->
</template>
</el-table-column>
</el-table>

View File

@ -108,6 +108,21 @@
:placeholder="t('admin.form.defaultExpertPhone')"
/>
</el-form-item>
<!-- ADDEMAIL-->
<!-- 邮箱-->
<el-form-item :label="t('admin.form.email')" prop="email">
<el-input
:placeholder="t('input.inputEmail')"
v-model="form.email"
></el-input>
</el-form-item>
<!-- 其他联系方式-->
<el-form-item :label="t('admin.form.otherContact')" prop="otherContact">
<el-input v-model="form.otherContact"></el-input>
</el-form-item>
<el-form-item :label="t('admin.form.location')">
<el-input
v-model="form.address"

View File

@ -198,6 +198,7 @@ import importTip from "@/assets/achievement_import_description.txt?url";
import { saveAs } from "file-saver";
import { useI18n } from "vue-i18n";
import dayjs from "dayjs";
import {UploadFilled} from "@element-plus/icons-vue";
const { t } = useI18n();
const router = useRouter();

View File

@ -25,6 +25,24 @@
</el-col>
</el-row>
<!-- ADDEMAIL-->
<!-- 邮箱-->
<el-row>
<el-col :span="24">
<el-form-item :label="t('admin.form.email')" prop="email">
<el-input :placeholder="t('input.inputEmail')" v-model="modelValue.email"></el-input>
</el-form-item>
</el-col>
</el-row>
<!-- 其他联系方式-->
<el-row>
<el-col :span="24">
<el-form-item :label="t('admin.form.otherContact')" prop="otherContact">
<el-input v-model="modelValue.otherContact"></el-input>
</el-form-item>
</el-col>
</el-row>
<el-row v-if="isAdd">
<el-col :span="24">
<el-form-item
@ -69,7 +87,7 @@
<el-row v-if="isAdd">
<el-col :span="24">
<el-form-item :label="t('admin.form.idCard')" required>
<el-form-item :label="t('admin.form.idCard')">
<el-row :gutter="20">
<el-col :span="8">
<el-form-item prop="idImage.0">
@ -203,11 +221,11 @@ const rules = reactive({
// },
],
idCard: [
{
required: true,
message: computed(() => t("admin.form.placeholder")),
trigger: "blur",
},
// {
// required: true,
// message: computed(() => t("admin.form.placeholder")),
// trigger: "blur",
// },
],
wordAddress: [
{
@ -224,25 +242,25 @@ const rules = reactive({
},
],
"idImage.0": [
{
required: true,
message: computed(() => t("admin.validation.pleaseUpload")),
trigger: ["blur", "change"],
},
// {
// required: true,
// message: computed(() => t("admin.validation.pleaseUpload")),
// trigger: ["blur", "change"],
// },
],
"idImage.1": [
{
required: true,
message: computed(() => t("admin.validation.pleaseUpload")),
trigger: ["blur", "change"],
},
// {
// required: true,
// message: computed(() => t("admin.validation.pleaseUpload")),
// trigger: ["blur", "change"],
// },
],
"idImage.2": [
{
required: true,
message: computed(() => t("admin.validation.pleaseUpload")),
trigger: ["blur", "change"],
},
// {
// required: true,
// message: computed(() => t("admin.validation.pleaseUpload")),
// trigger: ["blur", "change"],
// },
],
certificatePics: [
{

View File

@ -45,21 +45,13 @@
<!-- :maxlength="11"-->
<el-input
v-model="modelValue.phone"
oninput="
value = value
.replace(/[^\d.]/g, '')
.replace(/\.{2,}/g, '.')
.replace('.', '$#$')
.replace(/\./g, '')
.replace('$#$', '.')
.replace(/^(\-)*(\d+)\.(\d\d).*$/, '$1$2.$3')
.replace(/^\./g, '')
"
></el-input>
<!-- v-number -->
</el-form-item>
</el-col>
</el-row>
<!-- ADDEMAIL-->
<!-- 邮箱-->
<el-row>
<el-col :span="24">
<el-form-item :label="t('admin.form.email')" prop="email">
@ -67,6 +59,14 @@
</el-form-item>
</el-col>
</el-row>
<!-- 其他联系方式-->
<el-row>
<el-col :span="24">
<el-form-item :label="t('admin.form.otherContact')" prop="otherContact">
<el-input v-model="modelValue.otherContact"></el-input>
</el-form-item>
</el-col>
</el-row>
<!-- <el-row>
<el-col :span="24">
<el-form-item label="信用代码:" prop="code">

View File

@ -30,6 +30,24 @@
</el-col>
</el-row>
<!-- ADDEMAIL-->
<!-- 邮箱-->
<el-row>
<el-col :span="24">
<el-form-item :label="t('admin.form.email')" prop="email">
<el-input v-model="modelValue.email"></el-input>
</el-form-item>
</el-col>
</el-row>
<!-- 其他联系方式-->
<el-row>
<el-col :span="24">
<el-form-item :label="t('admin.form.otherContact')" prop="otherContact">
<el-input v-model="modelValue.otherContact"></el-input>
</el-form-item>
</el-col>
</el-row>
<!-- <el-row>
<el-col :span="12">
<el-form-item :label="t('webSearch.unit')" prop="researchId">

View File

@ -184,6 +184,24 @@
</el-col>
</el-row>
<!-- ADDEMAIL-->
<!-- 邮箱-->
<el-row>
<el-col :span="24">
<el-form-item :label="t('admin.form.email')" prop="email">
<el-input v-model="modelValue.email"></el-input>
</el-form-item>
</el-col>
</el-row>
<!-- 其他联系方式-->
<el-row>
<el-col :span="24">
<el-form-item :label="t('admin.form.otherContact')" prop="otherContact">
<el-input v-model="modelValue.otherContact"></el-input>
</el-form-item>
</el-col>
</el-row>
<el-row>
<el-col :span="24">
<el-form-item

View File

@ -55,6 +55,26 @@
</el-form-item>
</el-col>
</el-row>
<!-- ADDEMAIL-->
<!-- 邮箱-->
<el-row>
<el-col :span="24">
<el-form-item :label="t('admin.form.email')" prop="email">
<el-input v-model="modelValue.email"></el-input>
</el-form-item>
</el-col>
</el-row>
<!-- 其他联系方式-->
<!-- TODO: -->
<!-- <el-row>
<el-col :span="24">
<el-form-item :label="t('admin.form.otherContact')" prop="otherContact">
<el-input v-model="modelValue.otherContact"></el-input>
</el-form-item>
</el-col>
</el-row>-->
<field-options
v-model="modelValue"
:labelWidth="labelWidth"

View File

@ -19,14 +19,14 @@
:key="item.id"
@click="handleActive(index)"
>
{{ item.title }}
{{ item[titleField] }}
</div>
</div>
<div class="_r">
<div
v-if="state.data.length"
class="html"
v-html="state.data[kindId]['content']"
v-html="state.data[kindId][contentField]"
></div>
</div>
</div>
@ -39,12 +39,25 @@ import webFooter from "@/components/webFooter/index.vue";
import request from "@/utils/request";
import { banner } from "@/api/website/home/index";
import { getAboutList } from "../../../api/website/aboutUs";
import { useI18n } from "vue-i18n";
import { computed, onMounted, reactive, ref } from "vue";
const { t, locale } = useI18n();
const titleField = computed(() => {
return locale.value === "zh" ? "title" : `${locale.value}Title`;
});
const contentField = computed(() => {
return locale.value === "zh" ? "content" : `${locale.value}Content`;
});
function about() {
return request({
url: "/v1/sys/about",
method: "get",
});
}
const loading = ref(true);
const state = reactive({
data: [],
@ -74,9 +87,11 @@ function getData() {
loading.value = false;
});
}
onMounted(() => {
getData();
});
function handleActive(id) {
kindId.value = id;
}
@ -85,13 +100,16 @@ function handleActive(id) {
<style lang="scss" scoped>
.about {
background-color: #f2f6ff;
.box {
margin-bottom: 30px;
padding-top: 20px;
display: flex;
._l {
width: 230px;
margin-right: 14px;
._item {
text-align: center;
height: 53px;
@ -101,16 +119,19 @@ function handleActive(id) {
background-color: #fff;
}
}
._r {
flex: 1;
background: #fff;
padding: 20px 40px;
h3 {
font-weight: 600;
text-align: center;
font-size: 18px;
color: #333333;
}
p {
font-size: 14px;
color: #333333;

View File

@ -239,6 +239,28 @@
</el-form-item>
</el-col>
</el-row>
<!-- ADDEMAIL-->
<!-- 邮箱-->
<el-row>
<el-col :span="24">
<el-form-item :label="t('admin.form.email')" prop="email">
<el-input
:placeholder="t('input.inputEmail')"
v-model="signUpForm.email"
></el-input>
</el-form-item>
</el-col>
<!-- 其他联系方式-->
<el-col :span="24">
<el-form-item
:label="t('admin.form.otherContact')"
prop="otherContact"
>
<el-input v-model="signUpForm.otherContact"></el-input>
</el-form-item>
</el-col>
</el-row>
<el-row :gutter="12">
<el-col :span="12">
<el-form-item :label="t('input.age')" prop="age">

View File

@ -33,11 +33,15 @@ import request from "@/utils/request";
import { onMounted, reactive } from "vue";
import webFooter from "@/components/webFooter/index.vue";
import { useI18n } from "vue-i18n";
const { locale } = useI18n();
function platform() {
return request({
url: "/v1/sys/platform",
});
}
const { t } = useI18n();
const state = reactive({
platformInfo: {},
@ -49,12 +53,13 @@ function getInfo() {
message: "ok",
data: {
340000: {
name: "安徽省",
name:
locale.value === "zh" ? "安徽省" : /*俄语*/ "Аньхойская провинция",
code: "340000",
domain: "",
children: [
{
name: "合肥市",
name: locale.value === "zh" ? "合肥市" : /*俄语*/ "Хэфэй",
code: "340100",
domain: "https://www.casshare.com",
children: null,
@ -68,6 +73,7 @@ function getInfo() {
state.platformInfo = res.data;
// });
}
getInfo();
</script>
@ -78,6 +84,7 @@ getInfo();
display: flex;
flex-direction: column;
align-items: center;
.wrap {
width: 100%;
height: 100%;
@ -85,6 +92,7 @@ getInfo();
background-size: 100% 50%;
background-repeat: no-repeat;
background-position: center bottom;
& > div {
flex: 1;
height: 100%;
@ -98,6 +106,7 @@ getInfo();
justify-content: space-evenly;
flex-direction: column;
}
.tit {
text-align: center;
font-size: 30px;
@ -105,6 +114,7 @@ getInfo();
font-weight: 400;
color: #333333;
}
.content {
font-size: 16px;
font-family: Source Han Sans CN;
@ -115,6 +125,7 @@ getInfo();
justify-content: center;
align-items: center;
flex-direction: column;
& > div {
overflow: hidden;
flex: 1;
@ -123,9 +134,11 @@ getInfo();
.item {
width: 66px;
float: left;
a {
color: #0054ff;
}
p {
font-size: 14px;
font-family: Source Han Sans CN;
@ -134,6 +147,7 @@ getInfo();
}
}
}
.more {
width: 150px;
height: 46px;
@ -146,6 +160,7 @@ getInfo();
text-align: center;
user-select: none;
cursor: pointer;
&:hover {
opacity: 0.7;
}

View File

@ -14,10 +14,10 @@
</el-breadcrumb>
</div>
<div class="_head">
<p class="text_hidden">{{ state.data.title }}</p>
<p class="text_hidden">{{ state.data[titleField] }}</p>
<div class="_tags">
<el-tag class="x_fff x_bg_blue" size="small"
>{{ state.data.description }}
>{{ state.data[descriptionField] }}
</el-tag>
</div>
<div class="text-right">
@ -28,7 +28,7 @@
</div>
<div class="_info">
<div class="_l">
<div class="html" v-html="state.data.content"></div>
<div class="html" v-html="state.data[contentField]"></div>
</div>
<div class="_r">
<WebContact />
@ -45,6 +45,7 @@ import webFooter from "@/components/webFooter/index.vue";
import WebContact from "@/components/webContact/index.vue";
import { getInovateInfo } from "../../../api/website/innovate";
import { useI18n } from "vue-i18n";
import { computed } from "vue";
// import request from '@/utils/request'
// to do 创新服务详情
// function detail (id) {
@ -54,7 +55,19 @@ import { useI18n } from "vue-i18n";
// data: { id }
// })
// }
const { t } = useI18n();
const { t, locale } = useI18n();
const titleField = computed(() => {
return locale.value === "zh" ? "title" : `${locale.value}Title`;
});
const descriptionField = computed(() => {
return locale.value === "zh" ? "description" : `${locale.value}Description`;
});
// content
const contentField = computed(() => {
return locale.value === "zh" ? "content" : `${locale.value}Content`;
});
const loading = ref(true);
const state = reactive({

View File

@ -7,15 +7,15 @@
:class="item.id == queryParams.kindId ? 'x_fff x_bg_blue' : ''"
v-for="item in state.kind"
:key="item.id"
@click="handleActive(item.id, item.title)"
@click="handleActive(item.id, item[titleField])"
>
{{ item.title }}
{{ item[titleField] }}
</div>
</div>
<div class="_r">
<div style="width: 70%">
<el-input
v-model.trim="queryParams.title"
v-model.trim="queryParams[titleField]"
:placeholder="t('input.inputKeyword')"
>
<template #append>
@ -28,11 +28,11 @@
<div class="_list" v-loading="listLoading">
<div class="item pointer" v-for="item in state.list" :key="item.id">
<div class="_info">
<p class="text_hidden">{{ item.title }}</p>
<p class="text_hidden">{{ item[titleField] }}</p>
<div class="_tags">
<el-tooltip :content="item.description" placement="top">
<el-tooltip :content="item[descriptionField]" placement="top">
<el-tag class="x_fff x_bg_blue"
>{{ item.description }}
>{{ item[descriptionField] }}
</el-tag>
</el-tooltip>
</div>
@ -60,12 +60,19 @@
<script setup name="Innovate">
import webFooter from "@/components/webFooter/index.vue";
import request from "@/utils/request";
import { reactive, ref } from "vue";
import { computed, reactive, ref } from "vue";
import { useRouter } from "vue-router";
import { getKinds, getInovateList } from "../../../api/website/innovate";
import { useI18n } from "vue-i18n";
const { t } = useI18n();
const { t, locale } = useI18n();
const titleField = computed(() => {
return locale.value === "zh" ? "title" : `${locale.value}Title`;
});
const descriptionField = computed(() => {
return locale.value === "zh" ? "description" : `${locale.value}Description`;
});
const router = useRouter();
const loading = ref(true);
const listLoading = ref(true);
@ -152,8 +159,10 @@ function handleQuery() {
._item {
text-align: center;
height: 53px;
line-height: 53px;
//height: 53px;
line-height: 1.5;
padding: 20px 0;
//line-height: 53px;
font-size: 16px;
color: #333;
background-color: #fff;
@ -197,6 +206,9 @@ function handleQuery() {
margin-top: 14px;
margin-right: 14px;
background-color: #fff;
display: flex;
flex-direction: column;
justify-content: space-between;
&:nth-child(-n + 3) {
margin-top: 10px;
@ -205,6 +217,10 @@ function handleQuery() {
._info {
padding: 30px 14px 0;
.text_hidden {
min-height: 48px;
}
p {
margin: 0;
font-size: 16px;

View File

@ -7,10 +7,10 @@
}}</span>
</el-breadcrumb-item>
<el-breadcrumb-item>
<span class="_one">{{ oneLevelTitle.title }}</span>
<span class="_one">{{ oneLevelTitle[titleField] }}</span>
</el-breadcrumb-item>
<el-breadcrumb-item>
<span class="_two">{{ twoLevelTitle }}</span>
<span class="_two">{{ twoLevelTitle ?? t('common.viewMore') }}</span>
</el-breadcrumb-item>
</el-breadcrumb>
<div>
@ -42,9 +42,13 @@
// import request from "@/utils/request";
import { useRouter } from "vue-router";
import { useI18n } from "vue-i18n";
import { computed } from "vue";
const router = useRouter();
const { t } = useI18n();
const { t, locale } = useI18n();
const titleField = computed(() =>
locale.value === "zh" ? "title" : `${locale.value}Title`
);
function handlePath(id) {
let routeData = router.resolve({ path: `/solution/detail/${id}/` });
@ -90,7 +94,7 @@ const props = defineProps({
},
twoLevelTitle: {
type: String,
default: "查看更多",
// default: "查看更多",
},
data: {
type: Array,

View File

@ -15,7 +15,7 @@
</div>
<div class="content">
<div class="title">
<div>{{ state.data.title }}</div>
<div>{{ state.data[titleField] }}</div>
<div class="description">
<span class="visits"
@ -25,7 +25,7 @@
</div>
</div>
<div class="html" v-html="state.data.content"></div>
<div class="html" v-html="state.data[contentField]"></div>
</div>
</div>
<webFooter></webFooter>
@ -33,13 +33,23 @@
</template>
<script setup>
import { nextTick, onMounted } from "vue";
import { computed, nextTick, onMounted } from "vue";
import seeMore from "./components/seeMore.vue";
import { getInfo } from "@/api/website/solution/index";
import webFooter from "@/components/webFooter/index.vue";
import request from "@/utils/request";
import { useI18n } from "vue-i18n";
const { t } = useI18n();
const { t, locale } = useI18n();
const titleField = computed(() =>
locale.value === "zh" ? "title" : `${locale.value}Title`
);
const contentField = computed(() =>
locale.value === "zh" ? "content" : `${locale.value}Content`
);
function detail(id) {
return request({
url: "/v1/service/solution_case/detail",
@ -82,21 +92,26 @@ function getData() {
overflow: hidden;
display: flex;
flex-direction: column;
.conter1400 {
flex: 1;
}
.head {
padding: 30px 0 20px 0;
span {
font-size: 16px;
font-family: Source Han Sans CN;
font-weight: 400;
color: #666666;
}
.one {
color: #333333;
}
}
.content {
background: #fff;
margin-bottom: 40px;
@ -105,18 +120,21 @@ function getData() {
.html {
padding: 30px 40px;
}
.title {
font-size: 18px;
font-family: Source Han Sans CN;
font-weight: 600;
color: #333333;
border-bottom: 1px solid #dcdcdc;
.description {
padding-top: 20px;
font-size: 14px;
font-family: Source Han Sans CN;
font-weight: 400;
color: #666666;
.visits {
display: inline-block;
width: 120px;

View File

@ -24,7 +24,7 @@
:class="activeId == item.id ? '_active' : ''"
@click="setScrollTop(item.id, index)"
>
{{ item.title }}
{{ item[titleField] }}
</li>
</ul>
</div>
@ -41,7 +41,7 @@
class="_item"
>
<h3 class="_tit text-center" style="font-size: 24px; color: #333333">
{{ item.title }}
{{ item[titleField] }}
</h3>
<div class="_info conter1000">
<div v-if="isOddEvenNumber(index)" class="_r">
@ -52,10 +52,10 @@
class="_l"
>
<h3 :class="isOddEvenNumber(index) ? 'text-right' : ''">
{{ item.title }}
{{ item[titleField] }}
</h3>
<!-- <p>{{ item.description }}</p> -->
<p>{{ item.description }}</p>
<p>{{ item[descriptionField] }}</p>
</div>
<div v-if="!isOddEvenNumber(index)" class="_r">
<img :src="item.image" alt srcset />
@ -73,8 +73,8 @@
fit="cover"
style="width: 100%; height: 135px"
></el-image>
<div class="_head text_hidden">{{ child.title }}</div>
<div class="_detail text_hidden">{{ child.description }}</div>
<div class="_head text_hidden">{{ child[titleField] }}</div>
<div class="_detail text_hidden">{{ child[descriptionField] }}</div>
</li>
</ul>
<div class="_liBtn text-right">
@ -95,7 +95,7 @@
</div>
</template>
<script setup>
import { nextTick, onMounted, reactive } from "vue";
import { computed, nextTick, onMounted, reactive, ref } from "vue";
import seeMore from "./components/seeMore.vue";
import webFooter from "@/components/webFooter/index.vue";
import { banner } from "@/api/website/home/index";
@ -111,7 +111,14 @@ function handlePath(id) {
window.open(routeData.href, "_blank");
}
const { t } = useI18n();
const { t, locale } = useI18n();
const titleField = computed(() =>
locale.value === "zh" ? "title" : `${locale.value}Title`
);
const descriptionField = computed(() =>
locale.value === "zh" ? "description" : `${locale.value}Description`
);
let moreData = ref([]);
const loading = ref(true);
const oneLevelTitle = ref({});
@ -311,11 +318,13 @@ function handleShowMore(item) {
._r {
width: 420px;
background: #f2f6ff;
//background: #f2f6ff;
background: transparent;
img {
width: 100%;
height: 100%;
object-fit: contain;
}
}
}