Commit 46b2acba authored by yaqizhang's avatar yaqizhang

详情按钮

parent ab3de9ba
......@@ -14,7 +14,7 @@
<el-steps :active="active" finish-status="success" simple prop="orderStatus" style="margin-top: 5px">
<el-step title="未接收" ></el-step>
<el-step title="已接收" ></el-step>
<!-- <el-step title="进行中" ></el-step>-->
<!-- <el-step title="进行中" ></el-step>-->
<el-step title="已反馈" ></el-step>
<el-step title="已归档" ></el-step>
</el-steps>
......@@ -104,13 +104,13 @@
<el-divider></el-divider>
<!-- 反馈信息 -->
<!-- <div style="width: 100%;font-weight: 600;" v-if="activity.deviceType != '' && activity.deviceType != null"> -->
<div style="width: 100%;font-weight: 600;">
<div style="width: 100%;font-weight: 600;" v-if="form.feedbackList != null">
<div style="color: #31EAEA;width: 100%;height: 40px;">
<ul><li>反馈信息</li></ul>
</div>
<div class="block" style="width: 95%;margin-left: 2%;">
<el-timeline ref="timeline">
<el-timeline-item v-for="(activity, index) in form.feedbackList" v-show='index>2?false:true' :key="index" :timestamp="activity.feedbackTime">
<el-timeline-item v-for="(activity, index) in form.feedbackList" v-show='index>1?false:true' :key="index" :timestamp="activity.feedbackTime">
<el-card>
<div style="width: 600px;float: left;">
<div style=" width: 600px;">
......@@ -160,15 +160,80 @@
</el-timeline-item>
</el-timeline>
</div>
<el-button type="danger" icon="el-icon-info" @click="changeDisplay(scope)">
<span v-if="isDisplay==false">点击展开</span>
<span v-else>点击隐藏</span>
</el-button>
</div>
<!-- 返回按钮 -->
<div style="width: 95%;position: relative;" @click="changeDisplay(scope)">
<!-- <el-button type="primary"> -->
<i class="el-icon-arrow-down" v-if="isDisplay==false" style="margin-left: 100px;color: #909399;font-size: 14px;">
<span style="text-decoration:underline">显示全部</span>
</i>
<i class="el-icon-arrow-up" v-else style="color: #909399;font-size: 14px;margin-left: 100px;">
<span style="text-decoration:underline">收起</span>
</i>
<!-- </el-button> -->
</div>
<el-divider></el-divider>
</div>
<!-- 归档 -->
<div class="" style="width: 95%; height: 60px;margin-left: 50px;text-align: center;">
<el-button
type="primary"
size="normal"
icon="el-icon-edit"
@click="handleUpdate(form.orderId)"
v-hasPermi="['workOrder:basicsInfo:edit']"
>修改</el-button>
<el-button
type="primary"
size="normal"
icon="el-icon-edit"
@click="handleFinish(form.orderId)"
v-hasPermi="['workOrder:basicsInfo:editStatus']"
>归档</el-button>
<el-dialog :title="title" :visible.sync="open" width="800px" append-to-body>
<el-form ref="form" :model="form" :rules="rules" label-width="100px">
<div v-if="this.title == '工单信息修改'">
<el-form-item label="工单名称" prop="orderName">
<el-input v-model="form.orderName" placeholder="请输入工单名称" />
</el-form-item>
<el-form-item label="指定执行人员" prop="appointInspector">
<el-select v-model="form.appointInspectorName" placeholder="请选择执行人员" clearable size="small" @change="setUserId">
<el-option
v-for="item in inspector"
:key="item.userId"
:label="item.nickName"
:value="item.userId"
></el-option>
</el-select>
</el-form-item>
<el-form-item label="工单描述" prop="remarks">
<el-input v-model="form.remarks" type="textarea" placeholder="请输入工单描述" />
</el-form-item>
</div>
<div v-if="this.title == '工单信息归档'">
<el-form-item label="工单名称" prop="orderName">
<font>{{form.orderName}}</font>
</el-form-item>
<el-form-item label="工单类型" prop="orderType">
<span type="primary" v-if="form.orderType == 1">巡检信息</span>
<span type="primary" v-if="form.orderType == 2">隐患信息</span>
<span type="primary" v-if="form.orderType == 3">报警信息</span>
</el-form-item>
<el-form-item label="工单编号" prop="orderId">
<font>{{form.orderId}}</font>
</el-form-item>
<el-form-item label="归档信息" prop="archiving">
<el-input v-model="form.archiving" type="textarea" placeholder="请输入归档信息" />
</el-form-item>
</div>
</el-form>
<div slot="footer" class="dialog-footer">
<el-button type="primary" @click="submitForm">确 定</el-button>
<el-button @click="cancel">取 消</el-button>
</div>
</el-dialog>
</div>
</div>
</div>
</template>
......@@ -179,6 +244,7 @@
import { deviceTree } from "@/api/device/deviceInfo";
import gaodeMap from "utils/gaodeMap.js";
import {map, DEVICE_TYPE} from "utils/gaodeMap.js";
import { inspectorList } from "@/api/system/user";
export default {
name: "BasicsInfo",
......@@ -186,6 +252,7 @@ export default {
},
data() {
return {
inspector: [],
isDisplay:false,
dialogImageUrl: '',
dialogVisible: false,
......@@ -252,37 +319,6 @@ export default {
showAndHide : false
};
},
// mocData() {
// for (var i = 0; i < activity.length; i++) {
// let item = {title: lists[i], name: activity[i]}
// this.detailList.push(activity)
// }
// console.log(this.detailList)
// },
// computed: {
// feedbackList: {
// get: function () {
// if (this.brandFold) {
// if (this.detailList.length < 7) {
// return this.detailList
// }
// let newArr = []
// for (var i = 0; i < 6; i++) {
// let item = this.detailList[i]
// newArr.push(activity)
// }
// return newArr
// }
// return this.detailList
// },
// set: function (val) {
// this.form.feedbackList = val
// }
// }
// },
// changeFoldState() {
// this.brandFold = !this.brandFold
// },
created() {
// 如果是跳转来的,则接受初始化参数
// this.user_id = this.$route.query.id; //详细信息页接收参数
......@@ -302,20 +338,27 @@ export default {
this.getBasicsInfo();
},
methods: {
getInspectorList(){
this.loading = true;
inspectorList().then(response => {
this.inspector = response.data;
this.loading = false;
});
},
// 点击按钮显示隐藏
changeDisplay(e){
this.isDisplay = !this.isDisplay
let $timeline = this.$refs.timeline;
if(!this.showAndHide){
for(let i = 0; i< $timeline.$children.length; i++){
if(i>3){
if(i>1){
$timeline.$children[i].$el.style.display = "block";
}
}
this.showAndHide = true;
}else{
for(let i = 0; i< $timeline.$children.length; i++){
if(i>3){
if(i>1){
$timeline.$children[i].$el.style.display = "none";
}
}
......@@ -381,7 +424,7 @@ export default {
// 取消按钮
cancel() {
this.open = false;
this.reset();
// this.reset();
},
// 表单重置
reset() {
......@@ -420,30 +463,40 @@ export default {
this.reset();
this.open = true;
this.title = "添加工单基础信息";
},
/** 归档按钮操作 */
handleFinish(res) {
// this.reset();
getBasicsInfo(res).then(response => {
this.form = response.data;
this.open = true;
this.title = "工单信息归档";
});
},
/** 修改按钮操作 */
handleUpdate(row) {
this.reset();
const orderId = row.orderId || this.ids
getBasicsInfo(orderId).then(response => {
handleUpdate(res) {
// this.reset();
this.getInspectorList();
getBasicsInfo(res).then(response => {
this.form = response.data;
this.open = true;
this.title = "修改工单基础信息";
this.title = "工单信息修改";
});
},
/** 提交按钮 */
/** 提交按钮 */
submitForm() {
this.$refs["form"].validate(valid => {
if (valid) {
if (this.form.orderId != null) {
if (this.form.orderStatus == '0') {
updateBasicsInfo(this.form).then(response => {
this.msgSuccess("修改成功");
this.open = false;
this.getList();
});
} else {
addBasicsInfo(this.form).then(response => {
this.msgSuccess("新增成功");
} else if(this.form.orderStatus == '2'){
updateOrderStatus(this.form).then(response => {
this.msgSuccess("操作成功");
this.open = false;
this.getList();
});
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment