pull/48/head
parent
44c1c8e2fb
commit
7075add91b
|
@ -2374,7 +2374,8 @@
|
|||
}
|
||||
|
||||
.vrcode-btn {
|
||||
width: 100px;
|
||||
min-width: 80px;
|
||||
padding: 0 15px;
|
||||
height: 40px;
|
||||
display: flex;
|
||||
align-items: center;
|
||||
|
|
File diff suppressed because one or more lines are too long
|
@ -2518,7 +2518,8 @@ color: #FFFFFF;
|
|||
}
|
||||
|
||||
.vrcode-btn {
|
||||
width: 100px;
|
||||
min-width: 80px;
|
||||
padding: 0 15px;
|
||||
height: 40px;
|
||||
display: flex;
|
||||
align-items: center;
|
||||
|
|
Binary file not shown.
After Width: | Height: | Size: 4.8 KiB |
Binary file not shown.
After Width: | Height: | Size: 5.0 KiB |
Binary file not shown.
After Width: | Height: | Size: 4.0 KiB |
|
@ -121,6 +121,26 @@ const routes = [
|
|||
path: '/agricultural',
|
||||
name: 'agricultural',
|
||||
component: () => import('../views/vrcode/agricultural.vue')
|
||||
},
|
||||
{
|
||||
path: '/sprayInsecticide',
|
||||
name: 'sprayInsecticide',
|
||||
component: () => import('../views/vrcode/sprayInsecticide.vue')
|
||||
},
|
||||
{
|
||||
path: '/spreadManure',
|
||||
name: 'spreadManure',
|
||||
component: () => import('../views/vrcode/spreadManure.vue')
|
||||
},
|
||||
{
|
||||
path: '/pickingRecords',
|
||||
name: 'pickingRecords',
|
||||
component: () => import('../views/vrcode/pickingRecords.vue')
|
||||
},
|
||||
{
|
||||
path: '/productTraceability',
|
||||
name: 'productTraceability',
|
||||
component: () => import('../views/vrcode/productTraceability.vue')
|
||||
}]
|
||||
},
|
||||
]
|
||||
|
|
|
@ -67,7 +67,7 @@ export default new Vuex.Store({
|
|||
{ label: '氨气', value: 46, countType: 0,unit:'ppm' },
|
||||
{ label: '硫化氢', value: 47, countType: 0,unit:'ppm' },
|
||||
{ label: '氧气', value: 48, countType: 2,unit:'%vol' },
|
||||
{ label: '土壤张力', value: 49, countType: 2,unit:'KPa' },
|
||||
{ label: '土壤张力', value: 49, countType: 4,unit:'KPa' },
|
||||
{ label: '铜(CU)', value: 50, countType: 0,unit:'mg/kg' },
|
||||
{ label: '镉(CD)', value: 51, countType: 2,unit:'mg/kg' },
|
||||
{ label: '铅(PB)', value: 52, countType: 0,unit:'mg/kg' },
|
||||
|
|
|
@ -26,7 +26,7 @@
|
|||
</template>
|
||||
<ul class="table-ul">
|
||||
<li class="table-li" @click="toRouter1(item1)"
|
||||
:class="item.routerList.indexOf(routerNow) != -1 && routerIndex == item1.index ? 'active' : ''"
|
||||
:class="routerNow == item1.router ? 'active' : ''"
|
||||
v-for="item1, index1 in item.list" :key="index1">{{ item1.name }}
|
||||
</li>
|
||||
</ul>
|
||||
|
@ -56,8 +56,8 @@ export default {
|
|||
activeNames: [3],
|
||||
leftList: [
|
||||
{ name: '种植计划', img: require('../assets/image/vrcode-icon0.png'), list: [], router: 'plantingPlan', isRouter: true, },
|
||||
{ name: '生产环节', routerList: ['agricultural'], img: require('../assets/image/vrcode-icon1.png'), list: [{ name: '农事管理',router:'agricultural' }, { name: '施肥记录' }, { name: '打药记录' }, { name: '采摘记录' }, { name: '清洁记录' }, { name: '病虫害管理' },] },
|
||||
{ name: '产品追溯', routerList: [], img: require('../assets/image/vrcode-icon2.png'), list: [{ name: '溯源批次' }, { name: '配置溯源版面' }, { name: '各种报告库' }] },
|
||||
{ name: '生产环节', routerList: ['agricultural','sprayInsecticide','spreadManure','pickingRecords'], img: require('../assets/image/vrcode-icon1.png'), list: [{ name: '农事管理',router:'agricultural' }, { name: '施肥记录',router:'spreadManure' }, { name: '打药记录',router:'sprayInsecticide' }, { name: '采摘记录',router:'pickingRecords' }, { name: '清洁记录' }, { name: '病虫害管理' },] },
|
||||
{ name: '产品追溯', routerList: [],router: 'productTraceability', img: require('../assets/image/vrcode-icon2.png'), list: [{ name: '溯源批次' }, { name: '配置溯源版面' }, { name: '各种报告库' }] },
|
||||
{ name: '基础信息设置', routerList: [], img: require('../assets/image/vrcode-icon3.png'), list: [{ name: '作物品种' }, { name: '种植栽培模式' }, { name: '农事作业工序' }, { name: '人员管理' }, { name: '农场信息管理' }, { name: '供应商管理' }, { name: '生产资料管理' }, { name: '农机工具管理' }, { name: '作物外观图片库' },] },],
|
||||
routerNow: 'plantingPlan',
|
||||
deviceName: 1,
|
||||
|
@ -143,8 +143,10 @@ export default {
|
|||
if (item.http) {
|
||||
window.location.href = item.http;
|
||||
}else{
|
||||
if(this.routerNow!=item.router){
|
||||
this.$router.push({ name: item.router })
|
||||
}
|
||||
}
|
||||
} else {
|
||||
this.$message('当前页面正在努力开发中');
|
||||
}
|
||||
|
|
|
@ -0,0 +1,241 @@
|
|||
<template>
|
||||
<div class="plantingPlan ">
|
||||
<div class="page-content">
|
||||
<div class="table-title">
|
||||
<img src="../../assets/img/pickingRecords.png" alt="" />
|
||||
采摘记录
|
||||
</div>
|
||||
<div class="flex-view">
|
||||
<div class="vrcode-btn save-btn" @click="addModel = true">
|
||||
<img src="../../assets/img/add.png" alt="">新增采摘信息
|
||||
</div>
|
||||
</div>
|
||||
<div class="vrcode-table">
|
||||
<div class="vrcode-table-view table-view">
|
||||
<el-table :data="tableData" :row-class-name="tableRowClassName" height="520" style="width: 100%">
|
||||
<el-table-column prop="id" label="ID"></el-table-column>
|
||||
<el-table-column prop="data0" label="种植计划"></el-table-column>
|
||||
<el-table-column prop="data1" label="操作类型"></el-table-column>
|
||||
<el-table-column prop="data3" label="放置位置"></el-table-column>
|
||||
<el-table-column prop="data2" label="操作员"></el-table-column>
|
||||
|
||||
<el-table-column prop="data4" show-overflow-tooltip label="操作时间"></el-table-column>
|
||||
<el-table-column prop="data5" label="是否公开">
|
||||
<template slot-scope="scope">
|
||||
<div class="table-flex">
|
||||
<div class="isOpen" :class="scope.row.data5 ? 'open-green' : 'open-red'">
|
||||
{{ scope.row.data5 ? '已公开' : '未公开' }}
|
||||
</div>
|
||||
</div>
|
||||
</template>
|
||||
</el-table-column>
|
||||
<el-table-column label="操作" width="200">
|
||||
<template slot-scope="scope">
|
||||
|
||||
<div class="vrcode-table-btn">
|
||||
<div class="vrcode-btn blue-btn" @click="addModel = true">
|
||||
编辑
|
||||
</div>
|
||||
<div class="vrcode-btn red-btn">
|
||||
删除
|
||||
</div>
|
||||
</div>
|
||||
</template>
|
||||
</el-table-column>
|
||||
</el-table>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
|
||||
<el-dialog title="提示" top="5vh" :visible.sync="addModel" width="740px" class="vrcode-model" :append-to-body="true">
|
||||
<div class="vrcode-model-title">
|
||||
新增采摘信息
|
||||
</div>
|
||||
<div class="vrcode-content">
|
||||
<div class="vrcode-view">
|
||||
<div class="vrcode-input-sel">
|
||||
<div class="title">种植计划</div>
|
||||
<el-dropdown @command="handleCommand">
|
||||
<div class="el-dropdown-link">
|
||||
<input v-model="TypeSel" type="text" class="input-input" placeholder="请选择种植计划">
|
||||
<div class="arrow"><img src="../../assets/image/arrow.png" alt=""></div>
|
||||
</div>
|
||||
<el-dropdown-menu slot="dropdown">
|
||||
<el-dropdown-item v-for="item, index in typeSelList" :key="index" :command="index">{{
|
||||
item.name
|
||||
}}</el-dropdown-item>
|
||||
|
||||
</el-dropdown-menu>
|
||||
</el-dropdown>
|
||||
</div>
|
||||
<div class="vrcode-input-sel">
|
||||
<div class="title">操作类型</div>
|
||||
<el-dropdown @command="handleCommand">
|
||||
<div class="el-dropdown-link">
|
||||
<input v-model="TypeSel" type="text" class="input-input" placeholder="请选择操作类型">
|
||||
<div class="arrow"><img src="../../assets/image/arrow.png" alt=""></div>
|
||||
</div>
|
||||
<el-dropdown-menu slot="dropdown">
|
||||
<el-dropdown-item v-for="item, index in typeSelList" :key="index" :command="index">{{
|
||||
item.name
|
||||
}}</el-dropdown-item>
|
||||
|
||||
</el-dropdown-menu>
|
||||
</el-dropdown>
|
||||
</div>
|
||||
<div class="vrcode-input">
|
||||
<div class="input-title">放置位置</div>
|
||||
<input type="text" placeholder="请输入放置位置">
|
||||
</div>
|
||||
<div class="vrcode-input-seltime">
|
||||
<div class="title">开始时间</div>
|
||||
<div class="seltime">
|
||||
<el-date-picker v-model="value1" type="date" placeholder="请选择开始时间">
|
||||
</el-date-picker>
|
||||
<div class="seltime-icon">
|
||||
<img src="../../assets/img/vrcode-time.png" alt="">
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
<div class="vrcode-input-seltime">
|
||||
<div class="title">结束时间</div>
|
||||
<div class="seltime">
|
||||
<el-date-picker v-model="value1" type="date" placeholder="请选择结束时间">
|
||||
</el-date-picker>
|
||||
<div class="seltime-icon">
|
||||
<img src="../../assets/img/vrcode-time.png" alt="">
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
<div class="vrcode-input-sel">
|
||||
<div class="title">操作员</div>
|
||||
<el-dropdown @command="handleCommand">
|
||||
<div class="el-dropdown-link">
|
||||
<input v-model="TypeSel" type="text" class="input-input" placeholder="请选择操作员">
|
||||
<div class="arrow"><img src="../../assets/image/arrow.png" alt=""></div>
|
||||
</div>
|
||||
<el-dropdown-menu slot="dropdown">
|
||||
<el-dropdown-item v-for="item, index in typeSelList" :key="index" :command="index">{{
|
||||
item.name
|
||||
}}</el-dropdown-item>
|
||||
|
||||
</el-dropdown-menu>
|
||||
</el-dropdown>
|
||||
</div>
|
||||
<div class="vrcode-textarea">
|
||||
<div class="title">备注</div>
|
||||
<textarea placeholder="输入您的备注信息" name="" id="" cols="30" rows="10"></textarea>
|
||||
</div>
|
||||
<div class="vrcode-selimage">
|
||||
<div class="title">工作图片</div>
|
||||
<div class="sel-image-view">
|
||||
<div class="sel-img sel-div" v-for="item, index in imgList" :key="index">
|
||||
<el-image :src="item"></el-image>
|
||||
<div class="del-img" @click="delImage(index)">
|
||||
<img src="../../assets/img/del-image.png" alt="">
|
||||
</div>
|
||||
</div>
|
||||
<label for="sel-img">
|
||||
<div class="sel-image-sel sel-div" v-if="imgList.length < 6">
|
||||
<img src="../../assets/img/add-image.png" alt="">
|
||||
</div>
|
||||
</label>
|
||||
<input ref="fileInput" type="file" multiple id="sel-img" accept="image/*"
|
||||
@change="handleImageChange" />
|
||||
</div>
|
||||
</div>
|
||||
<div class="vrcode-radio">
|
||||
<div class="radio-name">是否追溯</div>
|
||||
<div class="radio-sel">
|
||||
<img v-if="modelisTrue" class="sel" src="../../assets/image/radio.png" alt="">
|
||||
<div v-else @click="modelisTrue=true" class="no-sel"></div>
|
||||
<span>是</span>
|
||||
</div>
|
||||
<div class="radio-sel">
|
||||
<img v-if="!modelisTrue" class="sel" src="../../assets/image/radio.png" alt="">
|
||||
<div v-else @click="modelisTrue=false" class="no-sel"></div>
|
||||
<span>否</span>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
<span slot="footer" class="dialog-footer">
|
||||
<div class="vrcode-btn save-btn" @click="addModel = false">保存</div>
|
||||
<div class="vrcode-btn cancle-btn" @click="addModel = false">取消</div>
|
||||
</span>
|
||||
</el-dialog>
|
||||
|
||||
</div>
|
||||
</template>
|
||||
<script>
|
||||
export default {
|
||||
data() {
|
||||
return {
|
||||
edit: false,
|
||||
addModel: false,
|
||||
tableData: [{
|
||||
id: '13', data0: '西红柿种植',
|
||||
data1: '施肥',
|
||||
data2: '刘永强',
|
||||
data3: '',
|
||||
data4: '2023-04-05 21:00',
|
||||
data5: true,
|
||||
}, {}, {}, {}, {}, {}, {}, {},],
|
||||
typeSelList: [{ name: '1#平均空气温度', value: 1, },
|
||||
{ name: '2#平均空气温度', value: 2, },
|
||||
{ name: '1#空气温度', value: 3, },
|
||||
{ name: '2#空气温度', value: 4, },
|
||||
{ name: '3#空气温度', value: 5, },
|
||||
{ name: '4#空气温度', value: 6, },
|
||||
{ name: '5#空气温度', value: 7, },
|
||||
{ name: '6#空气温度', value: 8, },
|
||||
{ name: '7#空气温度', value: 9, },
|
||||
{ name: '8#空气温度', value: 10, },],
|
||||
TypeSel: '',
|
||||
value1: '',
|
||||
modelisTrue:false,
|
||||
imgList: ['https://fuss10.elemecdn.com/e/5d/4a731a90594a4af544c0c25941171jpeg.jpeg']
|
||||
}
|
||||
},
|
||||
mounted() { },
|
||||
methods: {
|
||||
handleCommand() {
|
||||
|
||||
},
|
||||
tableRowClassName({ row, rowIndex }) {
|
||||
if (rowIndex % 2 == 1) {
|
||||
return 'warning-row';
|
||||
} else if (rowIndex % 2 == 0) {
|
||||
return 'success-row';
|
||||
}
|
||||
return '';
|
||||
},
|
||||
delImage(index) {
|
||||
console.log('删除图片', index);
|
||||
this.imgList.splice(index, 1);
|
||||
},
|
||||
handleImageChange(event) {
|
||||
const files = event.target.files;
|
||||
if (files.length > 0) {
|
||||
for (let i = 0; i < files.length; i++) {
|
||||
const reader = new FileReader();
|
||||
|
||||
reader.onload = (e) => {
|
||||
this.imgList.push(e.target.result);
|
||||
};
|
||||
|
||||
reader.readAsDataURL(files[i]);
|
||||
}
|
||||
this.$refs.fileInput.value = '';
|
||||
} else {
|
||||
console.log(null);
|
||||
}
|
||||
|
||||
}
|
||||
},
|
||||
|
||||
}
|
||||
</script>
|
||||
<style lang="scss"></style>
|
||||
|
||||
|
|
@ -0,0 +1,241 @@
|
|||
<template>
|
||||
<div class="plantingPlan ">
|
||||
<div class="page-content">
|
||||
<div class="table-title">
|
||||
<img src="../../assets/img/sprayInsecticide.png" alt="" />
|
||||
打药记录
|
||||
</div>
|
||||
<div class="flex-view">
|
||||
<div class="vrcode-btn save-btn" @click="addModel = true">
|
||||
<img src="../../assets/img/add.png" alt="">新增打药信息
|
||||
</div>
|
||||
</div>
|
||||
<div class="vrcode-table">
|
||||
<div class="vrcode-table-view table-view">
|
||||
<el-table :data="tableData" :row-class-name="tableRowClassName" height="520" style="width: 100%">
|
||||
<el-table-column prop="id" label="ID"></el-table-column>
|
||||
<el-table-column prop="data0" label="种植计划"></el-table-column>
|
||||
<el-table-column prop="data1" label="操作类型"></el-table-column>
|
||||
<el-table-column prop="data3" label="放置位置"></el-table-column>
|
||||
<el-table-column prop="data2" label="操作员"></el-table-column>
|
||||
|
||||
<el-table-column prop="data4" show-overflow-tooltip label="操作时间"></el-table-column>
|
||||
<el-table-column prop="data5" label="是否公开">
|
||||
<template slot-scope="scope">
|
||||
<div class="table-flex">
|
||||
<div class="isOpen" :class="scope.row.data5 ? 'open-green' : 'open-red'">
|
||||
{{ scope.row.data5 ? '已公开' : '未公开' }}
|
||||
</div>
|
||||
</div>
|
||||
</template>
|
||||
</el-table-column>
|
||||
<el-table-column label="操作" width="200">
|
||||
<template slot-scope="scope">
|
||||
|
||||
<div class="vrcode-table-btn">
|
||||
<div class="vrcode-btn blue-btn" @click="addModel = true">
|
||||
编辑
|
||||
</div>
|
||||
<div class="vrcode-btn red-btn">
|
||||
删除
|
||||
</div>
|
||||
</div>
|
||||
</template>
|
||||
</el-table-column>
|
||||
</el-table>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
|
||||
<el-dialog title="提示" top="5vh" :visible.sync="addModel" width="740px" class="vrcode-model" :append-to-body="true">
|
||||
<div class="vrcode-model-title">
|
||||
新增打药信息
|
||||
</div>
|
||||
<div class="vrcode-content">
|
||||
<div class="vrcode-view">
|
||||
<div class="vrcode-input-sel">
|
||||
<div class="title">种植计划</div>
|
||||
<el-dropdown @command="handleCommand">
|
||||
<div class="el-dropdown-link">
|
||||
<input v-model="TypeSel" type="text" class="input-input" placeholder="请选择种植计划">
|
||||
<div class="arrow"><img src="../../assets/image/arrow.png" alt=""></div>
|
||||
</div>
|
||||
<el-dropdown-menu slot="dropdown">
|
||||
<el-dropdown-item v-for="item, index in typeSelList" :key="index" :command="index">{{
|
||||
item.name
|
||||
}}</el-dropdown-item>
|
||||
|
||||
</el-dropdown-menu>
|
||||
</el-dropdown>
|
||||
</div>
|
||||
<div class="vrcode-input-sel">
|
||||
<div class="title">操作类型</div>
|
||||
<el-dropdown @command="handleCommand">
|
||||
<div class="el-dropdown-link">
|
||||
<input v-model="TypeSel" type="text" class="input-input" placeholder="请选择操作类型">
|
||||
<div class="arrow"><img src="../../assets/image/arrow.png" alt=""></div>
|
||||
</div>
|
||||
<el-dropdown-menu slot="dropdown">
|
||||
<el-dropdown-item v-for="item, index in typeSelList" :key="index" :command="index">{{
|
||||
item.name
|
||||
}}</el-dropdown-item>
|
||||
|
||||
</el-dropdown-menu>
|
||||
</el-dropdown>
|
||||
</div>
|
||||
<div class="vrcode-input">
|
||||
<div class="input-title">放置位置</div>
|
||||
<input type="text" placeholder="请输入放置位置">
|
||||
</div>
|
||||
<div class="vrcode-input-seltime">
|
||||
<div class="title">开始时间</div>
|
||||
<div class="seltime">
|
||||
<el-date-picker v-model="value1" type="date" placeholder="请选择开始时间">
|
||||
</el-date-picker>
|
||||
<div class="seltime-icon">
|
||||
<img src="../../assets/img/vrcode-time.png" alt="">
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
<div class="vrcode-input-seltime">
|
||||
<div class="title">结束时间</div>
|
||||
<div class="seltime">
|
||||
<el-date-picker v-model="value1" type="date" placeholder="请选择结束时间">
|
||||
</el-date-picker>
|
||||
<div class="seltime-icon">
|
||||
<img src="../../assets/img/vrcode-time.png" alt="">
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
<div class="vrcode-input-sel">
|
||||
<div class="title">操作员</div>
|
||||
<el-dropdown @command="handleCommand">
|
||||
<div class="el-dropdown-link">
|
||||
<input v-model="TypeSel" type="text" class="input-input" placeholder="请选择操作员">
|
||||
<div class="arrow"><img src="../../assets/image/arrow.png" alt=""></div>
|
||||
</div>
|
||||
<el-dropdown-menu slot="dropdown">
|
||||
<el-dropdown-item v-for="item, index in typeSelList" :key="index" :command="index">{{
|
||||
item.name
|
||||
}}</el-dropdown-item>
|
||||
|
||||
</el-dropdown-menu>
|
||||
</el-dropdown>
|
||||
</div>
|
||||
<div class="vrcode-textarea">
|
||||
<div class="title">备注</div>
|
||||
<textarea placeholder="输入您的备注信息" name="" id="" cols="30" rows="10"></textarea>
|
||||
</div>
|
||||
<div class="vrcode-selimage">
|
||||
<div class="title">工作图片</div>
|
||||
<div class="sel-image-view">
|
||||
<div class="sel-img sel-div" v-for="item, index in imgList" :key="index">
|
||||
<el-image :src="item"></el-image>
|
||||
<div class="del-img" @click="delImage(index)">
|
||||
<img src="../../assets/img/del-image.png" alt="">
|
||||
</div>
|
||||
</div>
|
||||
<label for="sel-img">
|
||||
<div class="sel-image-sel sel-div" v-if="imgList.length < 6">
|
||||
<img src="../../assets/img/add-image.png" alt="">
|
||||
</div>
|
||||
</label>
|
||||
<input ref="fileInput" type="file" multiple id="sel-img" accept="image/*"
|
||||
@change="handleImageChange" />
|
||||
</div>
|
||||
</div>
|
||||
<div class="vrcode-radio">
|
||||
<div class="radio-name">是否追溯</div>
|
||||
<div class="radio-sel">
|
||||
<img v-if="modelisTrue" class="sel" src="../../assets/image/radio.png" alt="">
|
||||
<div v-else @click="modelisTrue=true" class="no-sel"></div>
|
||||
<span>是</span>
|
||||
</div>
|
||||
<div class="radio-sel">
|
||||
<img v-if="!modelisTrue" class="sel" src="../../assets/image/radio.png" alt="">
|
||||
<div v-else @click="modelisTrue=false" class="no-sel"></div>
|
||||
<span>否</span>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
<span slot="footer" class="dialog-footer">
|
||||
<div class="vrcode-btn save-btn" @click="addModel = false">保存</div>
|
||||
<div class="vrcode-btn cancle-btn" @click="addModel = false">取消</div>
|
||||
</span>
|
||||
</el-dialog>
|
||||
|
||||
</div>
|
||||
</template>
|
||||
<script>
|
||||
export default {
|
||||
data() {
|
||||
return {
|
||||
edit: false,
|
||||
addModel: false,
|
||||
tableData: [{
|
||||
id: '13', data0: '西红柿种植',
|
||||
data1: '施肥',
|
||||
data2: '刘永强',
|
||||
data3: '',
|
||||
data4: '2023-04-05 21:00',
|
||||
data5: true,
|
||||
}, {}, {}, {}, {}, {}, {}, {},],
|
||||
typeSelList: [{ name: '1#平均空气温度', value: 1, },
|
||||
{ name: '2#平均空气温度', value: 2, },
|
||||
{ name: '1#空气温度', value: 3, },
|
||||
{ name: '2#空气温度', value: 4, },
|
||||
{ name: '3#空气温度', value: 5, },
|
||||
{ name: '4#空气温度', value: 6, },
|
||||
{ name: '5#空气温度', value: 7, },
|
||||
{ name: '6#空气温度', value: 8, },
|
||||
{ name: '7#空气温度', value: 9, },
|
||||
{ name: '8#空气温度', value: 10, },],
|
||||
TypeSel: '',
|
||||
value1: '',
|
||||
modelisTrue:false,
|
||||
imgList: ['https://fuss10.elemecdn.com/e/5d/4a731a90594a4af544c0c25941171jpeg.jpeg']
|
||||
}
|
||||
},
|
||||
mounted() { },
|
||||
methods: {
|
||||
handleCommand() {
|
||||
|
||||
},
|
||||
tableRowClassName({ row, rowIndex }) {
|
||||
if (rowIndex % 2 == 1) {
|
||||
return 'warning-row';
|
||||
} else if (rowIndex % 2 == 0) {
|
||||
return 'success-row';
|
||||
}
|
||||
return '';
|
||||
},
|
||||
delImage(index) {
|
||||
console.log('删除图片', index);
|
||||
this.imgList.splice(index, 1);
|
||||
},
|
||||
handleImageChange(event) {
|
||||
const files = event.target.files;
|
||||
if (files.length > 0) {
|
||||
for (let i = 0; i < files.length; i++) {
|
||||
const reader = new FileReader();
|
||||
|
||||
reader.onload = (e) => {
|
||||
this.imgList.push(e.target.result);
|
||||
};
|
||||
|
||||
reader.readAsDataURL(files[i]);
|
||||
}
|
||||
this.$refs.fileInput.value = '';
|
||||
} else {
|
||||
console.log(null);
|
||||
}
|
||||
|
||||
}
|
||||
},
|
||||
|
||||
}
|
||||
</script>
|
||||
<style lang="scss"></style>
|
||||
|
||||
|
|
@ -0,0 +1,241 @@
|
|||
<template>
|
||||
<div class="plantingPlan ">
|
||||
<div class="page-content">
|
||||
<div class="table-title">
|
||||
<img src="../../assets/img/spreadManure.png" alt="" />
|
||||
施肥记录
|
||||
</div>
|
||||
<div class="flex-view">
|
||||
<div class="vrcode-btn save-btn" @click="addModel = true">
|
||||
<img src="../../assets/img/add.png" alt="">新增施肥信息
|
||||
</div>
|
||||
</div>
|
||||
<div class="vrcode-table">
|
||||
<div class="vrcode-table-view table-view">
|
||||
<el-table :data="tableData" :row-class-name="tableRowClassName" height="520" style="width: 100%">
|
||||
<el-table-column prop="id" label="ID"></el-table-column>
|
||||
<el-table-column prop="data0" label="种植计划"></el-table-column>
|
||||
<el-table-column prop="data1" label="操作类型"></el-table-column>
|
||||
<el-table-column prop="data3" label="放置位置"></el-table-column>
|
||||
<el-table-column prop="data2" label="操作员"></el-table-column>
|
||||
|
||||
<el-table-column prop="data4" show-overflow-tooltip label="操作时间"></el-table-column>
|
||||
<el-table-column prop="data5" label="是否公开">
|
||||
<template slot-scope="scope">
|
||||
<div class="table-flex">
|
||||
<div class="isOpen" :class="scope.row.data5 ? 'open-green' : 'open-red'">
|
||||
{{ scope.row.data5 ? '已公开' : '未公开' }}
|
||||
</div>
|
||||
</div>
|
||||
</template>
|
||||
</el-table-column>
|
||||
<el-table-column label="操作" width="200">
|
||||
<template slot-scope="scope">
|
||||
|
||||
<div class="vrcode-table-btn">
|
||||
<div class="vrcode-btn blue-btn" @click="addModel = true">
|
||||
编辑
|
||||
</div>
|
||||
<div class="vrcode-btn red-btn">
|
||||
删除
|
||||
</div>
|
||||
</div>
|
||||
</template>
|
||||
</el-table-column>
|
||||
</el-table>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
|
||||
<el-dialog title="提示" top="5vh" :visible.sync="addModel" width="740px" class="vrcode-model" :append-to-body="true">
|
||||
<div class="vrcode-model-title">
|
||||
新增施肥信息
|
||||
</div>
|
||||
<div class="vrcode-content">
|
||||
<div class="vrcode-view">
|
||||
<div class="vrcode-input-sel">
|
||||
<div class="title">种植计划</div>
|
||||
<el-dropdown @command="handleCommand">
|
||||
<div class="el-dropdown-link">
|
||||
<input v-model="TypeSel" type="text" class="input-input" placeholder="请选择种植计划">
|
||||
<div class="arrow"><img src="../../assets/image/arrow.png" alt=""></div>
|
||||
</div>
|
||||
<el-dropdown-menu slot="dropdown">
|
||||
<el-dropdown-item v-for="item, index in typeSelList" :key="index" :command="index">{{
|
||||
item.name
|
||||
}}</el-dropdown-item>
|
||||
|
||||
</el-dropdown-menu>
|
||||
</el-dropdown>
|
||||
</div>
|
||||
<div class="vrcode-input-sel">
|
||||
<div class="title">操作类型</div>
|
||||
<el-dropdown @command="handleCommand">
|
||||
<div class="el-dropdown-link">
|
||||
<input v-model="TypeSel" type="text" class="input-input" placeholder="请选择操作类型">
|
||||
<div class="arrow"><img src="../../assets/image/arrow.png" alt=""></div>
|
||||
</div>
|
||||
<el-dropdown-menu slot="dropdown">
|
||||
<el-dropdown-item v-for="item, index in typeSelList" :key="index" :command="index">{{
|
||||
item.name
|
||||
}}</el-dropdown-item>
|
||||
|
||||
</el-dropdown-menu>
|
||||
</el-dropdown>
|
||||
</div>
|
||||
<div class="vrcode-input">
|
||||
<div class="input-title">放置位置</div>
|
||||
<input type="text" placeholder="请输入放置位置">
|
||||
</div>
|
||||
<div class="vrcode-input-seltime">
|
||||
<div class="title">开始时间</div>
|
||||
<div class="seltime">
|
||||
<el-date-picker v-model="value1" type="date" placeholder="请选择开始时间">
|
||||
</el-date-picker>
|
||||
<div class="seltime-icon">
|
||||
<img src="../../assets/img/vrcode-time.png" alt="">
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
<div class="vrcode-input-seltime">
|
||||
<div class="title">结束时间</div>
|
||||
<div class="seltime">
|
||||
<el-date-picker v-model="value1" type="date" placeholder="请选择结束时间">
|
||||
</el-date-picker>
|
||||
<div class="seltime-icon">
|
||||
<img src="../../assets/img/vrcode-time.png" alt="">
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
<div class="vrcode-input-sel">
|
||||
<div class="title">操作员</div>
|
||||
<el-dropdown @command="handleCommand">
|
||||
<div class="el-dropdown-link">
|
||||
<input v-model="TypeSel" type="text" class="input-input" placeholder="请选择操作员">
|
||||
<div class="arrow"><img src="../../assets/image/arrow.png" alt=""></div>
|
||||
</div>
|
||||
<el-dropdown-menu slot="dropdown">
|
||||
<el-dropdown-item v-for="item, index in typeSelList" :key="index" :command="index">{{
|
||||
item.name
|
||||
}}</el-dropdown-item>
|
||||
|
||||
</el-dropdown-menu>
|
||||
</el-dropdown>
|
||||
</div>
|
||||
<div class="vrcode-textarea">
|
||||
<div class="title">备注</div>
|
||||
<textarea placeholder="输入您的备注信息" name="" id="" cols="30" rows="10"></textarea>
|
||||
</div>
|
||||
<div class="vrcode-selimage">
|
||||
<div class="title">工作图片</div>
|
||||
<div class="sel-image-view">
|
||||
<div class="sel-img sel-div" v-for="item, index in imgList" :key="index">
|
||||
<el-image :src="item"></el-image>
|
||||
<div class="del-img" @click="delImage(index)">
|
||||
<img src="../../assets/img/del-image.png" alt="">
|
||||
</div>
|
||||
</div>
|
||||
<label for="sel-img">
|
||||
<div class="sel-image-sel sel-div" v-if="imgList.length < 6">
|
||||
<img src="../../assets/img/add-image.png" alt="">
|
||||
</div>
|
||||
</label>
|
||||
<input ref="fileInput" type="file" multiple id="sel-img" accept="image/*"
|
||||
@change="handleImageChange" />
|
||||
</div>
|
||||
</div>
|
||||
<div class="vrcode-radio">
|
||||
<div class="radio-name">是否追溯</div>
|
||||
<div class="radio-sel">
|
||||
<img v-if="modelisTrue" class="sel" src="../../assets/image/radio.png" alt="">
|
||||
<div v-else @click="modelisTrue=true" class="no-sel"></div>
|
||||
<span>是</span>
|
||||
</div>
|
||||
<div class="radio-sel">
|
||||
<img v-if="!modelisTrue" class="sel" src="../../assets/image/radio.png" alt="">
|
||||
<div v-else @click="modelisTrue=false" class="no-sel"></div>
|
||||
<span>否</span>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
<span slot="footer" class="dialog-footer">
|
||||
<div class="vrcode-btn save-btn" @click="addModel = false">保存</div>
|
||||
<div class="vrcode-btn cancle-btn" @click="addModel = false">取消</div>
|
||||
</span>
|
||||
</el-dialog>
|
||||
|
||||
</div>
|
||||
</template>
|
||||
<script>
|
||||
export default {
|
||||
data() {
|
||||
return {
|
||||
edit: false,
|
||||
addModel: false,
|
||||
tableData: [{
|
||||
id: '13', data0: '西红柿种植',
|
||||
data1: '施肥',
|
||||
data2: '刘永强',
|
||||
data3: '',
|
||||
data4: '2023-04-05 21:00',
|
||||
data5: true,
|
||||
}, {}, {}, {}, {}, {}, {}, {},],
|
||||
typeSelList: [{ name: '1#平均空气温度', value: 1, },
|
||||
{ name: '2#平均空气温度', value: 2, },
|
||||
{ name: '1#空气温度', value: 3, },
|
||||
{ name: '2#空气温度', value: 4, },
|
||||
{ name: '3#空气温度', value: 5, },
|
||||
{ name: '4#空气温度', value: 6, },
|
||||
{ name: '5#空气温度', value: 7, },
|
||||
{ name: '6#空气温度', value: 8, },
|
||||
{ name: '7#空气温度', value: 9, },
|
||||
{ name: '8#空气温度', value: 10, },],
|
||||
TypeSel: '',
|
||||
value1: '',
|
||||
modelisTrue:false,
|
||||
imgList: ['https://fuss10.elemecdn.com/e/5d/4a731a90594a4af544c0c25941171jpeg.jpeg']
|
||||
}
|
||||
},
|
||||
mounted() { },
|
||||
methods: {
|
||||
handleCommand() {
|
||||
|
||||
},
|
||||
tableRowClassName({ row, rowIndex }) {
|
||||
if (rowIndex % 2 == 1) {
|
||||
return 'warning-row';
|
||||
} else if (rowIndex % 2 == 0) {
|
||||
return 'success-row';
|
||||
}
|
||||
return '';
|
||||
},
|
||||
delImage(index) {
|
||||
console.log('删除图片', index);
|
||||
this.imgList.splice(index, 1);
|
||||
},
|
||||
handleImageChange(event) {
|
||||
const files = event.target.files;
|
||||
if (files.length > 0) {
|
||||
for (let i = 0; i < files.length; i++) {
|
||||
const reader = new FileReader();
|
||||
|
||||
reader.onload = (e) => {
|
||||
this.imgList.push(e.target.result);
|
||||
};
|
||||
|
||||
reader.readAsDataURL(files[i]);
|
||||
}
|
||||
this.$refs.fileInput.value = '';
|
||||
} else {
|
||||
console.log(null);
|
||||
}
|
||||
|
||||
}
|
||||
},
|
||||
|
||||
}
|
||||
</script>
|
||||
<style lang="scss"></style>
|
||||
|
||||
|
Loading…
Reference in New Issue