页面完善
This commit is contained in:
parent
b0825d0862
commit
d3ab14fc1c
|
@ -12,5 +12,8 @@ export const addFishPicAPI = (data) => syhttp.post('/FishBreed/addFishPic', data
|
||||||
export const pondEnvDataAPI = (data) => syhttp.get('/FishBreed/pondEnvData', data)
|
export const pondEnvDataAPI = (data) => syhttp.get('/FishBreed/pondEnvData', data)
|
||||||
// 图片列表
|
// 图片列表
|
||||||
export const fishPicListAPI = (data) => syhttp.get('/FishBreed/fishPicList', data)
|
export const fishPicListAPI = (data) => syhttp.get('/FishBreed/fishPicList', data)
|
||||||
|
// 添加水产操作
|
||||||
|
export const addFishRecordAPI = (data) => syhttp.post('/FishBreed/addFishRecord', data)
|
||||||
|
|
||||||
//
|
//
|
||||||
// export const fishPicListAPI = (data) => syhttp.get('/FishBreed/fishPicList', data)
|
// export const fishPicListAPI = (data) => syhttp.get('/FishBreed/fishPicList', data)
|
|
@ -20,7 +20,7 @@
|
||||||
<view class="">
|
<view class="">
|
||||||
{{index}}
|
{{index}}
|
||||||
</view>
|
</view>
|
||||||
<view class="updata-btn" @click="navgo('/pages/growRecord/index?type=4')">
|
<view class="updata-btn" @click="navgo(`/pages/growRecord/index?type=4&pond_id=${pond_id}`)">
|
||||||
更新{{index.slice(0,-2)}}
|
更新{{index.slice(0,-2)}}
|
||||||
</view>
|
</view>
|
||||||
</view>
|
</view>
|
||||||
|
@ -183,7 +183,6 @@
|
||||||
const pond_id = ref(0)
|
const pond_id = ref(0)
|
||||||
const headData = reactive({})
|
const headData = reactive({})
|
||||||
onLoad((option) => {
|
onLoad((option) => {
|
||||||
|
|
||||||
pondEnvDataAPI({
|
pondEnvDataAPI({
|
||||||
user_id: 307
|
user_id: 307
|
||||||
}).then(res => {
|
}).then(res => {
|
||||||
|
|
|
@ -118,7 +118,7 @@
|
||||||
{{item.title}}
|
{{item.title}}
|
||||||
</view>
|
</view>
|
||||||
<view class="pop-li">
|
<view class="pop-li">
|
||||||
<up-input placeholder="请输入" border="surround" v-model="formData.value"
|
<up-input placeholder="请输入" border="surround" v-model="formData.text"
|
||||||
@change="change"></up-input>
|
@change="change"></up-input>
|
||||||
</view>
|
</view>
|
||||||
</view>
|
</view>
|
||||||
|
@ -128,8 +128,8 @@
|
||||||
{{item.title}}
|
{{item.title}}
|
||||||
</view>
|
</view>
|
||||||
<view class="pop-li">
|
<view class="pop-li">
|
||||||
<up-input readonly placeholder="点击选择" border="surround" v-model="formData.value"
|
<up-input placeholder="点击选择" border="surround" v-model="formData.select"
|
||||||
@click="showPicker=true"></up-input>
|
@tap="showPicker=true"></up-input>
|
||||||
</view>
|
</view>
|
||||||
</view>
|
</view>
|
||||||
<!-- 上传图片 -->
|
<!-- 上传图片 -->
|
||||||
|
@ -137,9 +137,12 @@
|
||||||
<view class="">
|
<view class="">
|
||||||
{{item.title}}
|
{{item.title}}
|
||||||
</view>
|
</view>
|
||||||
<view class="pop-li">
|
<view class="pop-li" @click="updateImgFn">
|
||||||
<view class="code-img">
|
<view v-if="formData.pic">
|
||||||
<view class="carime-icon" @click="updateImgFn">
|
<u--image :src="formData.pic" width="100%" height="196.26rpx"></u--image>
|
||||||
|
</view>
|
||||||
|
<view class="code-img" v-else>
|
||||||
|
<view class="carime-icon">
|
||||||
<u--image src="/static/img/DJSC.png" width="91.12rpx"
|
<u--image src="/static/img/DJSC.png" width="91.12rpx"
|
||||||
height="91.12rpx"></u--image>
|
height="91.12rpx"></u--image>
|
||||||
<view class="">
|
<view class="">
|
||||||
|
@ -155,7 +158,7 @@
|
||||||
{{item.title}}
|
{{item.title}}
|
||||||
</view>
|
</view>
|
||||||
<view class="pop-li">
|
<view class="pop-li">
|
||||||
<up-input placeholder="请输入品种" border="surround" v-model="formData.value"></up-input>
|
<up-input placeholder="请输入品种" border="surround" v-model="formData.serch"></up-input>
|
||||||
</view>
|
</view>
|
||||||
|
|
||||||
<view style="margin-bottom: 20rpx;" v-for="item in [1]" :key="item">
|
<view style="margin-bottom: 20rpx;" v-for="item in [1]" :key="item">
|
||||||
|
@ -204,7 +207,8 @@
|
||||||
</u-popup>
|
</u-popup>
|
||||||
</view>
|
</view>
|
||||||
<!-- 组件 -->
|
<!-- 组件 -->
|
||||||
<u-picker :show="showPicker" :columns="columns" @confirm="confirmFn"></u-picker>
|
<u-picker :show="showPicker" :columns="columns" @confirm="confirmFn" @close="showPicker=false"
|
||||||
|
@cancel="showPicker=false"></u-picker>
|
||||||
<u-modal :show="showModal" :showCancelButton='true' :closeOnClickOverlay="true" @close="showModal=false"
|
<u-modal :show="showModal" :showCancelButton='true' :closeOnClickOverlay="true" @close="showModal=false"
|
||||||
content='确认删除吗?' @confirm="delFn" @cancel="showModal=false"></u-modal>
|
content='确认删除吗?' @confirm="delFn" @cancel="showModal=false"></u-modal>
|
||||||
</view>
|
</view>
|
||||||
|
@ -224,6 +228,12 @@
|
||||||
import {
|
import {
|
||||||
onLoad
|
onLoad
|
||||||
} from "@dcloudio/uni-app"
|
} from "@dcloudio/uni-app"
|
||||||
|
|
||||||
|
|
||||||
|
import {
|
||||||
|
addFishRecordAPI
|
||||||
|
} from "@/api/aquatic.js"
|
||||||
|
import uplodeImg from "@/utils/uplodeImg.js"
|
||||||
const options1 = reactive([{
|
const options1 = reactive([{
|
||||||
text: '删除'
|
text: '删除'
|
||||||
}])
|
}])
|
||||||
|
@ -233,13 +243,15 @@
|
||||||
], )
|
], )
|
||||||
const confirmFn = (e) => {
|
const confirmFn = (e) => {
|
||||||
showPicker.value = false
|
showPicker.value = false
|
||||||
console.log(e.value)
|
formData.select = e.value[0]
|
||||||
}
|
}
|
||||||
const land_id = ref(0)
|
const land_id = ref(0)
|
||||||
|
const pond_id = ref(0)
|
||||||
const type = ref(0)
|
const type = ref(0)
|
||||||
const actionData = reactive({})
|
const actionData = reactive({})
|
||||||
onLoad((options) => {
|
onLoad((options) => {
|
||||||
land_id.value = options.land_id
|
land_id.value = options.land_id
|
||||||
|
pond_id.value = options.pond_id
|
||||||
actionsListAPI({
|
actionsListAPI({
|
||||||
type: options.type
|
type: options.type
|
||||||
}).then(res => {
|
}).then(res => {
|
||||||
|
@ -250,10 +262,22 @@
|
||||||
})
|
})
|
||||||
const showPop = ref(false)
|
const showPop = ref(false)
|
||||||
const formData = reactive({
|
const formData = reactive({
|
||||||
value: ""
|
text: "",
|
||||||
|
select: "",
|
||||||
|
pic: "",
|
||||||
|
serch: ""
|
||||||
})
|
})
|
||||||
const confirm = () => {
|
const confirm = () => {
|
||||||
|
// addFishRecordAPI({
|
||||||
|
|
||||||
|
// })
|
||||||
showPop.value = false
|
showPop.value = false
|
||||||
|
console.log(formData)
|
||||||
|
|
||||||
|
|
||||||
|
for (let key in formData) {
|
||||||
|
formData[key] = ''
|
||||||
|
}
|
||||||
// var key of formData {
|
// var key of formData {
|
||||||
|
|
||||||
// }
|
// }
|
||||||
|
@ -291,6 +315,13 @@
|
||||||
// console.log(popList)
|
// console.log(popList)
|
||||||
})
|
})
|
||||||
}
|
}
|
||||||
|
const updateImgFn = () => {
|
||||||
|
uplodeImg().then(res => {
|
||||||
|
formData.pic = res.data.image
|
||||||
|
|
||||||
|
|
||||||
|
})
|
||||||
|
}
|
||||||
</script>
|
</script>
|
||||||
|
|
||||||
<style lang="scss" scoped>
|
<style lang="scss" scoped>
|
||||||
|
|
|
@ -11194,6 +11194,11 @@ This will fail in production.`);
|
||||||
}
|
}
|
||||||
};
|
};
|
||||||
const landInfo = /* @__PURE__ */ _export_sfc(_sfc_main$O, [["__scopeId", "data-v-5f103973"], ["__file", "D:/zmj/uniapp/TraceabilityAPP/components/plant/landInfo.vue"]]);
|
const landInfo = /* @__PURE__ */ _export_sfc(_sfc_main$O, [["__scopeId", "data-v-5f103973"], ["__file", "D:/zmj/uniapp/TraceabilityAPP/components/plant/landInfo.vue"]]);
|
||||||
|
const addFishAPI = (data) => syhttp.post("/FishBreed/addFish", data);
|
||||||
|
const pondInfoAPI = (data) => syhttp.get("/FishBreed/pondInfo", data);
|
||||||
|
const addFishPicAPI = (data) => syhttp.post("/FishBreed/addFishPic", data);
|
||||||
|
const pondEnvDataAPI = (data) => syhttp.get("/FishBreed/pondEnvData", data);
|
||||||
|
const fishPicListAPI = (data) => syhttp.get("/FishBreed/fishPicList", data);
|
||||||
const _sfc_main$N = {
|
const _sfc_main$N = {
|
||||||
__name: "index",
|
__name: "index",
|
||||||
setup(__props) {
|
setup(__props) {
|
||||||
|
@ -11206,13 +11211,15 @@ This will fail in production.`);
|
||||||
]);
|
]);
|
||||||
const confirmFn = (e2) => {
|
const confirmFn = (e2) => {
|
||||||
showPicker.value = false;
|
showPicker.value = false;
|
||||||
formatAppLog("log", "at pages/growRecord/index.vue:236", e2.value);
|
formData.select = e2.value[0];
|
||||||
};
|
};
|
||||||
const land_id = vue.ref(0);
|
const land_id = vue.ref(0);
|
||||||
|
const pond_id = vue.ref(0);
|
||||||
vue.ref(0);
|
vue.ref(0);
|
||||||
const actionData = vue.reactive({});
|
const actionData = vue.reactive({});
|
||||||
onLoad((options) => {
|
onLoad((options) => {
|
||||||
land_id.value = options.land_id;
|
land_id.value = options.land_id;
|
||||||
|
pond_id.value = options.pond_id;
|
||||||
actionsListAPI({
|
actionsListAPI({
|
||||||
type: options.type
|
type: options.type
|
||||||
}).then((res) => {
|
}).then((res) => {
|
||||||
|
@ -11223,10 +11230,17 @@ This will fail in production.`);
|
||||||
});
|
});
|
||||||
const showPop = vue.ref(false);
|
const showPop = vue.ref(false);
|
||||||
const formData = vue.reactive({
|
const formData = vue.reactive({
|
||||||
value: ""
|
text: "",
|
||||||
|
select: "",
|
||||||
|
pic: "",
|
||||||
|
serch: ""
|
||||||
});
|
});
|
||||||
const confirm = () => {
|
const confirm = () => {
|
||||||
showPop.value = false;
|
showPop.value = false;
|
||||||
|
formatAppLog("log", "at pages/growRecord/index.vue:275", formData);
|
||||||
|
for (let key in formData) {
|
||||||
|
formData[key] = "";
|
||||||
|
}
|
||||||
};
|
};
|
||||||
const showModal = vue.ref(false);
|
const showModal = vue.ref(false);
|
||||||
const delFn = () => {
|
const delFn = () => {
|
||||||
|
@ -11249,11 +11263,16 @@ This will fail in production.`);
|
||||||
popList.push(item);
|
popList.push(item);
|
||||||
if (item.type == 4) {
|
if (item.type == 4) {
|
||||||
columns[0] = Array.from(item.options);
|
columns[0] = Array.from(item.options);
|
||||||
formatAppLog("log", "at pages/growRecord/index.vue:288", columns[0]);
|
formatAppLog("log", "at pages/growRecord/index.vue:312", columns[0]);
|
||||||
}
|
}
|
||||||
});
|
});
|
||||||
});
|
});
|
||||||
};
|
};
|
||||||
|
const updateImgFn = () => {
|
||||||
|
uplodeImg().then((res) => {
|
||||||
|
formData.pic = res.data.image;
|
||||||
|
});
|
||||||
|
};
|
||||||
return (_ctx, _cache) => {
|
return (_ctx, _cache) => {
|
||||||
const _component_up_input = resolveEasycom(vue.resolveDynamicComponent("up-input"), __easycom_1$7);
|
const _component_up_input = resolveEasycom(vue.resolveDynamicComponent("up-input"), __easycom_1$7);
|
||||||
const _component_u__image = resolveEasycom(vue.resolveDynamicComponent("u--image"), __easycom_0$6);
|
const _component_u__image = resolveEasycom(vue.resolveDynamicComponent("u--image"), __easycom_0$6);
|
||||||
|
@ -11354,8 +11373,8 @@ This will fail in production.`);
|
||||||
show: showPop.value,
|
show: showPop.value,
|
||||||
round: 10,
|
round: 10,
|
||||||
closeable: true,
|
closeable: true,
|
||||||
onClose: _cache[6] || (_cache[6] = ($event) => showPop.value = false),
|
onClose: _cache[5] || (_cache[5] = ($event) => showPop.value = false),
|
||||||
onOpen: _cache[7] || (_cache[7] = ($event) => showPop.value = true)
|
onOpen: _cache[6] || (_cache[6] = ($event) => showPop.value = true)
|
||||||
}, {
|
}, {
|
||||||
default: vue.withCtx(() => [
|
default: vue.withCtx(() => [
|
||||||
vue.createElementVNode("scroll-view", {
|
vue.createElementVNode("scroll-view", {
|
||||||
|
@ -11387,8 +11406,8 @@ This will fail in production.`);
|
||||||
vue.createVNode(_component_up_input, {
|
vue.createVNode(_component_up_input, {
|
||||||
placeholder: "请输入",
|
placeholder: "请输入",
|
||||||
border: "surround",
|
border: "surround",
|
||||||
modelValue: formData.value,
|
modelValue: formData.text,
|
||||||
"onUpdate:modelValue": _cache[1] || (_cache[1] = ($event) => formData.value = $event),
|
"onUpdate:modelValue": _cache[1] || (_cache[1] = ($event) => formData.text = $event),
|
||||||
onChange: _ctx.change
|
onChange: _ctx.change
|
||||||
}, null, 8, ["modelValue", "onChange"])
|
}, null, 8, ["modelValue", "onChange"])
|
||||||
])
|
])
|
||||||
|
@ -11407,11 +11426,10 @@ This will fail in production.`);
|
||||||
),
|
),
|
||||||
vue.createElementVNode("view", { class: "pop-li" }, [
|
vue.createElementVNode("view", { class: "pop-li" }, [
|
||||||
vue.createVNode(_component_up_input, {
|
vue.createVNode(_component_up_input, {
|
||||||
readonly: "",
|
|
||||||
placeholder: "点击选择",
|
placeholder: "点击选择",
|
||||||
border: "surround",
|
border: "surround",
|
||||||
modelValue: formData.value,
|
modelValue: formData.select,
|
||||||
"onUpdate:modelValue": _cache[2] || (_cache[2] = ($event) => formData.value = $event),
|
"onUpdate:modelValue": _cache[2] || (_cache[2] = ($event) => formData.select = $event),
|
||||||
onClick: _cache[3] || (_cache[3] = ($event) => showPicker.value = true)
|
onClick: _cache[3] || (_cache[3] = ($event) => showPicker.value = true)
|
||||||
}, null, 8, ["modelValue"])
|
}, null, 8, ["modelValue"])
|
||||||
])
|
])
|
||||||
|
@ -11428,12 +11446,21 @@ This will fail in production.`);
|
||||||
1
|
1
|
||||||
/* TEXT */
|
/* TEXT */
|
||||||
),
|
),
|
||||||
vue.createElementVNode("view", { class: "pop-li" }, [
|
vue.createElementVNode("view", {
|
||||||
vue.createElementVNode("view", { class: "code-img" }, [
|
class: "pop-li",
|
||||||
vue.createElementVNode("view", {
|
onClick: updateImgFn
|
||||||
class: "carime-icon",
|
}, [
|
||||||
onClick: _cache[4] || (_cache[4] = (...args) => _ctx.updateImgFn && _ctx.updateImgFn(...args))
|
formData.pic ? (vue.openBlock(), vue.createElementBlock("view", { key: 0 }, [
|
||||||
}, [
|
vue.createVNode(_component_u__image, {
|
||||||
|
src: formData.pic,
|
||||||
|
width: "100%",
|
||||||
|
height: "196.26rpx"
|
||||||
|
}, null, 8, ["src"])
|
||||||
|
])) : (vue.openBlock(), vue.createElementBlock("view", {
|
||||||
|
key: 1,
|
||||||
|
class: "code-img"
|
||||||
|
}, [
|
||||||
|
vue.createElementVNode("view", { class: "carime-icon" }, [
|
||||||
vue.createVNode(_component_u__image, {
|
vue.createVNode(_component_u__image, {
|
||||||
src: "/static/img/DJSC.png",
|
src: "/static/img/DJSC.png",
|
||||||
width: "91.12rpx",
|
width: "91.12rpx",
|
||||||
|
@ -11441,7 +11468,7 @@ This will fail in production.`);
|
||||||
}),
|
}),
|
||||||
vue.createElementVNode("view", { class: "" }, " 点击上传图片 ")
|
vue.createElementVNode("view", { class: "" }, " 点击上传图片 ")
|
||||||
])
|
])
|
||||||
])
|
]))
|
||||||
])
|
])
|
||||||
])) : vue.createCommentVNode("v-if", true),
|
])) : vue.createCommentVNode("v-if", true),
|
||||||
vue.createCommentVNode(" 搜索框 "),
|
vue.createCommentVNode(" 搜索框 "),
|
||||||
|
@ -11460,8 +11487,8 @@ This will fail in production.`);
|
||||||
vue.createVNode(_component_up_input, {
|
vue.createVNode(_component_up_input, {
|
||||||
placeholder: "请输入品种",
|
placeholder: "请输入品种",
|
||||||
border: "surround",
|
border: "surround",
|
||||||
modelValue: formData.value,
|
modelValue: formData.serch,
|
||||||
"onUpdate:modelValue": _cache[5] || (_cache[5] = ($event) => formData.value = $event)
|
"onUpdate:modelValue": _cache[4] || (_cache[4] = ($event) => formData.serch = $event)
|
||||||
}, null, 8, ["modelValue"])
|
}, null, 8, ["modelValue"])
|
||||||
]),
|
]),
|
||||||
(vue.openBlock(), vue.createElementBlock(
|
(vue.openBlock(), vue.createElementBlock(
|
||||||
|
@ -11532,16 +11559,18 @@ This will fail in production.`);
|
||||||
vue.createVNode(_component_u_picker, {
|
vue.createVNode(_component_u_picker, {
|
||||||
show: showPicker.value,
|
show: showPicker.value,
|
||||||
columns,
|
columns,
|
||||||
onConfirm: confirmFn
|
onConfirm: confirmFn,
|
||||||
|
onClose: _cache[7] || (_cache[7] = ($event) => showPicker.value = false),
|
||||||
|
onCancel: _cache[8] || (_cache[8] = ($event) => showPicker.value = false)
|
||||||
}, null, 8, ["show", "columns"]),
|
}, null, 8, ["show", "columns"]),
|
||||||
vue.createVNode(_component_u_modal, {
|
vue.createVNode(_component_u_modal, {
|
||||||
show: showModal.value,
|
show: showModal.value,
|
||||||
showCancelButton: true,
|
showCancelButton: true,
|
||||||
closeOnClickOverlay: true,
|
closeOnClickOverlay: true,
|
||||||
onClose: _cache[8] || (_cache[8] = ($event) => showModal.value = false),
|
onClose: _cache[9] || (_cache[9] = ($event) => showModal.value = false),
|
||||||
content: "确认删除吗?",
|
content: "确认删除吗?",
|
||||||
onConfirm: delFn,
|
onConfirm: delFn,
|
||||||
onCancel: _cache[9] || (_cache[9] = ($event) => showModal.value = false)
|
onCancel: _cache[10] || (_cache[10] = ($event) => showModal.value = false)
|
||||||
}, null, 8, ["show"])
|
}, null, 8, ["show"])
|
||||||
],
|
],
|
||||||
2
|
2
|
||||||
|
@ -21015,11 +21044,6 @@ ${i3}
|
||||||
}
|
}
|
||||||
};
|
};
|
||||||
const PagesAquaticAddAquatic = /* @__PURE__ */ _export_sfc(_sfc_main$d, [["__file", "D:/zmj/uniapp/TraceabilityAPP/pages/aquatic/addAquatic.vue"]]);
|
const PagesAquaticAddAquatic = /* @__PURE__ */ _export_sfc(_sfc_main$d, [["__file", "D:/zmj/uniapp/TraceabilityAPP/pages/aquatic/addAquatic.vue"]]);
|
||||||
const addFishAPI = (data) => syhttp.post("/FishBreed/addFish", data);
|
|
||||||
const pondInfoAPI = (data) => syhttp.get("/FishBreed/pondInfo", data);
|
|
||||||
const addFishPicAPI = (data) => syhttp.post("/FishBreed/addFishPic", data);
|
|
||||||
const pondEnvDataAPI = (data) => syhttp.get("/FishBreed/pondEnvData", data);
|
|
||||||
const fishPicListAPI = (data) => syhttp.get("/FishBreed/fishPicList", data);
|
|
||||||
const _sfc_main$c = {
|
const _sfc_main$c = {
|
||||||
__name: "addPond",
|
__name: "addPond",
|
||||||
setup(__props) {
|
setup(__props) {
|
||||||
|
@ -21604,7 +21628,7 @@ ${i3}
|
||||||
"view",
|
"view",
|
||||||
{
|
{
|
||||||
class: "updata-btn",
|
class: "updata-btn",
|
||||||
onClick: _cache[1] || (_cache[1] = ($event) => navgo("/pages/growRecord/index?type=4"))
|
onClick: _cache[1] || (_cache[1] = ($event) => navgo(`/pages/growRecord/index?type=4&pond_id=${pond_id.value}`))
|
||||||
},
|
},
|
||||||
" 更新" + vue.toDisplayString(index2.slice(0, -2)),
|
" 更新" + vue.toDisplayString(index2.slice(0, -2)),
|
||||||
1
|
1
|
||||||
|
|
Loading…
Reference in New Issue