bug fix and performance improvements

This commit is contained in:
2023-07-19 10:29:12 +08:00
parent 4789db178f
commit 0c439a32e1
14 changed files with 461 additions and 327 deletions

View File

@ -3,26 +3,26 @@
* @type {[{label: string, value: string, elTagType: string},{label: string, value: string, elTagType: string},{label: string, value: string, elTagType: string},{label: string, value: string, elTagType: string}]}
*/
export const serviceDemandStatusDict = [
{
value: "0",
label: "待受理",
elTagType: "primary",
},
{
value: "1",
label: "已受理",
elTagType: "success",
},
{
value: "2",
label: "已驳回",
elTagType: "danger",
},
{
value: "4",
label: "已结束",
elTagType: "warning",
},
{
value: "0",
label: "待受理",
elTagType: "primary",
},
{
value: "1",
label: "已受理",
elTagType: "success",
},
{
value: "2",
label: "已驳回",
elTagType: "danger",
},
{
value: "4",
label: "已结束",
elTagType: "warning",
},
];
/**
@ -30,112 +30,111 @@ export const serviceDemandStatusDict = [
* @type {[{label: string, value: string, elTagType: string},{label: string, value: string, elTagType: string},{label: string, value: string, elTagType: string},{label: string, value: string, elTagType: string},{label: string, value: string, elTagType: string}]}
*/
export const technologyDemandStatusDict = [
{
value: "0",
label: "待受理",
elTagType: "primary",
},
{
value: "1",
label: "已发布",
elTagType: "success",
},
{
value: "2",
label: "已驳回",
elTagType: "danger",
},
{
value: "3",
label: "草稿箱",
elTagType: "primary",
},
{
value: "4",
label: "已结束",
elTagType: "warning",
},
{
value: "0",
label: "待受理",
elTagType: "primary",
},
{
value: "1",
label: "已发布",
elTagType: "success",
},
{
value: "2",
label: "已驳回",
elTagType: "danger",
},
{
value: "3",
label: "草稿箱",
elTagType: "primary",
},
{
value: "4",
label: "已结束",
elTagType: "warning",
},
];
// 1->专利|2->成果|3->服务需求|4->专家|5->科研项目|6->论文
export const seeLogTypeDict = [
{
value: "1",
label: "专利",
elTagType: "primary",
},
{
value: "2",
label: "成果",
elTagType: "success",
},
{
value: "1",
label: "专利",
elTagType: "primary",
},
{
value: "2",
label: "成果",
elTagType: "success",
},
{
value: "3",
label: "服务需求",
elTagType: "danger",
},
{
value: "4",
label: "专家",
elTagType: "warning",
},
{
value: "5",
label: "科研项目",
elTagType: "warning",
},
{
value: "6",
label: "论文",
elTagType: "warning",
},
{
value: "3",
label: "服务需求",
elTagType: "danger",
},
{
value: "4",
label: "专家",
elTagType: "warning",
},
{
value: "5",
label: "科研项目",
elTagType: "warning",
},
{
value: "6",
label: "论文",
elTagType: "warning",
},
];
// 订单类型(1创新币充值2活动报名)
export const orderTypeDict = [
{
value: "1",
label: "创新币充值",
elTagType: "primary",
},
{
value: "2",
label: "活动报名",
elTagType: "success",
},
{
value: "1",
label: "创新币充值",
elTagType: "primary",
},
{
value: "2",
label: "活动报名",
elTagType: "success",
},
];
// 发票申请状态(0->未申请1->已申请2->已处理)
export const invoiceStatusDict = [
{
value: "0",
label: "未申请",
elTagType: "warning",
},
{
value: "1",
label: "已申请",
elTagType: "primary",
},
{
value: "2",
label: "已处理",
elTagType: "success",
},
{
value: "0",
label: "未申请",
elTagType: "warning",
},
{
value: "1",
label: "已申请",
elTagType: "primary",
},
{
value: "2",
label: "已处理",
elTagType: "success",
},
];
// 课题角色1承担单位2参与单位
export const subjectRoleDict = [
{
value: "1",
label: "承担单位",
elTagType: "primary",
}
,
{
value: "2",
label: "参与单位",
elTagType: "success",
}
];
{
value: "1",
label: "承担单位",
elTagType: "primary",
},
{
value: "2",
label: "参与单位",
elTagType: "success",
},
];

View File

