报工页面的项目选择器

This commit is contained in:
砂糖
2025-09-05 15:24:42 +08:00
parent 3f01c5eb48
commit be2c913979
10 changed files with 71 additions and 40 deletions

View File

@@ -66,10 +66,13 @@ export default {
},
methods: {
getFixedSourceUrl: function(url) {
// 如果 url 以 http://47.117.71.33/api/object/ 开头,则替换为带端口的
if (typeof url === 'string' && url.startsWith('http://47.117.71.33/api/object/')) {
return url.replace('http://47.117.71.33/api/object/', 'http://47.117.71.33:15219/api/object/');
// 如果 url 以 http://49.232.154.205/api/object/ 开头,则替换为带端口的
if (typeof url === 'string' && url.startsWith('http://49.232.154.205/api/object/')) {
return url.replace('http://49.232.154.205/api/object/', 'http://49.232.154.205:10006/api/object/');
}
else if (typeof url === 'string' && url.startsWith('http://47.117.71.33/api/object/')) {
return url.replace('http://47.117.71.33/api/object/', 'http://49.232.154.205:10006/api/object/');
}
return url;
},
downloadFile: function() {

View File

@@ -1,6 +1,6 @@
<template>
<view class="media_message_container" @click="clickMediaItem">
<u--image
<u-image
@load="onLoaded"
:showLoading="true"
width="120"
@@ -21,7 +21,7 @@
</view>
</view>
</template>
</u--image>
</u-image>
</view>
</template>
@@ -39,7 +39,7 @@ export default {
computed: {
getImgUrl() {
getImgUrl() {
if (!this.message || !this.message.pictureElem) {
return '';
}
@@ -61,8 +61,12 @@ export default {
},
methods: {
getFixedSourceUrl(url) {
if (typeof url === 'string' && url.startsWith('http://47.117.71.33/api/object/')) {
return url.replace('http://47.117.71.33/api/object/', 'http://47.117.71.33:15219/api/object/');
// 如果 url 以 http://49.232.154.205/api/object/ 开头,则替换为带端口的
if (typeof url === 'string' && url.startsWith('http://49.232.154.205/api/object/')) {
return url.replace('http://49.232.154.205/api/object/', 'http://49.232.154.205:10006/api/object/');
}
else if (typeof url === 'string' && url.startsWith('http://47.117.71.33/api/object/')) {
return url.replace('http://47.117.71.33/api/object/', 'http://49.232.154.205:10006/api/object/');
}
return url;
},

View File

@@ -37,10 +37,14 @@ export default {
},
methods: {
getFixedSourceUrl(url) {
// 如果 url 以 http://47.117.71.33/api/object/ 开头,则替换为带端口的
if (typeof url === 'string' && url.startsWith('http://47.117.71.33/api/object/')) {
return url.replace('http://47.117.71.33/api/object/', 'http://47.117.71.33:15219/api/object/');
}
// 如果 url 以 http://49.232.154.205/api/object/ 开头,则替换为带端口的
// 或者 url 以 http://47.117.71.33/api/object/ 开头也替换为http://49.232.154.205:10006/api/object/
if (typeof url === 'string' && url.startsWith('http://49.232.154.205/api/object/')) {
return url.replace('http://49.232.154.205/api/object/', 'http://49.232.154.205:10006/api/object/');
}
else if (typeof url === 'string' && url.startsWith('http://47.117.71.33/api/object/')) {
return url.replace('http://47.117.71.33/api/object/', 'http://49.232.154.205:10006/api/object/');
}
return url;
},
playVoice() {

View File

@@ -63,11 +63,11 @@ export default {
title: "应用更新",
icon: require("static/images/profile_menu_about.png"),
},
{
idx: 5,
title: '测试推送',
icon: require("static/images/profile_menu_about.png")
},
// {
// idx: 5,
// title: '测试推送',
// icon: require("static/images/profile_menu_about.png")
// },
{
idx: 6,
title: "清除缓存",

View File

@@ -92,11 +92,9 @@
<view class="form-item">
<view class="form-label">请选择项目</view>
<uni-data-select
<oa-project-select
v-model="form.projectId"
:localdata="projectList"
placeholder="请选择项目"
@change="handleProjectChange"
></uni-data-select>
</view>
@@ -472,17 +470,6 @@ export default {
this.getList();
},
// 项目选择变化处理
handleProjectChange(value) {
console.log('项目选择变化:', value);
this.form.projectId = value;
// 获取选中的项目信息
const selectedProject = this.projectList.find(p => p.value === value);
if (selectedProject) {
console.log('选中的项目:', selectedProject);
}
}
}
}
</script>