提交代码

This commit is contained in:
xiaokangsix 2024-04-28 18:40:19 +08:00
parent 4be83b1e4f
commit db33c140e8
7 changed files with 596 additions and 59 deletions

View File

@ -38,8 +38,8 @@ if (process.env.NODE_ENV === 'development') {
// Vue.prototype.url_config = 'http://47.93.215.234:9809/' // 线上地址
// Vue.prototype.url_config = 'http://182.90.224.237:51234/' //雄哥内网穿透地址
// Vue.prototype.url_config = 'http://jxj.zhgdyun.com:61212/' //杰哥内网穿透地址
Vue.prototype.url_config = 'http://192.168.34.221:9111/' //郭圣雄本地
// Vue.prototype.url_config = 'http://192.168.34.155:19111/' //
// Vue.prototype.url_config = 'http://192.168.34.221:9111/' //郭圣雄本地
Vue.prototype.url_config = 'http://192.168.34.155:19111/' //
// Vue.prototype.work_url = 'http://47.93.215.234:19997' // 工作流线上地址
Vue.prototype.work_url = 'http://192.168.34.138:5173' // 工作流地址
// Vue.prototype.url_config = 'http://8.142.139.165:7080/' // 湖里

View File

@ -1447,6 +1447,24 @@
}
}
,{
"path" : "pages/projectEnd/dangerBigProject/backlogList",
"style" :
{
"navigationBarTitleText": "",
"enablePullDownRefresh": false
}
}
,{
"path" : "pages/projectEnd/dangerBigProject/backlogTrial/backlogTrial",
"style" :
{
"navigationBarTitleText": "",
"enablePullDownRefresh": false
}
}
],
// "subPackages":[{
// "root": "carManage",

View File

