|
@@ -2,79 +2,119 @@
|
|
|
<view class="gradingControl-infoPage">
|
|
|
<view class="text-box">
|
|
|
<view>管控名称:</view>
|
|
|
- <view>{{newData.data1}}</view>
|
|
|
+ <view>{{newData.name}}</view>
|
|
|
</view>
|
|
|
<view class="text-box">
|
|
|
<view>二级单位:</view>
|
|
|
- <view>{{newData.data3}}</view>
|
|
|
+ <view>{{newData.deptName}}</view>
|
|
|
</view>
|
|
|
<view class="text-box">
|
|
|
<view>安全分类:</view>
|
|
|
- <view>{{newData.data4}}</view>
|
|
|
+ <view>{{newData.typeName}}</view>
|
|
|
</view>
|
|
|
<view class="text-box">
|
|
|
<view>安全分级:</view>
|
|
|
- <view>{{newData.data5}}</view>
|
|
|
+ <view>{{newData.levelName}}</view>
|
|
|
</view>
|
|
|
<view class="text-box">
|
|
|
<view>管控描述:</view>
|
|
|
- <view>{{newData.data2}}</view>
|
|
|
+ <view>{{newData.manageDes}}</view>
|
|
|
</view>
|
|
|
<view class="text-box">
|
|
|
<view>执行状态:</view>
|
|
|
- <view :class="newData.data6?'colorA':'colorB'">{{newData.data6?'已执行':'未执行'}}</view>
|
|
|
+ <view :class="newData.status == 1?'colorA':'colorB'">{{newData.status == 1?'已执行':'未执行'}}</view>
|
|
|
</view>
|
|
|
- <view class="text-box" v-if="newData.data6">
|
|
|
+ <view class="text-box" v-if="newData.status == 1">
|
|
|
<view>执行人:</view>
|
|
|
- <view>{{newData.data7}}</view>
|
|
|
+ <view>{{newData.executionUser}}</view>
|
|
|
</view>
|
|
|
- <view class="text-box" v-if="newData.data6">
|
|
|
+ <view class="text-box" v-if="newData.status == 1">
|
|
|
<view>执行时间:</view>
|
|
|
- <view>{{newData.data8}}</view>
|
|
|
+ <view>{{newData.executionTime}}</view>
|
|
|
</view>
|
|
|
- <view class="text-box" v-if="newData.data6">
|
|
|
+ <view class="text-box" v-if="newData.status == 1">
|
|
|
<view>执行备注:</view>
|
|
|
- <view>{{newData.data9}}</view>
|
|
|
+ <view>{{newData.remark}}</view>
|
|
|
</view>
|
|
|
- <view class="text-box" v-if="!newData.data6">
|
|
|
+ <view class="text-box" v-if="newData.status == 0">
|
|
|
<view>执行备注:</view>
|
|
|
- <textarea v-model="newData.inputData" class="input-box"
|
|
|
- placeholder="请输入执行备注" maxlength="50"></textarea>
|
|
|
+ <textarea v-model="inputData" class="input-box" placeholder="请输入执行备注" maxlength="50"></textarea>
|
|
|
</view>
|
|
|
<view class="null-p"></view>
|
|
|
- <view class="button-p" v-if="!newData.data6">完成</view>
|
|
|
+ <view class="button-p" v-if="newData.status == 0" @click="buttonClick">执行</view>
|
|
|
</view>
|
|
|
</template>
|
|
|
|
|
|
<script>
|
|
|
+ import {
|
|
|
+ parseTime
|
|
|
+ } from '@/component/public.js'
|
|
|
+ import {
|
|
|
+ laboratoryGradeManageExecute,
|
|
|
+ } from '@/pages_manage/api/index.js'
|
|
|
export default {
|
|
|
name: "gradingControl-infoPage",
|
|
|
data() {
|
|
|
return {
|
|
|
//列表数据
|
|
|
- newData: {
|
|
|
- data1: '管控名称管控名称管控名称管控名称管控名称管控名称管控名称管控名称管控名称管控名称管控名称管控名称',
|
|
|
- data2: '管控描述管控描述管控描述管控描述管控描述管控描述管控描述管控描述管控描述管控描述管控描述管控描述管控描述管控描述管控描述管控描述管控描述管控描述管控描述管控描述管控描述管控描述管控描述管控描述管控描述管控描述管控描述管控描述',
|
|
|
- data3: '二级单位',
|
|
|
- data4: '安全分类',
|
|
|
- data5: '安全分级',
|
|
|
- data6: false,
|
|
|
- data7: '执行人',
|
|
|
- data8: '执行时间',
|
|
|
- data9: '执行备注',
|
|
|
- },
|
|
|
- inputData:"",
|
|
|
+ newData: {},
|
|
|
+ inputData: "",
|
|
|
}
|
|
|
},
|
|
|
|
|
|
onLoad(option) {
|
|
|
-
|
|
|
+ this.$set(this, 'newData', JSON.parse(decodeURIComponent(option.infoData)));
|
|
|
},
|
|
|
onShow() {
|
|
|
-
|
|
|
+ this.$nextTick(() => {
|
|
|
+ this.newData.executionTime = parseTime(this.newData.executionTime, "{y}-{m}-{d} {h}:{i}")
|
|
|
+ })
|
|
|
},
|
|
|
methods: {
|
|
|
-
|
|
|
+ buttonClick() {
|
|
|
+ let self = this;
|
|
|
+ if (!this.inputData) {
|
|
|
+ uni.showToast({
|
|
|
+ title: '请输入执行备注',
|
|
|
+ icon: "none",
|
|
|
+ mask: true,
|
|
|
+ duration: 2000
|
|
|
+ });
|
|
|
+ return
|
|
|
+ }
|
|
|
+ uni.showModal({
|
|
|
+ // title: '确认要退出吗?',
|
|
|
+ content: '确认提交?',
|
|
|
+ cancelColor: "#999",
|
|
|
+ confirmColor: "#0183FA",
|
|
|
+ success: function(res) {
|
|
|
+ if (res.confirm) {
|
|
|
+ self.laboratoryGradeManageExecute();
|
|
|
+ } else if (res.cancel) {}
|
|
|
+ }
|
|
|
+ });
|
|
|
+ },
|
|
|
+ async laboratoryGradeManageExecute() {
|
|
|
+ let obj = {
|
|
|
+ id: this.newData.id,
|
|
|
+ remark: this.inputData,
|
|
|
+ status: 1,
|
|
|
+ }
|
|
|
+ const {
|
|
|
+ data
|
|
|
+ } = await laboratoryGradeManageExecute(obj);
|
|
|
+ if (data.code == 200) {
|
|
|
+ uni.showToast({
|
|
|
+ title: data.message,
|
|
|
+ icon: "none",
|
|
|
+ mask: true,
|
|
|
+ duration: 2000
|
|
|
+ });
|
|
|
+ setTimeout(function() {
|
|
|
+ uni.navigateBack();
|
|
|
+ }, 2000);
|
|
|
+ }
|
|
|
+ }
|
|
|
}
|
|
|
}
|
|
|
</script>
|
|
@@ -86,10 +126,11 @@
|
|
|
flex-direction: column;
|
|
|
background: #fff;
|
|
|
padding: 0 20rpx;
|
|
|
-
|
|
|
- .text-box:nth-child(1){
|
|
|
- margin-top:30rpx;
|
|
|
+
|
|
|
+ .text-box:nth-child(1) {
|
|
|
+ margin-top: 30rpx;
|
|
|
}
|
|
|
+
|
|
|
.text-box {
|
|
|
display: flex;
|
|
|
font-size: 32rpx;
|
|
@@ -113,27 +154,30 @@
|
|
|
.colorB {
|
|
|
color: #666;
|
|
|
}
|
|
|
- .input-box{
|
|
|
- margin-top:20rpx;
|
|
|
- height:200rpx;
|
|
|
- width:500rpx;
|
|
|
- padding:10rpx;
|
|
|
- border:1px solid #dedede;
|
|
|
- border-radius:12rpx;
|
|
|
+
|
|
|
+ .input-box {
|
|
|
+ margin-top: 20rpx;
|
|
|
+ height: 200rpx;
|
|
|
+ width: 500rpx;
|
|
|
+ padding: 10rpx;
|
|
|
+ border: 1px solid #dedede;
|
|
|
+ border-radius: 12rpx;
|
|
|
}
|
|
|
}
|
|
|
- .null-p{
|
|
|
- flex:1;
|
|
|
+
|
|
|
+ .null-p {
|
|
|
+ flex: 1;
|
|
|
}
|
|
|
- .button-p{
|
|
|
+
|
|
|
+ .button-p {
|
|
|
font-size: 32rpx;
|
|
|
text-align: center;
|
|
|
- line-height:60rpx;
|
|
|
- width:200rpx;
|
|
|
- border-radius:8rpx;
|
|
|
- margin:40rpx auto;
|
|
|
+ line-height: 60rpx;
|
|
|
+ width: 200rpx;
|
|
|
+ border-radius: 8rpx;
|
|
|
+ margin: 40rpx auto;
|
|
|
background-color: #0183FA;
|
|
|
- color:#fff;
|
|
|
+ color: #fff;
|
|
|
}
|
|
|
}
|
|
|
</style>
|