|
|
@ -27,7 +27,7 @@
|
|
|
|
<span style="color:#BCBCBC;font-size: 16px;">平尺(寸):{{ painting.Ruler }}</span>
|
|
|
|
<span style="color:#BCBCBC;font-size: 16px;">平尺(寸):{{ painting.Ruler }}</span>
|
|
|
|
</span>
|
|
|
|
</span>
|
|
|
|
<up-radio-group
|
|
|
|
<up-radio-group
|
|
|
|
v-model="painting.ArtistUuid"
|
|
|
|
v-model="painting.checked"
|
|
|
|
style="position: absolute;
|
|
|
|
style="position: absolute;
|
|
|
|
left: 550rpx;
|
|
|
|
left: 550rpx;
|
|
|
|
bottom: 150rpx;
|
|
|
|
bottom: 150rpx;
|
|
|
@ -35,7 +35,7 @@
|
|
|
|
placement="right"
|
|
|
|
placement="right"
|
|
|
|
@change="groupChange"
|
|
|
|
@change="groupChange"
|
|
|
|
>
|
|
|
|
>
|
|
|
|
<up-radio :name="painting.ArtistUuid"></up-radio>
|
|
|
|
<up-radio :name="painting.ArtworkUuid"></up-radio>
|
|
|
|
</up-radio-group>
|
|
|
|
</up-radio-group>
|
|
|
|
</span>
|
|
|
|
</span>
|
|
|
|
</view>
|
|
|
|
</view>
|
|
|
@ -50,11 +50,12 @@
|
|
|
|
>取消</up-button
|
|
|
|
>取消</up-button
|
|
|
|
>
|
|
|
|
>
|
|
|
|
<up-button
|
|
|
|
<up-button
|
|
|
|
style="width: 456rpx; margin: auto; height: 86rpx;"
|
|
|
|
style="width: 336rpx; margin: auto; height: 80rpx;"
|
|
|
|
color="#EFC54E"
|
|
|
|
color="#EFC54E"
|
|
|
|
throttleTime="5"
|
|
|
|
throttleTime="5"
|
|
|
|
:loading="loading"
|
|
|
|
:loading="loading"
|
|
|
|
:disabled="isButtonDisabled"
|
|
|
|
:disabled="isButtonDisabled"
|
|
|
|
|
|
|
|
@click="doneSet"
|
|
|
|
> {{ buttonText }}</up-button
|
|
|
|
> {{ buttonText }}</up-button
|
|
|
|
>
|
|
|
|
>
|
|
|
|
</view>
|
|
|
|
</view>
|
|
|
@ -65,9 +66,8 @@
|
|
|
|
import { ref, reactive, onBeforeMount } from "vue";
|
|
|
|
import { ref, reactive, onBeforeMount } from "vue";
|
|
|
|
import useToast from "@/hooks/toast/useToast.js";
|
|
|
|
import useToast from "@/hooks/toast/useToast.js";
|
|
|
|
import { onLoad,onReachBottom } from "@dcloudio/uni-app";
|
|
|
|
import { onLoad,onReachBottom } from "@dcloudio/uni-app";
|
|
|
|
import { creChangepainting } from "@/api/login.js";
|
|
|
|
import { creChangepainting,add } from "@/api/login.js";
|
|
|
|
const { showMessage } = useToast();
|
|
|
|
const { showMessage } = useToast();
|
|
|
|
const value = ref(null)
|
|
|
|
|
|
|
|
const loading = ref(false);
|
|
|
|
const loading = ref(false);
|
|
|
|
const isButtonDisabled = ref(false);
|
|
|
|
const isButtonDisabled = ref(false);
|
|
|
|
const buttonText = ref("确认");
|
|
|
|
const buttonText = ref("确认");
|
|
|
@ -77,6 +77,7 @@ const state = reactive({
|
|
|
|
tableData:[],
|
|
|
|
tableData:[],
|
|
|
|
page:1,
|
|
|
|
page:1,
|
|
|
|
pageSize:10,
|
|
|
|
pageSize:10,
|
|
|
|
|
|
|
|
selectedUuid:"",
|
|
|
|
});
|
|
|
|
});
|
|
|
|
onLoad((options) => {
|
|
|
|
onLoad((options) => {
|
|
|
|
state.id = options.id;
|
|
|
|
state.id = options.id;
|
|
|
@ -84,7 +85,11 @@ state.pid = options.pid;
|
|
|
|
paintingList()
|
|
|
|
paintingList()
|
|
|
|
});
|
|
|
|
});
|
|
|
|
const groupChange =(e) =>{
|
|
|
|
const groupChange =(e) =>{
|
|
|
|
console.log(e)
|
|
|
|
state.tableData.forEach((item) =>{
|
|
|
|
|
|
|
|
if(item.ArtworkUuid!==e){
|
|
|
|
|
|
|
|
item.checked =''
|
|
|
|
|
|
|
|
}
|
|
|
|
|
|
|
|
})
|
|
|
|
}
|
|
|
|
}
|
|
|
|
// 获取可添加的画作列表
|
|
|
|
// 获取可添加的画作列表
|
|
|
|
const paintingList = async (param) => {
|
|
|
|
const paintingList = async (param) => {
|
|
|
@ -100,12 +105,49 @@ const paintingList = async (param) => {
|
|
|
|
});
|
|
|
|
});
|
|
|
|
if (res.status === 0) {
|
|
|
|
if (res.status === 0) {
|
|
|
|
loading.value = false
|
|
|
|
loading.value = false
|
|
|
|
state.tableData = res.data.Data
|
|
|
|
state.tableData = res.data.Data.map((item) =>{
|
|
|
|
|
|
|
|
return {
|
|
|
|
|
|
|
|
...item,
|
|
|
|
|
|
|
|
checked:''
|
|
|
|
|
|
|
|
}
|
|
|
|
|
|
|
|
})||[]
|
|
|
|
|
|
|
|
console.log(1111,state.tableData)
|
|
|
|
} else {
|
|
|
|
} else {
|
|
|
|
showMessage({ type: "error", message: res.msg });
|
|
|
|
showMessage({ type: "error", message: res.msg });
|
|
|
|
}
|
|
|
|
}
|
|
|
|
loading.value = false
|
|
|
|
loading.value = false
|
|
|
|
}
|
|
|
|
}
|
|
|
|
|
|
|
|
//添加画作
|
|
|
|
|
|
|
|
const doneSet = async () => {
|
|
|
|
|
|
|
|
loading.value = true;
|
|
|
|
|
|
|
|
const selectedPainting = state.tableData.find((item) => item.checked);
|
|
|
|
|
|
|
|
if (selectedPainting) {
|
|
|
|
|
|
|
|
const res = await add({
|
|
|
|
|
|
|
|
type: "add",
|
|
|
|
|
|
|
|
id: state.id,
|
|
|
|
|
|
|
|
pid: state.pid,
|
|
|
|
|
|
|
|
drawUid: selectedPainting.ArtworkUuid,
|
|
|
|
|
|
|
|
drawName: selectedPainting.ArtworkName,
|
|
|
|
|
|
|
|
drawerName: selectedPainting.ArtistName,
|
|
|
|
|
|
|
|
drawerUid: selectedPainting.ArtistUuid,
|
|
|
|
|
|
|
|
rulerNum:selectedPainting.Ruler,
|
|
|
|
|
|
|
|
drawThumbnai:selectedPainting.HdPic,
|
|
|
|
|
|
|
|
drawNum:selectedPainting.Tnum,
|
|
|
|
|
|
|
|
drawerNum:selectedPainting.Tfnum,
|
|
|
|
|
|
|
|
});
|
|
|
|
|
|
|
|
if (res.status === 0) {
|
|
|
|
|
|
|
|
showMessage({ type: "sucess", message: "添加画作成功" });
|
|
|
|
|
|
|
|
isButtonDisabled.value = true;
|
|
|
|
|
|
|
|
buttonText.value = "已添加";
|
|
|
|
|
|
|
|
paintingList();
|
|
|
|
|
|
|
|
} else {
|
|
|
|
|
|
|
|
showMessage({ type: "error", message: res.msg });
|
|
|
|
|
|
|
|
}
|
|
|
|
|
|
|
|
} else {
|
|
|
|
|
|
|
|
showMessage({ type: "error", message: "请先选择要添加的画作" });
|
|
|
|
|
|
|
|
}
|
|
|
|
|
|
|
|
loading.value = false;
|
|
|
|
|
|
|
|
};
|
|
|
|
const lower=() =>{
|
|
|
|
const lower=() =>{
|
|
|
|
console.log(888888)
|
|
|
|
console.log(888888)
|
|
|
|
}
|
|
|
|
}
|
|
|
|