This commit is contained in:
Aiden 2024-10-21 18:19:09 +08:00
parent 5a2cde2e0a
commit 811e6bbe0d
2 changed files with 163 additions and 131 deletions

View File

@ -2,115 +2,141 @@
<view class="content">
<!-- <navBar> 添加画作 </navBar> -->
<view class="container-box">
<span style="font-weight: bold"> 已扫画筒号{{ state.pid }} </span>
<view style="display: flex; align-items: center">
<up-input
class="login-input"
placeholder="画家姓名/画作名称"
v-model="state.searchValue"
style="flex: 1; margin-right: 10rpx; height: 80rpx"
clearable
>
</up-input>
<div style="height: 160rpx">
<span style="font-weight: bold"> 已扫画筒号{{ state.pid }} </span>
<view style="display: flex; align-items: center">
<up-input
class="login-input"
placeholder="画家姓名/画作名称"
v-model="state.searchValue"
style="flex: 1; margin-right: 10rpx; height: 80rpx"
clearable
>
</up-input>
<up-button
style="
width: 120rpx;
height: 80rpx;
margin-top: 15rpx;
margin-left: 15rpx;
"
color="#EFC54E"
throttleTime="5"
:loading="loading"
@click="paintingList((state.page = 1))"
>搜索</up-button
>
</view>
<up-list @scrolltolower="scrolltolower" style="height: 1120rpx">
<span>
<up-image
v-if="showNoResultImage"
src="../../static/empty.png"
width="100px"
height="100px"
style="margin-left: 240rpx; margin-top: 200rpx; margin-bottom: 20px"
>
</up-image>
<span
v-if="showNoResultImage"
<up-button
style="
font-weight: bold;
color: #bababa;
margin-left: 280rpx;
margin-top: 20rpx;
width: 120rpx;
height: 80rpx;
margin-top: 15rpx;
margin-left: 15rpx;
"
>暂无画作</span
color="#EFC54E"
throttleTime="5"
:loading="loading"
@click="paintingList((state.page = 1))"
>搜索</up-button
>
</span>
<up-list-item
class="painting-box"
v-for="(painting, index) in state.tableData"
:key="index"
>
<span style="display: flex; align-items: center; position: relative">
</view>
</div>
<view style="flex: 1">
<up-list @scrolltolower="scrolltolower" style="height: 1050rpx">
<span>
<up-image
:show-loading="true"
:src="painting.HdPic"
v-if="showNoResultImage"
src="../../static/empty.png"
width="100px"
height="100px"
@click="enlarge(painting.HdPic)"
></up-image>
style="
margin-left: 240rpx;
margin-top: 200rpx;
margin-bottom: 20px;
"
>
</up-image>
<span
style="display: flex; flex-direction: column; margin-left: 10px"
v-if="showNoResultImage"
style="
font-weight: bold;
color: #bababa;
margin-left: 280rpx;
margin-top: 20rpx;
"
>暂无画作</span
>
<span style="font-weight: bold">{{ painting.ArtworkName }}</span>
<span style="color: #bcbcbc; font-size: 16px"
>画作编号{{ painting.Tfnum }}</span
>
<span style="color: #bcbcbc; font-size: 16px"
>画家编号{{ painting.Tnum }}</span
>
<span style="color: #bcbcbc; font-size: 16px"
>画家姓名{{ painting.ArtistName }}</span
>
<span style="color: #bcbcbc; font-size: 16px"
>平尺{{ painting.Ruler }}</span
>
</span>
<up-radio-group
v-model="painting.checked"
style="position: absolute; left: 550rpx; bottom: 150rpx"
placement="right"
@change="groupChange"
>
<up-radio :name="painting.ArtworkUuid"></up-radio>
</up-radio-group>
</span>
</up-list-item>
</up-list>
<up-list-item
class="painting-box"
v-for="(painting, index) in state.tableData"
:key="index"
>
<span
style="display: flex; align-items: center; position: relative"
>
<up-image
:show-loading="true"
:src="painting.HdPic"
width="100px"
height="100px"
@click="enlarge(painting.HdPic)"
></up-image>
<span
style="
display: flex;
flex-direction: column;
margin-left: 10px;
flex: 1;
"
>
<div
style="
display: flex;
justify-content: space-between;
align-items: center;
width: 100%;
"
>
<span style="font-weight: bold">{{
painting.ArtworkName
}}</span>
<up-radio-group
v-model="painting.checked"
placement="right"
@change="groupChange"
>
<up-radio :name="painting.ArtworkUuid"></up-radio>
</up-radio-group>
</div>
<span style="color: #bcbcbc; font-size: 16px"
>画作编号{{ painting.Tfnum }}</span
>
<span style="color: #bcbcbc; font-size: 16px"
>画家编号{{ painting.Tnum }}</span
>
<span style="color: #bcbcbc; font-size: 16px"
>画家姓名{{ painting.ArtistName }}</span
>
<span style="color: #bcbcbc; font-size: 16px"
>平尺{{ painting.Ruler }}</span
>
</span>
</span>
</up-list-item>
</up-list>
</view>
</view>
<view class="button-container">
<up-button
style="width: 336rpx; margin: auto; height: 80rpx"
color="#BABABA"
throttleTime="5"
@click="backScan"
v-if="runTimeEnv()"
>取消</up-button
>
<up-button
style="width: 336rpx; margin: auto; height: 80rpx"
color="#EFC54E"
throttleTime="5"
:loading="loading"
:disabled="isButtonDisabled"
@click="doneSet"
v-if="hasPermission('APP-scanAdd')"
>
{{ buttonText }}</up-button
>
</view>
</view>
<view class="button-container">
<up-button
style="width: 336rpx; margin: auto; height: 80rpx"
color="#BABABA"
throttleTime="5"
@click="backScan"
v-if="runTimeEnv()"
>取消</up-button
>
<up-button
style="width: 336rpx; margin: auto; height: 80rpx"
color="#EFC54E"
throttleTime="5"
:loading="loading"
:disabled="isButtonDisabled"
@click="doneSet"
v-if="hasPermission('APP-scanAdd')"
>
{{ buttonText }}</up-button
>
</view>
</template>
@ -290,60 +316,63 @@ page {
background: url("@/static/bgp.png") no-repeat;
background-size: 100% 100%;
background-attachment: fixed;
height: 100vh;
height: 100%;
box-sizing: border-box;
}
:deep(.u-radio) {
justify-content: end;
}
.content {
overflow-y: auto;
display: flex;
flex-direction: column;
align-items: center;
justify-content: center;
padding: 40rpx;
box-sizing: border-box;
width: 100%;
height: 100%;
.container-box {
height: auto;
width: 95%;
display: flex;
flex-direction: column;
margin-top: 40rpx;
padding: 40rpx;
box-sizing: border-box;
background-color: #fff;
}
.login-input {
width: 80%;
display: flex;
background-color: #f9f9f9;
margin-top: 20rpx;
padding: 32rpx 24rpx;
box-sizing: border-box;
height: 96rpx;
}
.painting-box {
height: 100%;
margin-bottom: 20rpx;
width: 100%;
box-sizing: border-box;
height: 100%;
flex: 1;
padding: 40rpx;
display: flex;
flex-direction: column;
margin-top: 20rpx;
padding: 20rpx;
box-sizing: border-box;
background-color: #fff;
box-shadow: 0 0 6px rgba(219, 218, 218, 0.5);
.login-input {
width: 80%;
display: flex;
background-color: #f9f9f9;
margin-top: 20rpx;
padding: 32rpx 24rpx;
box-sizing: border-box;
height: 96rpx;
}
.painting-box {
height: 100%;
width: 100%;
display: flex;
flex-direction: column;
margin-top: 20rpx;
padding: 20rpx;
box-sizing: border-box;
background-color: #fff;
box-shadow: 0 0 6px rgba(219, 218, 218, 0.5);
}
}
}
.button-container {
display: flex;
justify-content: space-between;
width: 100%;
position: fixed;
bottom: 1rpx;
left: 0;
padding: 0 20rpx;
padding: 20rpx;
box-sizing: border-box;
background-color: #fff;
height: 8%;
}
uni-button:after {
border: none;

View File

@ -134,6 +134,9 @@ const closeFn = async () => {
}
} else {
showMessage({ type: "error", message: res.msg });
if (runTimeEnv()) {
closeWebview();
}
}
loading.value = false;
};