@ -148,7 +148,7 @@
data.imageUrl = arr.join(',')
if(data.sideStationAddr == ""){
uni.showToast({
title: '请输入验收部',
title: '请输入验收部',
icon: "none",
duration: 2000
});

View File

@ -2,71 +2,76 @@
<view class="addPlan">
<headers class="fixedheader" :themeType="true" :showBack="true">
<view class="headerName">
下发验收任务
{{title}}
</view>
</headers>
<!-- <view :style="{ 'padding-top': statusBarHeight + 45 + 'px' }">
<view :style="{ 'padding-top': statusBarHeight + 45 + 'px' }">
<view class="plan-form">
<view class="form-item b-bottom">
<view class="form-lable"><text class="tag">*</text>验收部位</view>
<input class="from-input" type="text" :value="formData.sideStationAddr" @blur="bindInputBlur" placeholder="请输入验收部位" />
<view class="form-lable"><text class="tag">*</text>验收单位</view>
<picker @change="bindPickerChange" :value="typeIndex" range-key="name" :range="typeList">
<view style="display: flex;align-items: center;">
<view class="uni-input" style="margin-right: 10px;">{{typeList[typeIndex] ? typeList[typeIndex].name : ""}}</view>
<uni-icons2 type="arrowright" size="20"></uni-icons2>
</view>
</picker>
</view>
<view class="form-item f-column b-bottom">
<view class="form-lable">施工情况</view>
<textarea class="form-textarea" @input="bindLength" @blur="bindTextAreaBlur" maxlength="50" :value="formData.buildSituation" placeholder="请输入施工情况" />
<view class="txt-length">{{textareaLengh}}/50</view>
<view class="form-item b-bottom">
<view class="form-lable"><text class="tag">*</text>验收人</view>
<picker @change="bindPickerChange" :value="typeIndex" range-key="name" :range="typeList">
<view style="display: flex;align-items: center;">
<view class="uni-input" style="margin-right: 10px;">{{typeList[typeIndex] ? typeList[typeIndex].name : ""}}</view>
<uni-icons2 type="arrowright" size="20"></uni-icons2>
</view>
</picker>
</view>
<view class="form-item b-bottom">
<view class="form-lable"><text class="tag">*</text>验收时间</view>
<dateTimePicker :placeholder="'请选择验收时间'" :disabled="isDisabled"
:start="startTime" :fields="'minute'" :default-value="inspectTime"
@change="bindPickerChange($event,'startTime')"
class="form-content">
<view class="uni-input">
<!-- <text>{{addForm.inspectTime}}</text> -->
<uni-icons v-if="!isDisabled" type="arrowright" color="#6C7178" />
</view>
</dateTimePicker>
</view>
<view class="form-item f-column">
<view class="form-lable">现场照片</view>
<view class="uni-form-input imgBox_wrap">
<view class="addImgBox" @click="uploadImg" v-show="formData.imgFileList.length == 0">
<image src="/static/safeMange/upload_image.png" class="icon-add" color="#F56C6C"></image>
</view>
<view class="imgBox" v-show="formData.imgFileList.length>0" v-for="(item,index) in formData.imgFileList" :key="index">
<image :src="url_config+'image/'+item.url" class="img"
@click="previewImage(url_config+'image/'+item.url)"></image>
<view @click="deleteImg(item,1)" class="deleteImg">
<image src="/static/safeMange/close_icon.png"></image>
</view>
</view>
</view> -->
<view class="uni-form-item b-bottom">
<view class="uni-form-label">
星期几
</view>
<view class="uni-form-input">
<picker @change="bindPickerChange" :value="selectIndex" :range="colorList">
<view class="uni-input uni-select cl" v-if="selectIndex==null">
请选择 <image class="icon-down" src="/static/icon-down-black.png" mode=""></image>
</view>
<view class="uni-input uni-select" v-else>{{colorList[selectIndex]}}
<image class="icon-down" src="/static/icon-down-black.png" mode=""></image>
</view>
</picker>
</view>
</view>
<!-- </view> -->
<!--
</view>
</view> -->
</view>
<view class="save-btn" @click="saveForm">保存</view>
</view>
</template>
<script>
import dateTimePicker from '@/components/dateTimePicker/index.vue'
import { computed } from "vue";
export default {
components:{
dateTimePicker
},
data(){
return{
statusBarHeight: 0,
title: "新增旁站记录",
title: "下发验证任务",
inspectTime:'',
formData:{
sideStationAddr: "",
buildSituation: "",
acceptanceRegion: "",
acceptanceDescribe: "",
imgFileList:[],
acceptanceResult: 1,
acceptanceType: "",
dangerousEngineeringId: ""
},
textareaLengh: 0,
typeIndex: "",
typeList:[{
id: 1,
name: '施工条件验收'
},{
id: 2,
name: '危大工程验收'
}]
}
},
onShow(){
@ -76,13 +81,16 @@
this.formData.dangerousEngineeringId = val.id
},
methods:{
checkRadio(val){
this.formData.acceptanceResult = val
},
bindTextAreaBlur(e){
console.log(e)
this.formData.buildSituation = e.detail.value
this.formData.acceptanceDescribe = e.detail.value
},
bindInputBlur(e){
console.log(e)
this.formData.sideStationAddr = e.detail.value
this.formData.acceptanceRegion = e.detail.value
},
uploadImg() {
var that = this
@ -150,19 +158,29 @@
this.textareaLengh = e.detail.value.split('').length
},
saveForm(){
console.log(this.formData)
// console.log(this.formData)
let data = {
sideStationAddr: this.formData.sideStationAddr,
buildSituation: this.formData.buildSituation,
dangerousEngineeringId: this.formData.dangerousEngineeringId,
createUser: JSON.parse(uni.getStorageSync('userInfo')).userId,
acceptanceDescribe: this.formData.acceptanceDescribe,
acceptanceRegion: this.formData.acceptanceRegion,
acceptanceResult: this.formData.acceptanceResult,
acceptanceType: this.formData.acceptanceType,
dangerousEngineeringId: this.formData.dangerousEngineeringId
}
data.createUser = JSON.parse(uni.getStorageSync('userInfo')).userId;
let arr = []
this.formData.imgFileList.forEach(item=>{
arr.push(item.url)
})
data.imageUrl = arr.join(',')
if(data.sideStationAddr == ""){
if(data.acceptanceType == ""){
uni.showToast({
title: '请选择验收类型!',
icon: "none",
duration: 2000
});
return;
}
if(data.acceptanceRegion == ""){
uni.showToast({
title: '请输入验收部位!',
icon: "none",
@ -172,7 +190,7 @@
}
console.log(data)
this.sendRequest({
url:'xmgl/dangerousEngineeringSideStation/add',
url:'xmgl/dangerousEngineeringAcceptanceCheck/add',
method:'post',
data: data,
success:res=>{
@ -186,6 +204,10 @@
console.log(res)
}
})
},
bindPickerChange(e){
this.typeIndex = e.target.value
this.formData.acceptanceType = this.typeList[e.target.value].id
}
}
}
@ -280,6 +302,7 @@
padding: 28rpx 24rpx;
display: flex;
justify-content: space-between;
align-items: center;
background: #fff;
.form-lable{
white-space: nowrap;
@ -290,6 +313,28 @@
.from-input{
text-align: right;
}
.form-result{
.form-radio{
display: flex;
margin-left: 30rpx;
border: 1px solid #E5E5E5;
padding: 0;
border-radius: 12rpx;
overflow: hidden;
li{
list-style: none;
font-size: 14px;
background: #EEEEEE;
text-align: center;
width: 156rpx;
padding: 12rpx 0;
}
.active-radio{
background: #2b8df3;
color: #fff;
}
}
}
}
.txt-length{
color: #888;
@ -317,6 +362,9 @@
}
}
}
.a-none{
align-items: initial;
}
}
}
</style>