@ -7,14 +7,14 @@
@toggleClick="toggleSideBar"
/>
<breadcrumb
v-if="!settingsStore.topNav"
id="breadcrumb-container"
class="breadcrumb-container"
v-if="!settingsStore.topNav"
/>
<top-nav
v-if="settingsStore.topNav"
id="topmenu-container"
class="topmenu-container"
v-if="settingsStore.topNav"
/>
<div class="right-menu">
@ -37,13 +37,15 @@
</template>
<div class="avatar-container">
<el-dropdown
@command="handleCommand"
class="right-menu-item hover-effect"
trigger="click"
@command="handleCommand"
>
<div class="avatar-wrapper">
<img :src="userStore.avatar" class="user-avatar" />
<el-icon><caret-bottom /></el-icon>
<el-icon>
<caret-bottom />
</el-icon>
</div>
<template #dropdown>
<el-dropdown-menu>
@ -51,12 +53,15 @@
<el-dropdown-item>个人中心</el-dropdown-item>
</router-link> -->
<router-link to="/identity/index">
<el-dropdown-item> 切换系统 </el-dropdown-item>
<el-dropdown-item> 切换系统</el-dropdown-item>
</router-link>
<el-dropdown-item command="setAvatar">
<span> 修改头像 </span>
</el-dropdown-item>
<el-dropdown-item command="setLayout">
<span>布局设置</span>
</el-dropdown-item>
<el-dropdown-item divided command="logout">
<el-dropdown-item command="logout" divided>
<span>退出登录</span>
</el-dropdown-item>
</el-dropdown-menu>
@ -64,10 +69,12 @@
</el-dropdown>
</div>
</div>
<user-avatar ref="avatarRef" />
</div>
</template>
<script setup>
import UserAvatar from "@/views/system/user/profile/userAvatar.vue";
import { ElMessageBox } from "element-plus";
import Breadcrumb from "@/components/Breadcrumb";
import TopNav from "@/components/TopNav";
@ -75,8 +82,6 @@ import Hamburger from "@/components/Hamburger";
import Screenfull from "@/components/Screenfull";
import SizeSelect from "@/components/SizeSelect";
import HeaderSearch from "@/components/HeaderSearch";
import RuoYiGit from "@/components/RuoYi/Git";
import RuoYiDoc from "@/components/RuoYi/Doc";
import useAppStore from "@/store/modules/app";
import useUserStore from "@/store/modules/user";
import useSettingsStore from "@/store/modules/settings";
@ -84,6 +89,7 @@ import useSettingsStore from "@/store/modules/settings";
const appStore = useAppStore();
const userStore = useUserStore();
const settingsStore = useSettingsStore();
const avatarRef = ref(null);
function toggleSideBar() {
appStore.toggleSideBar();
@ -97,6 +103,9 @@ function handleCommand(command) {
case "logout":
logout();
break;
case "setAvatar":
avatarRef.value.editCropper();
break;
default:
break;
}
@ -117,6 +126,7 @@ function logout() {
}
const emits = defineEmits(["setLayout"]);
function setLayout() {
emits("setLayout");
}
@ -210,4 +220,8 @@ function setLayout() {
}
}
}
:deep(.user-info-head) {
visibility: hidden;
}
</style>

View File

