diff --git a/ccw.zip b/ccw.zip deleted file mode 100644 index c564dba..0000000 Binary files a/ccw.zip and /dev/null differ diff --git a/src/api/admin/enterprise/demand.js b/src/api/admin/enterprise/demand.js new file mode 100644 index 0000000..1b14bd7 --- /dev/null +++ b/src/api/admin/enterprise/demand.js @@ -0,0 +1,60 @@ +import request from "@/utils/request"; + +// 企业服务需求列表 +export const demandList = (params) => { + return request({ + url: "/app/demandList", + method: "GET", + params, + }); +}; +// 新增企业服务需求 +export const insertDemand = (data) => { + return request({ + url: "/app/insertDemand", + method: "post", + data, + }); +}; + +// 企业技术需求列表 +export const technologyDemandList = (params) => { + return request({ + url: "/app/technologyDemandList", + method: "GET", + params, + }); +}; + +// 新增企业技术需求 +export const insertTechnologyDemand = (data) => { + return request({ + url: "/app/insertTechnologyDemand", + method: "POST", + data, + }); +}; + +// 企业技术需求详情 +export const getTechnologyDemand = (params) => { + return request({ + url: `/app/getTechnologyDemand`, + method: "GET", + params, + }); +}; +// 修改企业技术需求详情 +export const updateTechnologyDemand = (data) => { + return request({ + url: `/app/updateTechnologyDemand`, + method: "POST", + data, + }); +}; +// 删除企业技术需求 +export const deleteTechnologyDemand = (ids) => { + return request({ + url: `/app/technologyDemand/${ids}`, + method: "DELETE", + }); +}; diff --git a/src/api/admin/enterprise/product.js b/src/api/admin/enterprise/product.js new file mode 100644 index 0000000..0826de2 --- /dev/null +++ b/src/api/admin/enterprise/product.js @@ -0,0 +1,43 @@ +import request from "@/utils/request"; + +// 产品列表 +export const getEnterpriseProduct = (params) => { + return request({ + url: "/app/getEnterpriseProduct", + method: "GET", + params, + }); +}; + +// 新增产品 +export const insertEnterpriseProduct = (data) => { + return request({ + url: "/app/insertEnterpriseProduct", + method: "POST", + data, + }); +}; + +// 根据id获取产品信息 +export const getProductById = (params) => { + return request({ + url: "/app/getProductById", + method: "GET", + params, + }); +}; +// 修改产品 +export const updateEnterpriseProduct = (data) => { + return request({ + url: "/app/updateEnterpriseProduct", + method: "POST", + data, + }); +}; +// 修改产品 +export const deleteEnterpriseProduct = (ids) => { + return request({ + url: `/app/enterpriseProduct/${ids}`, + method: "DELETE", + }); +}; diff --git a/src/api/admin/expert/account.js b/src/api/admin/expert/account.js new file mode 100644 index 0000000..046e18d --- /dev/null +++ b/src/api/admin/expert/account.js @@ -0,0 +1,10 @@ +import request from "@/utils/request"; + +// 专家信息修改 +export const updateExpert = (data) => { + return request({ + url: "/app/expert/updateExpert", + method: "POST", + data, + }); +}; diff --git a/src/api/website/aboutUs/index.js b/src/api/website/aboutUs/index.js new file mode 100644 index 0000000..73890e5 --- /dev/null +++ b/src/api/website/aboutUs/index.js @@ -0,0 +1,9 @@ +import request from "@/utils/request"; + +// 关于我们 +export function getAboutList() { + return request({ + url: "/app/about/getList", + method: "get", + }); +} diff --git a/src/api/website/home/index.js b/src/api/website/home/index.js index 2d756d0..e44f690 100644 --- a/src/api/website/home/index.js +++ b/src/api/website/home/index.js @@ -1,92 +1,195 @@ import request from "@/utils/request"; +// 获取首页统计 +export function getAllCount() { + return request({ + url: "/app/map/getAllCount", + method: "get", + }); +} // 分布专家信息 export function getExpert() { - return request({ - url: "/v1/index/distribution/expert", - method: "get", - }); + return request({ + url: "/v1/index/distribution/expert", + method: "get", + }); } // 分布实验室信息 export function laboratory() { - return request({ - url: "/v1/index/distribution/laboratory", - method: "get", - }); + return request({ + url: "/v1/index/distribution/laboratory", + method: "get", + }); } // 分布需求信息 export function demand() { - return request({ - url: "/v1/index/distribution/demand", - method: "get", - }); + return request({ + url: "/v1/index/distribution/demand", + method: "get", + }); } // 分布技术成果信息 export function achievement() { - return request({ - url: "/v1/index/distribution/achievement", - method: "get", - }); + return request({ + url: "/v1/index/distribution/achievement", + method: "get", + }); } // 分布技术成果信息 export function company() { - return request({ - url: "/v1/index/distribution/company", - method: "get", - }); + return request({ + url: "/v1/index/distribution/company", + method: "get", + }); } // 获取banner export function banner(params) { - return request({ - url: "/app/config/list", - method: "get", - params, - }); + return request({ + url: "/app/config/list", + method: "get", + params, + }); } // 行业领域信息 export function industry() { - return request({ - url: "/v1/sys/industry", - method: "get", - }); + return request({ + url: "/v1/sys/industry", + method: "get", + }); } // 客户端搜索 export function search(params) { - return request({ - url: "/search/search", - method: "get", - params, - }); + return request({ + url: "/search/search", + method: "get", + params, + }); } +// 客户端专利搜索结果详情 +export function searchPatentDetail(id) { + return request({ + url: `/search/patent/${id}`, + method: "get", + }); +} +// 客户端专利搜索结果详情 +export function searchEnterpriseDetail(id) { + return request({ + url: `/search/enterprise/${id}`, + method: "get", + }); +} + // 获取[省]专家分布 export function countExpertByProvince() { - return request({ - url: "/app/map/countExpertByProvince", - method: "get", - }); + return request({ + url: "/app/map/countExpertByProvince", + method: "get", + }); } // 获取[市]专家分布 export function countExpertByCity(provinceCode) { - return request({ - url: "/app/map/countExpertByCity", - method: "get", - params: { - provinceCode, - }, - }); + return request({ + url: "/app/map/countExpertByCity", + method: "get", + params: { + provinceCode, + }, + }); } // 获取[县]专家分布 -export function countExpertByArea() { - return request({ - url: "/app/map/countExpertByArea", - method: "get", - params: { - cityCode, - }, - }); +export function countExpertByArea(cityCode) { + return request({ + url: "/app/map/countExpertByArea", + method: "get", + params: { + cityCode, + }, + }); +} +// 获取[省]企业分布 +export function countEnterpriseByProvince() { + return request({ + url: "/app/map/countEnterpriseByProvince", + method: "get", + }); +} +// 获取[市]企业分布 +export function countEnterpriseByCity(provinceCode) { + return request({ + url: "/app/map/countEnterpriseByCity", + method: "get", + params: { + provinceCode, + }, + }); +} +// 获取[县]企业分布 +export function countEnterpriseByArea(cityCode) { + return request({ + url: "/app/map/countEnterpriseByArea", + method: "get", + params: { + cityCode, + }, + }); +} +// 获取[省]需求分布 +export function countDemandByProvince() { + return request({ + url: "/app/map/countDemandByProvince", + method: "get", + }); +} +// 获取[市]需求分布 +export function countDemandByCity(provinceCode) { + return request({ + url: "/app/map/countDemandByCity", + method: "get", + params: { + provinceCode, + }, + }); +} +// 获取[县]需求分布 +export function countDemandByArea(cityCode) { + return request({ + url: "/app/map/countDemandByArea", + method: "get", + params: { + cityCode, + }, + }); +} +// 获取[省]成果分布 +export function countAchievementByProvince() { + return request({ + url: "/app/map/countAchievementByProvince", + method: "get", + }); +} +// 获取[市]成果分布 +export function countAchievementByCity(provinceCode) { + return request({ + url: "/app/map/countAchievementByCity", + method: "get", + params: { + provinceCode, + }, + }); +} +// 获取[县]成果分布 +export function countAchievementByArea(cityCode) { + return request({ + url: "/app/map/countAchievementByArea", + method: "get", + params: { + cityCode, + }, + }); } diff --git a/src/api/website/innovate/index.js b/src/api/website/innovate/index.js new file mode 100644 index 0000000..500bab8 --- /dev/null +++ b/src/api/website/innovate/index.js @@ -0,0 +1,25 @@ +import request from "@/utils/request"; + +// 获取导航分类 +export function getKinds() { + return request({ + url: "/app/inovate/getKinds", + method: "get", + }); +} +// 获取列表 +export function getInovateList(params) { + return request({ + url: "/app/inovate/list", + method: "get", + params, + }); +} +// 获取详情 +export function getInovateInfo(params) { + return request({ + url: "/app/inovate/getInfo", + method: "get", + params, + }); +} diff --git a/src/api/website/message.js b/src/api/website/message.js new file mode 100644 index 0000000..b6e6d2d --- /dev/null +++ b/src/api/website/message.js @@ -0,0 +1,10 @@ +import request from "@/utils/request"; + +// 发布留言 +export function pubMessage(data) { + return request({ + url: "/app/message", + method: "POST", + data, + }); +} diff --git a/src/api/website/solution/index.js b/src/api/website/solution/index.js new file mode 100644 index 0000000..231f352 --- /dev/null +++ b/src/api/website/solution/index.js @@ -0,0 +1,18 @@ +import request from "@/utils/request"; + +// 获取列表 +export function getCase(params) { + return request({ + url: "/app/solution/getCase", + method: "get", + params, + }); +} +// 获取详情 +export function getInfo(params) { + return request({ + url: "/app/solution/getInfo", + method: "get", + params, + }); +} diff --git a/src/components/FileUpload/index.vue b/src/components/FileUpload/index.vue index 53fc381..83f9808 100644 --- a/src/components/FileUpload/index.vue +++ b/src/components/FileUpload/index.vue @@ -20,18 +20,36 @@
请上传 - - + + 的文件
- -
  • - + +
  • + {{ getFileName(file.name) }}
    - 删除 + 删除
  • @@ -61,8 +79,8 @@ const props = defineProps({ // 是否显示提示 isShowTip: { type: Boolean, - default: true - } + default: true, + }, }); const { proxy } = getCurrentInstance(); @@ -71,30 +89,35 @@ const number = ref(0); const uploadList = ref([]); const baseUrl = import.meta.env.VITE_APP_BASE_API; const uploadFileUrl = ref(import.meta.env.VITE_APP_BASE_API + "/common/upload"); // 上传的图片服务器地址 -const headers = ref({ Authorization: "Bearer " + getToken() }); +// const headers = ref({ Authorization: "Bearer " + getToken() }); +const headers = ref({}); const fileList = ref([]); const showTip = computed( () => props.isShowTip && (props.fileType || props.fileSize) ); -watch(() => props.modelValue, val => { - if (val) { - let temp = 1; - // 首先将值转为数组 - const list = Array.isArray(val) ? val : props.modelValue.split(','); - // 然后将数组转为对象数组 - fileList.value = list.map(item => { - if (typeof item === "string") { - item = { name: item, url: item }; - } - item.uid = item.uid || new Date().getTime() + temp++; - return item; - }); - } else { - fileList.value = []; - return []; - } -},{ deep: true, immediate: true }); +watch( + () => props.modelValue, + (val) => { + if (val) { + let temp = 1; + // 首先将值转为数组 + const list = Array.isArray(val) ? val : props.modelValue.split(","); + // 然后将数组转为对象数组 + fileList.value = list.map((item) => { + if (typeof item === "string") { + item = { name: item, url: item }; + } + item.uid = item.uid || new Date().getTime() + temp++; + return item; + }); + } else { + fileList.value = []; + return []; + } + }, + { deep: true, immediate: true } +); // 上传前校检格式和大小 function handleBeforeUpload(file) { @@ -110,7 +133,9 @@ function handleBeforeUpload(file) { return false; }); if (!isTypeOk) { - proxy.$modal.msgError(`文件格式不正确, 请上传${props.fileType.join("/")}格式文件!`); + proxy.$modal.msgError( + `文件格式不正确, 请上传${props.fileType.join("/")}格式文件!` + ); return false; } } @@ -141,7 +166,9 @@ function handleUploadError(err) { function handleUploadSuccess(res, file) { uploadList.value.push({ name: res.fileName, url: res.fileName }); if (uploadList.value.length === number.value) { - fileList.value = fileList.value.filter(f => f.url !== undefined).concat(uploadList.value); + fileList.value = fileList.value + .filter((f) => f.url !== undefined) + .concat(uploadList.value); uploadList.value = []; number.value = 0; emit("update:modelValue", listToString(fileList.value)); @@ -169,11 +196,11 @@ function listToString(list, separator) { let strs = ""; separator = separator || ","; for (let i in list) { - if(undefined !== list[i].url) { + if (undefined !== list[i].url) { strs += list[i].url + separator; } } - return strs != '' ? strs.substr(0, strs.length - 1) : ''; + return strs != "" ? strs.substr(0, strs.length - 1) : ""; } diff --git a/src/components/webContact/index.vue b/src/components/webContact/index.vue index 428bffb..6e6a5bb 100644 --- a/src/components/webContact/index.vue +++ b/src/components/webContact/index.vue @@ -49,8 +49,10 @@ diff --git a/src/views/admin/enterprise/demand/serviceDemand.vue b/src/views/admin/enterprise/demand/serviceDemand.vue index 7e7f595..7730955 100644 --- a/src/views/admin/enterprise/demand/serviceDemand.vue +++ b/src/views/admin/enterprise/demand/serviceDemand.vue @@ -25,7 +25,7 @@ - + {}); } function handleEdit(id) { - router.push({ path: "./release", query: { id } }); + router.push({ path: "./releaseService", query: { id } }); } getList(); onActivated(() => { diff --git a/src/views/admin/enterprise/demand/technology.vue b/src/views/admin/enterprise/demand/technology.vue index 7d11b0d..091b676 100644 --- a/src/views/admin/enterprise/demand/technology.vue +++ b/src/views/admin/enterprise/demand/technology.vue @@ -53,7 +53,7 @@ > + + diff --git a/src/views/website/innovate/innovate.vue b/src/views/website/innovate/innovate.vue index 6e2068b..68c6706 100644 --- a/src/views/website/innovate/innovate.vue +++ b/src/views/website/innovate/innovate.vue @@ -4,7 +4,7 @@
    - + @@ -39,8 +39,8 @@ class="pagination" :total="state.total" :pageSizes="state.pageSizes" - v-model:page="state.pageNum" - v-model:limit="state.pageSize" + v-model:page="queryParams.pageNum" + v-model:limit="queryParams.pageSize" :autoScroll="false" @pagination="getDataList" /> @@ -55,55 +55,30 @@ import webFooter from "@/components/webFooter/index.vue"; import request from "@/utils/request"; import { reactive, ref } from "vue"; import { useRouter } from "vue-router"; +import { getKinds, getInovateList } from "../../../api/website/innovate"; const router = useRouter(); const loading = ref(true); const listLoading = ref(true); const state = reactive({ kind: [], - kindId: "", list: [], - pageNum: 1, - total: 1, - pageSize: 9, - pageSizes: [9, 9 << 1, 9 << 2, 9 << 3], + pageSizes: [5, 10, 20, 30], title: "", }); - -function kind() { - return request({ - url: "/v1/service/innovate/kind", - method: "get", - }); -} - -function innovate() { - return request({ - url: "/v1/service/innovate", - method: "post", - data: { - kind_id: state.kindId, - page_num: state.pageNum, - page_size: state.pageSize, - title: state.title, - }, - }); -} +const queryParams = reactive({ + pageSize: 10, + pageNum: 1, + kindId: "", +}); function getDataList() { listLoading.value = true; - const res = { code: 200, message: "ok", data: { data: [], count: 0 } }; - // innovate() - // .then((res) => { - // if (200 == res.code) { - state.total = res.data.count; - state.list = res.data.data; - listLoading.value = false; - // } - // }) - // .catch(() => { - // listLoading.value = false; - // }); + getInovateList(queryParams).then((resp) => { + state.total = resp.total; + state.list = resp.rows; + listLoading.value = false; + }); } onMounted(() => { @@ -112,24 +87,17 @@ onMounted(() => { function init() { loading.value = true; - const res = { - code: 200, - message: "ok", - data: [ - { id: "Q7K1Jx6VYodq", title: "知识产权" }, - { id: "gympJE5JrLxe", title: "技术培训" }, - { id: "pd3rJnGwE9ov", title: "产学研用" }, - ], - }; + getKinds().then((resp) => { + state.kind = resp.data; + if (resp.data.length > 0) { + queryParams.kindId = resp.data[0].id; + getDataList(); + } + loading.value = false; + }); // kind() // .then((res) => { // if (200 == res.code) { - state.kind = res.data; - if (res.data.length > 0) { - state.kindId = res.data[0].id; - getDataList(); - } - loading.value = false; // } // }) // .catch(() => { @@ -143,13 +111,13 @@ function handleDetail(id) { } function handleActive(id, title) { - state.kindId = id; - state.pageNum = 1; - state.title = ""; + queryParams.kindId = id; + queryParams.pageNum = 1; + queryParams.title = ""; getDataList(); } function handleQuery() { - state.pageNum = 1; + queryParams.pageNum = 1; getDataList(); } diff --git a/src/views/website/searchList/components/gainItem.vue b/src/views/website/searchList/components/gainItem.vue index d4c9c5e..047a7a5 100644 --- a/src/views/website/searchList/components/gainItem.vue +++ b/src/views/website/searchList/components/gainItem.vue @@ -1,9 +1,12 @@ - \ No newline at end of file + diff --git a/src/views/website/solution/solution.vue b/src/views/website/solution/solution.vue index ac8bcf7..ea141a7 100644 --- a/src/views/website/solution/solution.vue +++ b/src/views/website/solution/solution.vue @@ -62,7 +62,7 @@
    • @@ -85,6 +85,7 @@
    @@ -92,11 +93,12 @@