View File

@ -0,0 +1,74 @@
<template>
<view class="addPlanss">
<headers class="fixedheader" :themeType="true" :showBack="true">
<view class="headerName">
{{title}}
</view>
</headers>
<view class="backlogList-admin" @click="jobTrial">
<view class="backlogList backlogMargin">
<span>
危大工程名称ssss
</span>
<span class="backlogList-span">待确认</span>
</view>
<view class="backlogMargin">
计划执行时间ssss
</view>
<view class="backlogMargin">
申请验收单位ssss
</view>
<view class="backlogMargin">
申请验收人ssss
</view>
</view>
</view>
</template>
<script>
export default {
data() {
return {
title: "查看待办",
};
},
methods:{
jobTrial(){
console.log('sssssss');
uni.navigateTo({
url:'./backlogTrial/backlogTrial'
})
}
}
}
</script>
<style lang="scss">
.addPlanss {
height: 100%;
background-color: #f6f6f6;
}
.backlogList-admin {
margin: 10px;
background-color: #fff;
height: 160px;
padding: 15px;
.backlogList {
display: flex;
justify-content: space-between;
align-items: center;
.backlogList-span{
padding: 3px 5px;
border: 1px solid #ccc;
color: #d17b00;
border-radius: 3px;
}
}
}
.backlogMargin{
margin-bottom: 15px;
}
</style>

View File