@ -783,6 +783,7 @@ export const researchRoutes = [
component: () =>
import("@/views/admin/research/research/service-demand/index.vue"),
name: "ServiceDemand",
hidden: true,
meta: { title: "服务需求列表", icon: "list" },
},
{

View File

@ -1,5 +1,5 @@
<script setup>
import {reactive, ref, toRefs} from "vue";
import { reactive, ref, toRefs } from "vue";
const data = reactive({
queryParams: {
@ -7,7 +7,7 @@ const data = reactive({
pageSize: 10,
},
});
const {queryParams} = toRefs(data);
const { queryParams } = toRefs(data);
const tableData = ref([]);
const queryRef = ref(null);
@ -15,8 +15,7 @@ const queryRef = ref(null);
* 删除指定行
* @param row
*/
const deleteRecord = (row) => {
};
const deleteRecord = (row) => {};
// 重置查询条件 resetQuery
const resetQuery = () => {
@ -34,12 +33,12 @@ const handleQuery = () => {
<!-- 时间段查询-->
<el-form-item label="时间段">
<el-date-picker
v-model="queryParams.timeRange"
end-placeholder="结束日期"
range-separator=""
start-placeholder="开始日期"
type="datetimerange"
value-format="YYYY-MM-dd"
v-model="queryParams.timeRange"
end-placeholder="结束日期"
range-separator=""
start-placeholder="开始日期"
type="datetimerange"
value-format="YYYY-MM-dd"
></el-date-picker>
</el-form-item>
<el-form-item>
@ -50,8 +49,8 @@ const handleQuery = () => {
<!-- el-radio-group 状态切换, 已审批和待审批 -->
<el-radio-group v-model="queryParams.status" size="small" style="width: 100%">
<el-radio label="已审批" value="1"/>
<el-radio label="待审批" value="2"/>
<el-radio label="已审批" value="1" />
<el-radio label="待审批" value="2" />
</el-radio-group>
<!-- 用h2 展示提现金额,加粗字体-->
<h2 style="font-weight: bold">提现金额 : {{ 312312 }}¥</h2>
@ -59,22 +58,22 @@ const handleQuery = () => {
<!--提现记录表格 element-plus -->
<el-table :data="tableData" class="withdraw-table">
<el-table-column
label="提现金额"
prop="amount"
width="150"
label="提现金额"
prop="amount"
width="150"
></el-table-column>
<el-table-column label="提现类型" prop="type" width="150"></el-table-column>
<el-table-column
label="提现状态"
prop="status"
width="150"
label="提现状态"
prop="status"
width="150"
></el-table-column>
<el-table-column label="提现时间" prop="time" width="150"></el-table-column>
<el-table-column label="操作" prop="action" width="150">
<template #default="{ row }">
<!--删除-->
<el-button size="small" type="text" @click="deleteRecord(row)"
>删除
>删除
</el-button>
</template>
</el-table-column>

View File

@ -12,10 +12,7 @@ const active = ref(0); /*active step index*/
const updateStatusList = ref([]); /*update status list*/
const route = useRoute();
const router = useRouter();
const cooperationMemoUrl = ref(""); // 合作备忘录
const technicalSolutionUrl = ref(""); // 客户确认技术解决方案
const contractUrl = ref(""); // 签署服务合同(合同额)
const conclusionUrl = ref(""); // 结题
//未结题原因描述
const reason = ref("");
@ -56,7 +53,6 @@ const getUpdateStatus = async (demandId) => {
const reverseIndex = updateStatusList.value.findLastIndex(
(item) => item.status === "1"
);
console.log(updateStatusList.value.length, reverseIndex);
active.value = reverseIndex === -1 ? 0 : reverseIndex;
};
@ -76,13 +72,35 @@ const close = () => {
router.go(-1);
};
const submit = () => {
console.log(updateStatusList.value[active.value]);
// 当前步骤的表单
const form = updateStatusList.value[active.value];
console.log(active.value);
console.log(form);
// 当active.value !== 4 时, files 字段不能为空
// 当 active.value ===2 或 3 时remark 字段不能为空
if (active.value !== 4 && !form.files) {
ElMessage.error("请上传文件");
return;
}
if ((active.value === 2 || active.value === 3) && !form.remark) {
ElMessage.error("请填写金额");
return;
}
if (active.value === 4 && !form.remark) {
ElMessage.error("请填写未结题原因");
return;
}
updateDemandProcess({
...updateStatusList.value[active.value],
status: "1",
})
.then((resp) => {
ElMessage.success("操作成功");
// if (active.value <= 3) {
// active.value += 1;
// }
})
.catch(() => {})
.finally(() => {
@ -178,8 +196,39 @@ if (route.query.id) {
"
type="primary"
@click="submit"
>提交
>保存当前步骤
</el-button>
<template v-if="updateStatusList[active]?.status === '1'">
<el-button
v-if="active <= 1"
@click="
() => {
active += 1;
}
"
>
下一步
</el-button>
<el-button
v-if="active === 2"
@click="
() => {
active = 3;
}
"
>结题
</el-button>
<el-button
v-if="active === 2"
@click="
() => {
active = 4;
}
"
>未结题
</el-button>
</template>
</div>
</div>
</div>

View File

@ -31,9 +31,9 @@
</el-form-item>
</el-form>
<el-row :gutter="10" class="mb8">
<!-- <el-col :span="1.5">-->
<!-- <el-button icon="plus" size="small" type="primary">新增</el-button>-->
<!-- </el-col>-->
<!-- <el-col :span="1.5">-->
<!-- <el-button icon="plus" size="small" type="primary">新增</el-button>-->
<!-- </el-col>-->
<right-toolbar
v-model:showSearch="showSearch"
@queryTable="getList"

View File

@ -1,32 +1,32 @@
<template>
<div class="app-container">
<el-form
v-show="showSearch"
ref="queryRef"
:inline="true"
:model="queryParams"
@submit.prevent
v-show="showSearch"
ref="queryRef"
:inline="true"
:model="queryParams"
@submit.prevent
>
<el-form-item label="专利名称" prop="patentName">
<el-input
v-model="queryParams.patentName"
clearable
placeholder="请输入专利名称"
size="small"
style="width: 240px"
@keyup.enter="handleQuery"
v-model="queryParams.patentName"
clearable
placeholder="请输入专利名称"
size="small"
style="width: 240px"
@keyup.enter="handleQuery"
/>
</el-form-item>
<el-form-item>
<el-button
icon="Search"
size="small"
type="primary"
@click="handleQuery"
>搜索
icon="Search"
size="small"
type="primary"
@click="handleQuery"
>搜索
</el-button>
<el-button icon="Refresh" size="small" @click="resetQuery"
>重置
>重置
</el-button>
</el-form-item>
</el-form>
@ -52,35 +52,35 @@
<!-- </router-link>-->
<!-- </el-col>-->
<right-toolbar
v-model:showSearch="showSearch"
@queryTable="getList"
v-model:showSearch="showSearch"
@queryTable="getList"
></right-toolbar>
</el-row>
<!-- 表格数据 -->
<el-table v-loading="loading" :data="dataList">
<el-table-column label="数据编号" prop="id"/>
<el-table-column label="数据编号" prop="id" />
<el-table-column
:show-overflow-tooltip="true"
label="专利名称"
prop="title"
:show-overflow-tooltip="true"
label="专利名称"
prop="title"
/>
<el-table-column
:show-overflow-tooltip="true"
label="申请号"
prop="applyCode"
:show-overflow-tooltip="true"
label="申请号"
prop="applyCode"
/>
<el-table-column label="发明人" prop="inventor"/>
<el-table-column label="申请(专利权)人" prop="applyName"/>
<el-table-column label="发明人" prop="inventor" />
<el-table-column label="申请(专利权)人" prop="applyName" />
<el-table-column align="center" label="申请日期" prop="applyAt">
<template #default="{ row }">
<span>{{ dayjs(row.applyAt).format("YYYY-MM-DD") }}</span>
</template>
</el-table-column>
<el-table-column
align="center"
class-name="small-padding fixed-width"
label="操作"
align="center"
class-name="small-padding fixed-width"
label="操作"
>
<template #default="{ row }">
<!-- <el-button-->
@ -92,22 +92,22 @@
<!-- </el-button-->
<!-- >-->
<el-button
icon="Delete"
size="small"
type="text"
@click="handleDelete(row.id)"
>删除
icon="Delete"
size="small"
type="text"
@click="handleDelete(row.id)"
>删除
</el-button>
</template>
</el-table-column>
</el-table>
<pagination
v-show="total > 0"
v-model:limit="queryParams.pageSize"
v-model:page="queryParams.pageNum"
:total="total"
@pagination="getList"
v-show="total > 0"
v-model:limit="queryParams.pageSize"
v-model:page="queryParams.pageNum"
:total="total"
@pagination="getList"
/>
<!-- &lt;!&ndash; 添加或修改数据配置对话框 &ndash;&gt;-->
@ -229,13 +229,13 @@ import {
labPatentList,
} from "@/api/admin/laboratory/patent";
import dayjs from "dayjs";
import {ElMessage, ElMessageBox} from "element-plus";
import {useRouter} from "vue-router";
import {getCurrentInstance, reactive, ref, toRefs} from "vue";
import { ElMessage, ElMessageBox } from "element-plus";
import { useRouter } from "vue-router";
import { getCurrentInstance, reactive, ref, toRefs } from "vue";
const router = useRouter();
const {proxy} = getCurrentInstance();
const { proxy } = getCurrentInstance();
const dataList = ref([]);
const open = ref(false);
@ -248,7 +248,7 @@ const data = reactive({
queryParams: {
pageNum: 1,
pageSize: 10,
patentName: undefined
patentName: undefined,
},
// form: {},
// rules: {
@ -280,7 +280,7 @@ const data = reactive({
// },
});
const {queryParams} = toRefs(data);
const { queryParams } = toRefs(data);
const queryRef = ref();
// const patentRef = ref();
@ -290,14 +290,14 @@ const queryRef = ref();
const getList = async () => {
loading.value = true;
labPatentList(queryParams.value)
.then((resp) => {
dataList.value = resp.rows;
total.value = resp.total;
loading.value = false;
})
.catch(() => {
loading.value = false;
});
.then((resp) => {
dataList.value = resp.rows;
total.value = resp.total;
loading.value = false;
})
.catch(() => {
loading.value = false;
});
};
/** 搜索按钮操作 */
@ -315,16 +315,16 @@ function resetQuery() {
/** 删除按钮操作 */
function handleDelete(id) {
ElMessageBox.confirm('是否确认删除数据编号为"' + id + '"的专利项?')
.then(function () {
return deleteLabPatentByIds(id);
})
.then(() => {
getList();
ElMessage.success("删除成功");
})
.catch((err) => {
console.log(err);
});
.then(function () {
return deleteLabPatentByIds(id);
})
.then(() => {
getList();
ElMessage.success("删除成功");
})
.catch((err) => {
console.log(err);
});
}
/** 重置新增的表单以及其他数据 */

View File

@ -46,10 +46,10 @@
prop="title"
/>
<el-table-column :show-overflow-tooltip="true" label="类型" prop="kind" />
<!-- <el-table-column label="所属专家" prop="inventor" />-->
<el-table-column label="课题角色" >
<!-- <el-table-column label="所属专家" prop="inventor" />-->
<el-table-column label="课题角色">
<template #default="{ row }">
{{ subjectRoleDict.find(item => item.value === row.role)?.label}}
{{ subjectRoleDict.find((item) => item.value === row.role)?.label }}
</template>
</el-table-column>
<el-table-column label="课题负责人" prop="director" />
@ -64,13 +64,13 @@
label="操作"
>
<template #default="{ row }">
<!-- <el-button-->
<!-- icon="download"-->
<!-- size="small"-->
<!-- type="text"-->
<!-- @click="handleTakeOff(row.id)"-->
<!-- >下架-->
<!-- </el-button>-->
<!-- <el-button-->
<!-- icon="download"-->
<!-- size="small"-->
<!-- type="text"-->
<!-- @click="handleTakeOff(row.id)"-->
<!-- >下架-->
<!-- </el-button>-->
<el-button
icon="Delete"
size="small"
@ -101,7 +101,7 @@ import {
deleteTechnologyProject,
technologyProjectList,
} from "@/api/admin/laboratory/research-project";
import {subjectRoleDict} from "../../../../../constant/dict";
import { subjectRoleDict } from "../../../../../constant/dict";
const router = useRouter();

View File

@ -53,7 +53,7 @@ getList();
<template>
<div class="app-container">
<el-form ref="queryRef" class="mb8" :model="queryParams" inline>
<el-form ref="queryRef" :model="queryParams" class="mb8" inline>
<!-- 企业名称-->
<el-form-item label="企业名称" prop="name">
<el-input
@ -79,8 +79,6 @@ getList();
</template>
</el-table-column>
<el-table-column label="名称" prop="typeName"></el-table-column>
<el-table-column label="联系人" prop="nickname"></el-table-column>
<el-table-column label="手机" prop="phone"></el-table-column>
<el-table-column label="浏览次数" prop="seeCount"></el-table-column>
<el-table-column label="浏览时间" prop="updateTime"></el-table-column>
</el-table>

View File

@ -39,17 +39,25 @@
<!-- 表格数据 -->
<el-table v-loading="loading" :data="dataList">
<el-table-column align="center" label="数据编号" prop="id" />
<el-table-column align="center"
:show-overflow-tooltip="true"
<el-table-column align="center" label="数据编号" prop="id" />
<el-table-column
align="center"
:show-overflow-tooltip="true"
label="科研项目名称"
prop="title"
/>
<el-table-column align="center" :show-overflow-tooltip="true" label="类型" prop="kind" />
<!-- <el-table-column label="所属专家" prop="inventor" />-->
<el-table-column align="center" label="课题角色" >
<el-table-column
align="center"
:show-overflow-tooltip="true"
label="类型"
prop="kind"
/>
<!-- <el-table-column label="所属专家" prop="inventor" />-->
<el-table-column align="center" label="课题角色">
<template #default="{ row }">
<span>{{ subjectRoleDict.find(item => item.value === row.role)?.label }}</span>
<span>{{
subjectRoleDict.find((item) => item.value === row.role)?.label
}}</span>
</template>
</el-table-column>
<el-table-column align="center" label="课题负责人" prop="director" />
@ -64,13 +72,13 @@
label="操作"
>
<template #default="{ row }">
<!-- <el-button-->
<!-- icon="download"-->
<!-- size="small"-->
<!-- type="text"-->
<!-- @click="handleTakeOff(row.id)"-->
<!-- >下架-->
<!-- </el-button>-->
<!-- <el-button-->
<!-- icon="download"-->
<!-- size="small"-->
<!-- type="text"-->
<!-- @click="handleTakeOff(row.id)"-->
<!-- >下架-->
<!-- </el-button>-->
<el-button
icon="Delete"
size="small"
@ -101,7 +109,7 @@ import {
deleteTechnologyProject,
technologyProjectList,
} from "@/api/admin/research/research-project";
import {subjectRoleDict} from "@/constant/dict";
import { subjectRoleDict } from "@/constant/dict";
const router = useRouter();

View File

@ -16,7 +16,8 @@
</el-col>
</el-row>
<el-row v-if="isAdd">
<!--FIXME:-->
<el-row v-if="isAdd && false">
<el-col :span="24">
<el-form-item label="组织机构代码:" prop="code">
<el-row justify="space-between" type="flex">
@ -88,6 +89,56 @@
placeholder="请输入研究方向"
title="研究方向"
/>
<el-row>
<el-col :span="24">
<el-form-item label="主要技术应用场景" prop="primaryTechnology">
<el-input
v-model="modelValue.primaryTechnology"
:autosize="{ minRows: 4 }"
placeholder="请输入主要技术应用场景"
type="textarea"
></el-input>
</el-form-item>
</el-col>
</el-row>
<el-row>
<el-col :span="24">
<el-form-item label="科研项目" prop="researchProject">
<el-input
v-model="modelValue.researchProject"
:autosize="{ minRows: 4 }"
placeholder="请输入科研项目"
type="textarea"
></el-input>
</el-form-item>
</el-col>
</el-row>
<el-row>
<el-col :span="24">
<el-form-item label="代表性科技成果" prop="achievement">
<el-input
v-model="modelValue.achievement"
:autosize="{ minRows: 4 }"
placeholder="请输入代表性科技成果"
type="textarea"
></el-input>
</el-form-item>
</el-col>
</el-row>
<el-row>
<el-col :span="24">
<el-form-item :label="t('webContact.phone')" prop="phone">
<el-input
v-model="modelValue.phone"
:maxlength="11"
oninput="value = value.replace(/\D+/, '')"
placeholder="请输入联系电话"
></el-input>
</el-form-item>
</el-col>
</el-row>
<el-row>
<el-col :span="24">
<el-form-item label="实验室简介" prop="introduction">

View File

@ -1,30 +1,30 @@
<template>
<div class="user-info-head" @click="editCropper()">
<img :src="options.img" title="点击上传头像" class="img-circle img-lg" />
<img :src="options.img" class="img-circle img-lg" title="点击上传头像" />
</div>
<el-dialog
:title="title"
v-model="open"
width="800px"
:title="title"
append-to-body
@opened="modalOpened"
width="800px"
@close="closeDialog"
@opened="modalOpened"
>
<el-row>
<el-col :xs="24" :md="12" :style="{ height: '350px' }">
<el-col :md="12" :style="{ height: '350px' }" :xs="24">
<vue-cropper
v-if="visible"
ref="cropper"
:autoCrop="options.autoCrop"
:autoCropHeight="options.autoCropHeight"
:autoCropWidth="options.autoCropWidth"
:fixedBox="options.fixedBox"
:img="options.img"
:info="true"
:autoCrop="options.autoCrop"
:autoCropWidth="options.autoCropWidth"
:autoCropHeight="options.autoCropHeight"
:fixedBox="options.fixedBox"
@realTime="realTime"
v-if="visible"
/>
</el-col>
<el-col :xs="24" :md="12" :style="{ height: '350px' }">
<el-col :md="12" :style="{ height: '350px' }" :xs="24">
<div class="avatar-upload-preview">
<img :src="options.previews.url" :style="options.previews.img" />
</div>
@ -34,14 +34,16 @@
<el-row>
<el-col :lg="2" :md="2">
<el-upload
action="#"
:before-upload="beforeUpload"
:http-request="requestUpload"
:show-file-list="false"
:before-upload="beforeUpload"
action="#"
>
<el-button>
选择
<el-icon class="el-icon--right"><Upload /></el-icon>
<el-icon class="el-icon--right">
<Upload />
</el-icon>
</el-button>
</el-upload>
</el-col>
@ -91,25 +93,31 @@ const options = reactive({
function editCropper() {
open.value = true;
}
/** 打开弹出层结束时的回调 */
function modalOpened() {
visible.value = true;
}
/** 覆盖默认上传行为 */
function requestUpload() {}
/** 向左旋转 */
function rotateLeft() {
proxy.$refs.cropper.rotateLeft();
}
/** 向右旋转 */
function rotateRight() {
proxy.$refs.cropper.rotateRight();
}
/** 图片缩放 */
function changeScale(num) {
num = num || 1;
proxy.$refs.cropper.changeScale(num);
}
/** 上传预处理 */
function beforeUpload(file) {
if (file.type.indexOf("image/") == -1) {
@ -124,6 +132,7 @@ function beforeUpload(file) {
};
}
}
/** 上传图片 */
function uploadImg() {
proxy.$refs.cropper.getCropBlob((data) => {
@ -138,15 +147,21 @@ function uploadImg() {
});
});
}
/** 实时预览 */
function realTime(data) {
options.previews = data;
}
/** 关闭窗口 */
function closeDialog() {
options.img = userStore.avatar;
options.visible = false;
}
defineExpose({
editCropper,
});
</script>
<style lang="scss" scoped>

View File

@ -388,7 +388,7 @@ function loadMap(mapName, data) {
],
// color: '#fff',
textStyle: {
color: "#333333",
color: "#fff",
},
visibility: "off",
},
@ -454,6 +454,7 @@ function loadMap(mapName, data) {
width: 100%;
height: 100%;
position: relative;
background: linear-gradient(0deg, #010101, #041744);
.tit {
position: absolute;
top: 75px;
@ -462,13 +463,13 @@ function loadMap(mapName, data) {
font-size: 36px;
font-family: Source Han Sans CN;
font-weight: 300;
color: #333333;
color: #ffffff;
}
}
.map {
width: 100%;
height: 100%;
// background-image: url(./img/lightEffect.png);
background-image: url(./img/lightEffect.png);
background-size: 644px 272px;
background-repeat: no-repeat;
background-position: center top;
@ -511,18 +512,18 @@ function loadMap(mapName, data) {
min-width: 200px;
max-height: 256px;
// overflow: hidden;
border: 1px solid #dcdcdc;
color: #666666;
border: 1px solid #0054ff;
color: rgba(161, 192, 255, 1);
& > div {
display: flex;
}
.head {
border-bottom: 1px solid #dcdcdc;
color: #333333;
border-bottom: 1px solid #0054ff;
color: #ffffff;
}
.a {
flex: 1;
border-right: 1px solid #dcdcdc;
border-right: 1px solid #0054ff;
text-align: center;
line-height: 42px;
overflow: hidden;

View File

@ -2,27 +2,27 @@
<div v-loading="loading" class="small">
<div class="_title">
<div
v-if="!state.banner"
style="height: 394px; background-color: #108de9"
v-if="!state.banner"
style="height: 394px; background-color: #108de9"
></div>
<div v-else style="height: 394px">
<img
:src="state.banner"
alt="banner"
style="width: 100%; height: 100%"
:src="state.banner"
alt="banner"
style="width: 100%; height: 100%"
/>
</div>
<div
v-if="state.caseList.length"
:class="isFixed ? '_fixed' : ''"
class="_li"
v-if="state.caseList.length"
:class="isFixed ? '_fixed' : ''"
class="_li"
>
<ul class="conter1000">
<li
v-for="(item, index) in state.caseList"
:key="item.id"
:class="activeId == item.id ? '_active' : ''"
@click="setScrollTop(item.id, index)"
v-for="(item, index) in state.caseList"
:key="item.id"
:class="activeId == item.id ? '_active' : ''"
@click="setScrollTop(item.id, index)"
>
{{ item.title }}
</li>
@ -32,22 +32,22 @@
</div>
<div v-show="!isShowMore" class="box">
<div
v-for="(item, index) in state.caseList"
:key="index"
:ref="setItemRef"
:data-id="item.id"
class="_item"
v-for="(item, index) in state.caseList"
:key="index"
:ref="setItemRef"
:data-id="item.id"
class="_item"
>
<h3 class="_tit text-center" style="font-size: 24px; color: #333333">
{{ item.title }}
</h3>
<div class="_info conter1000">
<div v-if="isOddEvenNumber(index)" class="_r">
<img :src="item.image" alt srcset/>
<img :src="item.image" alt srcset />
</div>
<div
:class="isOddEvenNumber(index) ? '_paddingl' : '_paddingr'"
class="_l"
:class="isOddEvenNumber(index) ? '_paddingl' : '_paddingr'"
class="_l"
>
<h3 :class="isOddEvenNumber(index) ? 'text-right' : ''">
{{ item.title }}
@ -56,20 +56,20 @@
<p>{{ item.description }}</p>
</div>
<div v-if="!isOddEvenNumber(index)" class="_r">
<img :src="item.image" alt srcset/>
<img :src="item.image" alt srcset />
</div>
</div>
<div class="_list conter1400">
<ul>
<li
v-for="child in item.children.slice(0, 2)"
:key="child.id"
@click="handlePath(child.id)"
v-for="child in item.children.slice(0, 2)"
:key="child.id"
@click="handlePath(child.id)"
>
<el-image
:src="child.image"
fit="cover"
style="width: 100%; height: 135px"
:src="child.image"
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>
@ -77,35 +77,34 @@
</ul>
<div class="_liBtn text-right">
<el-button class="x_btns" @click="handleShowMore(item)"
>查看更多
</el-button
>
>查看更多
</el-button>
</div>
</div>
</div>
</div>
<seeMore
v-if="isShowMore"
v-model:isShowMore="isShowMore"
v-model:oneLevelTitle="oneLevelTitle"
:data="moreData"
v-if="isShowMore"
v-model:isShowMore="isShowMore"
v-model:oneLevelTitle="oneLevelTitle"
:data="moreData"
></seeMore>
<webFooter></webFooter>
</div>
</template>
<script setup>
import {nextTick, onMounted, reactive} from "vue";
import { nextTick, onMounted, reactive } from "vue";
import seeMore from "./components/seeMore.vue";
import webFooter from "@/components/webFooter/index.vue";
import {banner} from "@/api/website/home/index";
import {useRoute, useRouter} from "vue-router";
import {getCase} from "@/api/website/solution";
import { banner } from "@/api/website/home/index";
import { useRoute, useRouter } from "vue-router";
import { getCase } from "@/api/website/solution";
// import { getCategory } from "../../../api/website/solution";
const router = useRouter();
function handlePath(id) {
let routeData = router.resolve({path: `/solution/detail/${id}/`});
let routeData = router.resolve({ path: `/solution/detail/${id}/` });
window.open(routeData.href, "_blank");
}
@ -139,7 +138,6 @@ watch(route, () => {
initData();
});
onMounted(() => {
initData();
});
@ -151,20 +149,21 @@ async function initData() {
let mode = route.params.mode;
// let key = keyDict[name];
mode && getCase({mode}).then((res) => {
state.caseList = res.data;
initScroll();
// loading.value = false;
});
mode &&
getCase({ mode }).then((res) => {
state.caseList = res.data;
initScroll();
// loading.value = false;
});
loading.value = true;
banner({locals: `解决方案>${name}`})
.then((resp) => {
state.banner = resp.data[0].images;
loading.value = false;
})
.catch(() => {
loading.value = false;
});
banner({ locals: `解决方案>${name}` })
.then((resp) => {
state.banner = resp.data[0].images;
loading.value = false;
})
.catch(() => {
loading.value = false;
});
}
function initScroll() {
@ -190,15 +189,15 @@ function initScroll() {
function getScroll() {
return {
left:
window.pageXOffset ||
document.documentElement.scrollLeft ||
document.body.scrollLeft ||
0,
window.pageXOffset ||
document.documentElement.scrollLeft ||
document.body.scrollLeft ||
0,
top:
window.pageYOffset ||
document.documentElement.scrollTop ||
document.body.scrollTop ||
0,
window.pageYOffset ||
document.documentElement.scrollTop ||
document.body.scrollTop ||
0,
};
}