|
@@ -69,15 +69,15 @@
|
|
<div class="list-item" v-for="(item, index) in adoptList" :key="index">
|
|
<div class="list-item" v-for="(item, index) in adoptList" :key="index">
|
|
<div class="list-info">
|
|
<div class="list-info">
|
|
<div class="tree-icon">
|
|
<div class="tree-icon">
|
|
- <div class="tree-tag" v-show="item.status === 0">未守护</div>
|
|
|
|
- <div class="tree-tag wait" v-show="item.status === 1">已守护</div>
|
|
|
|
|
|
+ <div class="tree-tag" v-show="!item.offlineTakeSelected">未守护</div>
|
|
|
|
+ <div class="tree-tag wait" v-show="item.offlineTakeSelected">已守护</div>
|
|
<!-- <img class="tree-img" src="@/assets/images/foster-home/tree-item.png" alt="" /> -->
|
|
<!-- <img class="tree-img" src="@/assets/images/foster-home/tree-item.png" alt="" /> -->
|
|
- <img class="tree-img" :src="require(`@/assets/images/foster-home/list/${index < 7 ? index : 0}.png`)" alt="" />
|
|
|
|
- <div class="tree-type-name-tag">白糖罂</div>
|
|
|
|
|
|
+ <img class="tree-img" :src="item.icon || require(`@/assets/images/foster-home/list/1.png`)" alt="" />
|
|
|
|
+ <div class="tree-type-name-tag">{{ item.pz }}</div>
|
|
</div>
|
|
</div>
|
|
<div class="item-center">
|
|
<div class="item-center">
|
|
<div class="center-t">
|
|
<div class="center-t">
|
|
- {{item.bm ? item.bm : "BTY-A3"+index}}
|
|
|
|
|
|
+ {{item.fosterCode}}
|
|
<!-- <span class="type-tag">综合:{{item.zh||94}}分</span>
|
|
<!-- <span class="type-tag">综合:{{item.zh||94}}分</span>
|
|
<span class="type-tag">生态:{{item.st||92}}分</span> -->
|
|
<span class="type-tag">生态:{{item.st||92}}分</span> -->
|
|
</div>
|
|
</div>
|
|
@@ -92,13 +92,13 @@
|
|
<div class="center-item p-t-2 age-line" v-show="!isManySetting && !item.settingPrice">
|
|
<div class="center-item p-t-2 age-line" v-show="!isManySetting && !item.settingPrice">
|
|
<div class="age-wrap">
|
|
<div class="age-wrap">
|
|
<div class="has-age">
|
|
<div class="has-age">
|
|
- <div class="age">栽种时间:<span class="unit">{{ item.time }}</span></div>
|
|
|
|
|
|
+ <div class="age">栽种时间:<span class="unit">{{ item.time || '--' }}</span></div>
|
|
</div>
|
|
</div>
|
|
<div class="sort-line"></div>
|
|
<div class="sort-line"></div>
|
|
</div>
|
|
</div>
|
|
- 树龄:<span class="unit"><span class="unit">{{item.age||12}}年</span></span>
|
|
|
|
|
|
+ 树龄:<span class="unit"><span class="unit">{{item.age||'--'}}年</span></span>
|
|
</div>
|
|
</div>
|
|
- <div class="center-item" v-show="isManySetting && settingType !== 'age'"><span class="edit-label">树龄:</span><span class="unit">{{item.age||5}}年</span></div>
|
|
|
|
|
|
+ <div class="center-item" v-show="isManySetting && settingType !== 'age'"><span class="edit-label">树龄:</span><span class="unit">{{item.age||'--'}}年</span></div>
|
|
<div class="center-item edit-item" v-show="isManySetting && settingType !== 'price'"><span class="edit-label">品种:</span><span class="unit">{{item.pz}}</span></div>
|
|
<div class="center-item edit-item" v-show="isManySetting && settingType !== 'price'"><span class="edit-label">品种:</span><span class="unit">{{item.pz}}</span></div>
|
|
|
|
|
|
<div class="center-item p-t-2 has-input edit-item" v-show="(isManySetting && settingType === 'price') || item.settingPrice">
|
|
<div class="center-item p-t-2 has-input edit-item" v-show="(isManySetting && settingType === 'price') || item.settingPrice">
|
|
@@ -147,6 +147,9 @@
|
|
<div class="btn edit-btn" @click="toSettingSinglePrice(index, false)">确认修改</div>
|
|
<div class="btn edit-btn" @click="toSettingSinglePrice(index, false)">确认修改</div>
|
|
</div>
|
|
</div>
|
|
</div>
|
|
</div>
|
|
|
|
+ <div class="pagination-wrap">
|
|
|
|
+ <el-pagination background :page-size="20" :pagerCount="5" v-model:current-page="currentPage" @current-change="getSamplePage" layout="prev, pager, next" :total="totalVal" />
|
|
|
|
+ </div>
|
|
</div>
|
|
</div>
|
|
|
|
|
|
<!-- 渐变主色按钮 -->
|
|
<!-- 渐变主色按钮 -->
|
|
@@ -203,23 +206,23 @@ const statusOptions = ref([
|
|
{ label: "10-20年", value: 2 },
|
|
{ label: "10-20年", value: 2 },
|
|
]);
|
|
]);
|
|
|
|
|
|
-const adoptList = ref([
|
|
|
|
- { status: 0, price: 10, bm: "BTY-A21", pz: "白糖罂", zh: 94, st: 92, sl: 5, total: 215, time: "2022.02.15", },
|
|
|
|
- { status: 0, price: 12, bm: "BTY-A22", pz: "白糖罂", zh: 92, st: 94, sl: 6, total: 201, time: "2022.02.15" },
|
|
|
|
- { status: 0, price: 8, bm: "BTY-A25", pz: "白糖罂", zh: 92, st: 94, sl: 4, total: 220, time: "2022.02.15" },
|
|
|
|
- { status: 1, price: 13, bm: "BTY-A31", pz: "白糖罂", zh: 90, st: 92, sl: 6, total: 202, time: "2022.02.15" },
|
|
|
|
- { status: 1, price: 10, bm: "BTY-A33", pz: "白糖罂", zh: 90, st: 96, sl: 7, total: 190, time: "2022.02.15" },
|
|
|
|
- { status: 1, price: 16, time: "2022.02.15" },
|
|
|
|
- { status: 1, price: 16, time: "2022.02.15" },
|
|
|
|
- { status: 1, price: 16, time: "2022.02.15" },
|
|
|
|
- { status: 1, price: 16, time: "2022.02.15" },
|
|
|
|
-]);
|
|
|
|
|
|
+const adoptList = ref([]);
|
|
|
|
|
|
const owners = ref([{userName: "王丽丽", value: 50}])
|
|
const owners = ref([{userName: "王丽丽", value: 50}])
|
|
|
|
|
|
-const displayedAdoptList = ref([...adoptList.value]); // 初始时显示完整列表
|
|
|
|
|
|
+onMounted(() => {
|
|
|
|
+ getSamplePage()
|
|
|
|
+});
|
|
|
|
|
|
-onMounted(() => {});
|
|
|
|
|
|
+const currentPage = ref(1)
|
|
|
|
+const totalVal = ref(0)
|
|
|
|
+
|
|
|
|
+function getSamplePage() {
|
|
|
|
+ VE_API.manage_interface.fetchSamplePage({farmId: 80865, page: currentPage.value, limit: 20}).then(({data, count}) => {
|
|
|
|
+ adoptList.value = data
|
|
|
|
+ totalVal.value = count
|
|
|
|
+ })
|
|
|
|
+}
|
|
|
|
|
|
// 批量设置
|
|
// 批量设置
|
|
const batchAge = ref(null);
|
|
const batchAge = ref(null);
|
|
@@ -234,25 +237,23 @@ const settingTypeOptions = [
|
|
const settingType = ref("age")
|
|
const settingType = ref("age")
|
|
function manySetPrice() {
|
|
function manySetPrice() {
|
|
isManySetting.value = true;
|
|
isManySetting.value = true;
|
|
- displayedAdoptList.value = adoptList.value.filter((item) => item.status === 0);
|
|
|
|
}
|
|
}
|
|
function saveManySetting(isToSave) {
|
|
function saveManySetting(isToSave) {
|
|
isManySetting.value = false;
|
|
isManySetting.value = false;
|
|
- displayedAdoptList.value = [...adoptList.value]; // 显示完整列表
|
|
|
|
if (isToSave) {
|
|
if (isToSave) {
|
|
// 保存
|
|
// 保存
|
|
}
|
|
}
|
|
}
|
|
}
|
|
|
|
|
|
function setManyPrice(v) {
|
|
function setManyPrice(v) {
|
|
- displayedAdoptList.value.map(item => item.price = v)
|
|
|
|
|
|
+// adoptList.value.map(item => item.price = v)
|
|
}
|
|
}
|
|
|
|
|
|
// 设置单棵树单价
|
|
// 设置单棵树单价
|
|
|
|
|
|
function toSettingSinglePrice(i, val) {
|
|
function toSettingSinglePrice(i, val) {
|
|
console.log('tototot');
|
|
console.log('tototot');
|
|
- displayedAdoptList.value[i].settingPrice = val
|
|
|
|
|
|
+ adoptList.value[i].settingPrice = val
|
|
}
|
|
}
|
|
function settingSinglePrice() {
|
|
function settingSinglePrice() {
|
|
console.log('sss');
|
|
console.log('sss');
|
|
@@ -304,8 +305,25 @@ function settingSinglePrice() {
|
|
.select-b {
|
|
.select-b {
|
|
margin-top: 8px;
|
|
margin-top: 8px;
|
|
}
|
|
}
|
|
|
|
+ .pagination-wrap {
|
|
|
|
+ position: absolute;
|
|
|
|
+ bottom: 0;
|
|
|
|
+ width: 100%;
|
|
|
|
+ text-align: right;
|
|
|
|
+ right: 0;
|
|
|
|
+ background: #fff;
|
|
|
|
+ padding: 12px;
|
|
|
|
+ box-shadow: 0px 0px 4px #ccc;
|
|
|
|
+ box-sizing: border-box;
|
|
|
|
+ ::v-deep {
|
|
|
|
+ .el-pagination {
|
|
|
|
+ justify-content: center;
|
|
|
|
+ }
|
|
|
|
+ }
|
|
|
|
+ }
|
|
.list-wrap {
|
|
.list-wrap {
|
|
padding: 12px 0;
|
|
padding: 12px 0;
|
|
|
|
+ margin-bottom: 60px;
|
|
.list-item {
|
|
.list-item {
|
|
background: rgba(120, 120, 120, 0.05);
|
|
background: rgba(120, 120, 120, 0.05);
|
|
padding: 8px 16px 8px 10px;
|
|
padding: 8px 16px 8px 10px;
|