@ -0,0 +1,394 @@
<template>
<view class="addPlan">
<headers class="fixedheader" :themeType="true" :showBack="true">
<view class="headerName">
{{title}}
</view>
</headers>
<view :style="{ 'padding-top': statusBarHeight + 45 + 'px' }">
<view class="plan-form">
<view style="background-color: #fff;border-bottom: 10px solid #068de8;padding:10px 10px 15px 10px">
<view class="backlogMargin">危大工程名称 </view>
<view class="backlogMargin">计划执行时间 </view>
<view class="backlogMargin">申请验收单位 </view>
<view class="backlogMargin">申请验收人 </view>
</view>
<view class="form-item b-bottom" style="justify-content: flex-start;">
<view class="form-lable"><text class="tag">*</text>验收结果</view>
<view class="form-result">
<ul class="form-radio">
<li :class="{'active-radio': formData.acceptanceResult == 1}" @click="checkRadio(1)">合格</li>
<li :class="{'active-radio': formData.acceptanceResult == 2}" @click="checkRadio(2)">不合格
</li>
</ul>
</view>
</view>
<view class="form-item f-column b-bottom a-none">
<view class="form-lable">验收描述</view>
<textarea class="form-textarea" @input="bindLength" @blur="bindTextAreaBlur" maxlength="50"
:value="formData.acceptanceDescribe" placeholder="请输入验收描述" />
<view class="txt-length">{{textareaLengh}}/50</view>
</view>
<view class="form-item f-column a-none">
<view class="form-lable">现场照片</view>
<view class="uni-form-input imgBox_wrap">
<view class="addImgBox" @click="uploadImg" v-show="formData.imgFileList.length == 0">
<image src="/static/safeMange/upload_image.png" class="icon-add" color="#F56C6C"></image>
</view>
<view class="imgBox" v-show="formData.imgFileList.length>0"
v-for="(item,index) in formData.imgFileList" :key="index">
<image :src="url_config+'image/'+item.url" class="img"
@click="previewImage(url_config+'image/'+item.url)"></image>
<view @click="deleteImg(item,1)" class="deleteImg">
<image src="/static/safeMange/close_icon.png"></image>
</view>
</view>
</view>
</view>
</view>
</view>
<view class="save-btn" @click="saveForm"> </view>
<u-popup :show="isPopupVisible" @close="closePopup" @open="isPopupVisible = true" z-index="9999">
<view class="slot-content">
<!-- 弹窗内容 -->
这里是弹窗的内容
<u-button @click="closePopup">关闭弹窗</u-button>
</view>
</u-popup>
</view>
</template>
<script>
export default {
data() {
return {
statusBarHeight: 0,
isPopupVisible: false,
title: "新增验收记录",
formData: {
acceptanceRegion: "",
acceptanceDescribe: "",
imgFileList: [],
acceptanceResult: 1,
acceptanceType: "",
dangerousEngineeringId: ""
},
textareaLengh: 0,
typeIndex: "",
typeList: [{
id: 1,
name: '施工条件验收'
}, {
id: 2,
name: '危大工程验收'
}]
}
},
onShow() {
this.statusBarHeight = uni.getStorageSync('systemInfo').statusBarHeight;
},
onLoad(val) {
this.formData.dangerousEngineeringId = val.id
},
methods: {
checkRadio(val) {
this.formData.acceptanceResult = val
},
bindTextAreaBlur(e) {
console.log(e)
this.formData.acceptanceDescribe = e.detail.value
},
bindInputBlur(e) {
console.log(e)
this.formData.acceptanceRegion = e.detail.value
},
uploadImg() {
var that = this
uni.chooseImage({
count: 5 - that.formData.imgFileList.length,
success(res) {
const tempFilePaths = res.tempFilePaths;
uni.uploadFile({
url: that.url_config + 'upload/image', //
filePath: tempFilePaths[0],
name: 'files',
success: (uploadFileRes) => {
let data = {
name: JSON.parse(uploadFileRes.data).data[0].filename,
url: JSON.parse(uploadFileRes.data).data[0].imageUrl
};
that.formData.imgFileList.push(data)
}
});
}
})
},
//
deleteImg(val, type) {
let that = this;
uni.showModal({
title: '提示',
content: '确定删除该附件吗?',
success: function(res) {
if (res.confirm) {
if (type == 1) {
let fileArr = JSON.parse(JSON.stringify(that.formData.imgFileList));
fileArr.forEach((item, index) => {
if (item.url == val.url) {
fileArr.splice(index, 1)
}
})
that.formData.imgFileList = fileArr;
} else if (type == 2) {
let fileArr = JSON.parse(JSON.stringify(that.videoFileList));
fileArr.forEach((item, index) => {
if (item.url == val.url) {
fileArr.splice(index, 1)
}
})
that.videoFileList = fileArr;
}
} else if (res.cancel) {
console.log('用户点击取消');
}
}
});
},
//
previewImage(url) {
uni.previewImage({
urls: [url]
})
},
bindLength(e) {
// console.log(e)
this.textareaLengh = e.detail.value.split('').length
},
saveForm() {
// console.log(this.formData)
this.isPopupVisible = true
// let data = {
// acceptanceDescribe: this.formData.acceptanceDescribe,
// acceptanceRegion: this.formData.acceptanceRegion,
// acceptanceResult: this.formData.acceptanceResult,
// acceptanceType: this.formData.acceptanceType,
// dangerousEngineeringId: this.formData.dangerousEngineeringId
// }
// data.createUser = JSON.parse(uni.getStorageSync('userInfo')).userId;
// let arr = []
// this.formData.imgFileList.forEach(item=>{
// arr.push(item.url)
// })
// data.imageUrl = arr.join(',')
// console.log(data)
// this.sendRequest({
// url:'xmgl/dangerousEngineeringAcceptanceCheck/add',
// method:'post',
// data: data,
// success:res=>{
// uni.hideLoading()
// if(res.code==200){
// uni.showToast({
// title:''
// })
// uni.navigateBack({})
// }
// console.log(res)
// }
// })
},
bindPickerChange(e) {
this.typeIndex = e.target.value
this.formData.acceptanceType = this.typeList[e.target.value].id
},
closePopup() {
this.isPopupVisible = false
}
}
}
</script>
<style lang="scss" scoped>
.addPlan {
min-height: 100%;
background: #F6F6F6;
.fixedheader {
position: fixed;
top: 0;
left: 0;
width: 100%;
z-index: 2;
}
.save-btn {
position: fixed;
bottom: 0;
left: 0;
width: 100%;
height: 96rpx;
background: #2b8df3;
color: #fff;
text-align: center;
line-height: 96rpx;
}
.imgBox_wrap {
display: flex;
flex-wrap: wrap;
margin-top: 20rpx;
width: 100%;
min-height: 120rpx;
}
.imgBox {
width: 120rpx;
height: 120rpx;
display: inline-flex;
position: relative;
margin-right: 30rpx;
margin-bottom: 16rpx;
.img {
width: 100%;
height: 100%;
border-radius: 12rpx;
}
.deleteImg {
position: absolute;
right: -12rpx;
top: -18rpx;
uni-image {
width: 20rpx;
height: 20rpx;
}
}
}
.addImgBox {
border: 1px solid rgba(42, 43, 91, 0.1);
background-color: #f6f5f8;
width: 120rpx;
height: 120rpx;
display: inline-flex;
align-items: center;
justify-content: center;
border-radius: 20rpx;
font-size: 24rpx;
margin-right: 12rpx;
uni-image {
width: 100%;
height: 100%;
}
// .icon-add {
// width: 36rpx;
// height: 36rpx;
// }
}
.b-bottom {
border-bottom: 1px solid #F6F6F6;
}
.f-column {
flex-direction: column;
}
.plan-form {
padding-top: 20rpx;
padding-bottom: 96rpx;
.form-item {
padding: 28rpx 24rpx;
display: flex;
justify-content: space-between;
align-items: center;
background: #fff;
.form-lable {
white-space: nowrap;
.tag {
color: #DD524D;
}
}
.from-input {
text-align: right;
}
.form-result {
.form-radio {
display: flex;
margin-left: 30rpx;
border: 1px solid #E5E5E5;
padding: 0;
border-radius: 12rpx;
overflow: hidden;
li {
list-style: none;
font-size: 14px;
background: #EEEEEE;
text-align: center;
width: 156rpx;
padding: 12rpx 0;
}
.active-radio {
background: #2b8df3;
color: #fff;
}
}
}
}
.txt-length {
color: #888;
text-align: right;
margin-top: 20rpx;
font-size: 14px;
}
.form-textarea {
margin-top: 30rpx;
width: 100%;
background: #F8F8F8;
border: 1px solid #f0f0f0;
height: 160rpx;
padding: 20rpx;
box-sizing: border-box;
// overflow: auto;
/deep/uni-textarea {
width: 100%;
height: 100%;
font-size: 28rpx;
.uni-textarea-compute {
width: 100%;
height: 100%;
overflow: auto;
}
}
}
.a-none {
align-items: initial;
}
}
}
.backlogMargin {
margin-bottom: 15px;
}
</style>

View File

@ -70,10 +70,10 @@
<image class="moudle-icon" src="/static/safeMange/danger_project.png"></image>
<text>危大工程</text>
</view>
<!-- <view class="moudle-item flex" @click="jumpPage(7)" v-if="COMPANY != 'sanjiang'">
<view class="moudle-item flex" @click="jumpPage(7)" v-if="COMPANY != 'sanjiang'">
<image class="moudle-icon" src="/static/safeMange/danger_check.png"></image>
<text>危大验收</text>
</view> -->
</view>
<!-- <view class="moudle-item flex" @click="jumpPage(6)">
<image class="moudle-icon" src="/static/safeMange/enterprise_examine.png"></image>
<text>企业检查</text>
@ -131,8 +131,11 @@ export default{
url: "./dangerList?type=3"
})
} else if(val == 7){
// uni.navigateTo({
// url:'../dangerBigProject/dangerBigCheckList'
// })
uni.navigateTo({
url:'../dangerBigProject/dangerBigCheckList'
url:'../dangerBigProject/backlogList'
})
} else if(val == 8){
uni.navigateTo({