Commit a6a4e272 authored by 黄奎's avatar 黄奎

代码优化

parent c25f6ace
......@@ -9,7 +9,7 @@
<q-table :pagination="pageMsg" :loading="loading" no-data-label="暂无相关数据" flat
class="sticky-column-table sticky-right-column-table" separator="none" :data="dataList" :columns="columns"
row-key="name">
<template v-slot:top="props">
<template v-slot:top>
<div class="col-2 q-table__title">考试管理</div>
<q-space />
</template>
......
......@@ -8,15 +8,16 @@
<div class="page-search row items-center">
<div class="col row wrap q-mr-lg q-col-gutter-md">
<div class="col-12">
<q-input @input="research" clearable standout="bg-primary text-white" v-model="msg.TemplateName" label="关键字"
@clear="research" maxlength="20" />
<q-input @input="research" clearable standout="bg-primary text-white" v-model="msg.TemplateName"
label="关键字" @clear="research" maxlength="20" />
</div>
</div>
</div>
<div class="page-content">
<q-table :pagination="msg" :loading="loading" no-data-label="暂无相关数据" flat
class="sticky-column-table sticky-header-column-table" style="max-height: 550px" separator="none" :data="dataList" :columns="columns"
row-key="TemplateId" selection="single" :selected.sync="selectedTemplate">
class="sticky-column-table sticky-header-column-table" style="max-height: 550px" separator="none"
:data="dataList" :columns="columns" row-key="TemplateId" selection="single"
:selected.sync="selectedTemplate">
<template v-slot:top="props">
<div class="col-2 q-table__title">模板列表</div>
<q-space />
......@@ -131,15 +132,13 @@
this.persistent = false;
var tempObj = {};
if (this.selectedTemplate && this.selectedTemplate.length > 0) {
tempObj=this.selectedTemplate[0];
tempObj = this.selectedTemplate[0];
}
this.$emit('success', tempObj);
},
},
}
</script>
<style lang="sass">
@import url('~assets/css/table.sass')
</style>
\ No newline at end of file
......@@ -33,7 +33,6 @@
position: relative;
top: 4px;
}
</style>
<!--移动到文件夹-->
<template>
......@@ -250,7 +249,6 @@
},
},
}
</script>
<style>
</style>
\ No newline at end of file
......@@ -96,7 +96,6 @@
},
},
}
</script>
<style>
</style>
\ No newline at end of file
......@@ -149,7 +149,6 @@
.processSet .justTwoClass {
margin-left: 8px;
}
</style>
<template>
<div class="processSet">
......@@ -160,7 +159,7 @@
</div>
</div>
<template v-for="(item,index) in flowObj.FlowNodeList">
<div class="processList" @click="getItem(index)">
<div class="processList" @click="getItem(index)" :key="index">
<template v-if="item.FlowAduitList&&item.FlowAduitList.length==1">
<div class="processTop otherList">
{{item.FlowAduitList[0].AduitName}}
......@@ -215,7 +214,6 @@
<br />
<div class="addProcessBtn" @click="AddNode">新增节点</div>
<div class="process_BtnList">
<!-- <div class="process_BtnOne">日志信息</div> -->
<q-btn label="保存" color="accent q-px-md" style="font-weight:400 !important" @click="setBackClassFlow" />
</div>
<process-form v-if="isShowProcess" :save-obj="processObj" :NodeIndex="ChooseNodeIndex" @close="closeProcessForm"
......@@ -351,5 +349,4 @@
}
}
}
</script>
\ No newline at end of file
......@@ -160,7 +160,7 @@
</div>
</div>
<template v-for="(item,index) in flowObj.FlowNodeList">
<div class="processList" @click="getItem(index)">
<div class="processList" @click="getItem(index)" :key="index">
<template v-if="item.FlowAduitList&&item.FlowAduitList.length==1">
<div class="processTop otherList">
{{item.FlowAduitList[0].AduitName}}
......
......@@ -159,7 +159,7 @@
</div>
</div>
<template v-for="(item, index) in flowObj.FlowNodeList">
<div class="processList" @click="getItem(index)">
<div class="processList" @click="getItem(index)" :key="index">
<template v-if="item.FlowAduitList && item.FlowAduitList.length == 1">
<div class="processTop otherList">
{{ item.FlowAduitList[0].AduitName }}
......
......@@ -156,7 +156,7 @@
<template>
<q-dialog v-model="persistent" maximized full-height seamless position="right" @hide="closeProcess">
<q-card style="margin-top:61px;width:500px" class="no-border-radius classinfo_Dialog">
<div class="processMain" v-for="(aItem,aIndex) in saveObj.FlowNodeList[NodeIndex].FlowAduitList">
<div class="processMain" v-for="(aItem,aIndex) in saveObj.FlowNodeList[NodeIndex].FlowAduitList" :key="aIndex">
<div class="processShenPi">
<div class="processPerson">审批人{{aIndex+1}}</div>
<div class="processInner">
......
......@@ -160,7 +160,7 @@
</div>
</div>
<template v-for="(item,index) in flowObj.FlowNodeList">
<div class="processList" @click="getItem(index)">
<div class="processList" @click="getItem(index)" :key="index">
<template v-if="item.FlowAduitList&&item.FlowAduitList.length==1">
<div class="processTop otherList">
{{item.FlowAduitList[0].AduitName}}
......
......@@ -149,7 +149,6 @@
.changeClassProcess .justTwoClass {
margin-left: 8px;
}
</style>
<template>
<div class="changeClassProcess">
......@@ -160,7 +159,7 @@
</div>
</div>
<template v-for="(item,index) in flowObj.FlowNodeList">
<div class="processList" @click="getItem(index)">
<div class="processList" @click="getItem(index)" :key="index">
<template v-if="item.FlowAduitList&&item.FlowAduitList.length==1">
<div class="processTop otherList">
{{item.FlowAduitList[0].AduitName}}
......@@ -215,7 +214,6 @@
<br />
<div class="addProcessBtn" @click="AddNode">新增节点</div>
<div class="process_BtnList">
<q-btn label="保存" color="accent q-px-md" style="font-weight:400 !important" @click="setBackClassFlow" />
</div>
<process-form v-if="isShowProcess" :save-obj="processObj" :NodeIndex="ChooseNodeIndex" @close="closeProcessForm"
......@@ -250,7 +248,7 @@
},
//显示对象
showObj: {
isShowShouSun: 0,//不显示收损
isShowShouSun: 0, //不显示收损
},
ChooseNodeIndex: 0,
}
......@@ -351,5 +349,4 @@
}
}
}
</script>
\ No newline at end of file
......@@ -149,7 +149,6 @@
.changeClassProcess .justTwoClass {
margin-left: 8px;
}
</style>
<template>
<div class="changeClassProcess">
......@@ -160,7 +159,7 @@
</div>
</div>
<template v-for="(item,index) in flowObj.FlowNodeList">
<div class="processList" @click="getItem(index)">
<div class="processList" @click="getItem(index)" :key="index">
<template v-if="item.FlowAduitList&&item.FlowAduitList.length==1">
<div class="processTop otherList">
{{item.FlowAduitList[0].AduitName}}
......@@ -250,7 +249,7 @@
},
//显示对象
showObj: {
isShowShouSun: 0,//不显示收损
isShowShouSun: 0, //不显示收损
},
ChooseNodeIndex: 0,
}
......@@ -351,5 +350,4 @@
}
}
}
</script>
\ No newline at end of file
This diff is collapsed.
......@@ -160,7 +160,7 @@
</div>
</div>
<template v-for="(item,index) in flowObj.FlowNodeList">
<div class="processList" @click="getItem(index)">
<div class="processList" @click="getItem(index)" :key="index">
<template v-if="item.FlowAduitList&&item.FlowAduitList.length==1">
<div class="processTop otherList">
{{item.FlowAduitList[0].AduitName}}
......
......@@ -3,7 +3,6 @@
font-size: 14px;
color: #646873;
line-height: 34px;
/* margin-bottom: 16px; */
overflow: hidden;
padding: 4px 0;
cursor: default;
......
......@@ -16,19 +16,19 @@
color="red" icon="iconfont icon-guanbi1" />
</div>
</div>
<el-upload v-else class="avatar-uploader addDutyMain" action=""
:before-upload="uploadFile" :show-file-list="false">
<el-upload v-else class="avatar-uploader addDutyMain" action="" :before-upload="uploadFile"
:show-file-list="false">
<i class="el-icon-plus avatar-uploader-icon"></i>
</el-upload>
</div>
</div>
<div class="row">
<q-input filled stack-label v-model="objOption.Path" ref="Path"
class="col-12 q-pb-lg" :rules="[val => !!val || '请输入跳转路径']" label="跳转路径" />
<q-input filled stack-label v-model="objOption.Path" ref="Path" class="col-12 q-pb-lg"
:rules="[val => !!val || '请输入跳转路径']" label="跳转路径" />
</div>
<div class="row">
<q-input filled stack-label v-model.number="objOption.Sort" ref="Sort"
class="col-12 q-pb-lg" :rules="[val => !!val || '请输入排序']" label="排序" />
<q-input filled stack-label v-model.number="objOption.Sort" ref="Sort" class="col-12 q-pb-lg"
:rules="[val => !!val || '请输入排序']" label="排序" />
</div>
<div class="row">
<q-input filled stack-label type="textarea" v-model.number="objOption.Remark" ref="SubjectName"
......@@ -54,19 +54,19 @@
type: Object,
default: null
},
type:{
type:Number,
default:0
type: {
type: Number,
default: 0
}
},
data() {
return {
persistent: true,
objOption: {
Image:"",
Path:"",
Remark:"",
Sort:0
Image: "",
Path: "",
Remark: "",
Sort: 0
}
}
},
......@@ -89,34 +89,33 @@
}
})
},
init(){
this.objOption.Image=this.saveObj.Image
this.objOption.Path=this.saveObj.Path
this.objOption.Remark=this.saveObj.Remark
this.objOption.Sort=this.saveObj.Sort
init() {
this.objOption.Image = this.saveObj.Image
this.objOption.Path = this.saveObj.Path
this.objOption.Remark = this.saveObj.Remark
this.objOption.Sort = this.saveObj.Sort
},
save(){
if(!this.objOption.Image){
save() {
if (!this.objOption.Image) {
this.$q.notify({
type :'warning',
position :'top',
message :"请上传图片"
type: 'warning',
position: 'top',
message: "请上传图片"
})
return
}
this.$refs.Path.validate()
this.$refs.Sort.validate()
if (!this.$refs.Path.hasError&&!this.$refs.Sort.hasError) {
if (!this.$refs.Path.hasError && !this.$refs.Sort.hasError) {
this.persistent = false
this.$emit('save',this.objOption)
this.$emit('save', this.objOption)
}
}
}
}
</script>
<style >
.avatar-uploader .el-upload {
<style>
.avatar-uploader .el-upload {
border-radius: 6px;
cursor: pointer;
width: 100%;
......@@ -134,13 +133,15 @@
border: 1px dashed #d9d9d9;
line-height: 120px;
}
.ItemImgDiv {
.ItemImgDiv {
width: 118px;
height: 118px;
position: relative;
margin: 0 10px 10px 0;
display: inline-block;
}
._delete_img {
position: absolute;
top: 0px;
......
......@@ -20,16 +20,18 @@
<div style="margin-bottom:5px;">咨询内容:</div>
</div>
<div class="row wrap">
<q-input class="col-12 q-pb-lg" v-model="editObj.Remark" filled :disable="isEdit" type="textarea" placeholder="咨询内容" />
<q-input class="col-12 q-pb-lg" v-model="editObj.Remark" filled :disable="isEdit" type="textarea"
placeholder="咨询内容" />
<div style="margin-bottom:5px;">回复内容:</div>
<q-input class="col-12 q-pb-lg" v-model="objOption.DealContent" :disable="isEdit" filled type="textarea" placeholder="回复内容" />
<q-input class="col-12 q-pb-lg" v-model="objOption.DealContent" :disable="isEdit" filled type="textarea"
placeholder="回复内容" />
</div>
</q-card-section>
<q-separator />
<q-card-actions align="right" class="bg-white">
<q-btn label="取消" flat color="grey-10" style="font-weight:400 !important" @click="closeSaveForm" />
<q-btn label="立即提交" v-if="saveObj.isView!=1" color="accent q-px-md" style="font-weight:400 !important" :loading="saveLoading"
@click="saveConsult" />
<q-btn label="立即提交" v-if="saveObj.isView!=1" color="accent q-px-md" style="font-weight:400 !important"
:loading="saveLoading" @click="saveConsult" />
</q-card-actions>
</q-card>
</q-dialog>
......@@ -58,13 +60,13 @@
editObj: {},
optionTitle: "修改咨询",
saveLoading: false,
isEdit:false
isEdit: false
}
},
mounted() {
if(this.saveObj.isView==1){
this.isEdit=true;
this.optionTitle='查看咨询';
if (this.saveObj.isView == 1) {
this.isEdit = true;
this.optionTitle = '查看咨询';
}
this.initObj()
},
......@@ -112,5 +114,4 @@
}
},
}
</script>
\ No newline at end of file
This diff is collapsed.
<template>
<q-dialog
v-model="persistent"
content-class="bg-grey-1"
persistent
transition-show="scale"
transition-hide="scale"
>
<q-dialog v-model="persistent" content-class="bg-grey-1" persistent transition-show="scale" transition-hide="scale">
<q-card style="width: 600px">
<q-card-section>
<div class="text-h6">
......@@ -19,67 +13,31 @@
{{ item.GuestName }}:
</div>
<div class="row wrap">
<q-select
filled
stack-label
class="col-6 q-pr-lg q-pb-lg"
v-model="item.Score"
:options="ScoreOpts"
emit-value
map-options
label="评分"
/>
<q-select filled stack-label class="col-6 q-pr-lg q-pb-lg" v-model="item.Score" :options="ScoreOpts"
emit-value map-options label="评分" />
</div>
<div class="row">
<q-input
v-model="item.Comment"
filled
stack-label
type="textarea"
label="评语"
style="width: 100%"
/>
<q-input v-model="item.Comment" filled stack-label type="textarea" label="评语" style="width: 100%" />
</div>
<div class="row wrap" style="padding-top: 20px">
<div style="display: flex; flex-wrap: wrap">
<div
v-if="item.PhotoList && item.PhotoList.length > 0"
v-for="(item1, index1) in item.PhotoList"
:key="index1"
>
<template v-if="item.PhotoList && item.PhotoList.length > 0">
<div v-for="(item1, index1) in item.PhotoList" :key="index1">
<div class="ItemImgDiv">
<video
:src="item1"
style="height: 100%; height: 100%"
v-if="item1.indexOf('mp4') != -1"
></video>
<el-image
:src="item1"
style="height: 100%; height: 100%"
:preview-src-list="item.PhotoList"
v-else
></el-image>
<q-btn
size="7px"
@click="deleteItemImg(index, index1)"
style="position: absolute; right: -5px; top: -5px"
round
color="red"
icon="iconfont icon-guanbi1"
/>
<video :src="item1" style="height: 100%; height: 100%" v-if="item1.indexOf('mp4') != -1"></video>
<el-image :src="item1" style="height: 100%; height: 100%" :preview-src-list="item.PhotoList" v-else>
</el-image>
<q-btn size="7px" @click="deleteItemImg(index, index1)"
style="position: absolute; right: -5px; top: -5px" round color="red"
icon="iconfont icon-guanbi1" />
</div>
</div>
<el-upload
class="avatar-uploader addDutyMain"
action=""
:before-upload="
</template>
<el-upload class="avatar-uploader addDutyMain" action="" :before-upload="
(file) => {
return uploadFile(file, index);
}
"
:show-file-list="false"
>
" :show-file-list="false">
<i class="el-icon-plus avatar-uploader-icon"></i>
</el-upload>
</div>
......@@ -88,29 +46,22 @@
</q-card-section>
<q-separator />
<q-card-actions align="right" class="bg-white">
<q-btn
label="取消"
flat
color="grey-10"
style="font-weight: 400 !important"
@click="closeSaveForm"
/>
<q-btn
label="立即提交"
color="accent q-px-md"
style="font-weight: 400 !important"
:loading="saveLoading"
@click="saveData"
/>
<q-btn label="取消" flat color="grey-10" style="font-weight: 400 !important" @click="closeSaveForm" />
<q-btn label="立即提交" color="accent q-px-md" style="font-weight: 400 !important" :loading="saveLoading"
@click="saveData" />
</q-card-actions>
</q-card>
</q-dialog>
</template>
<script>
import { setFeedBack } from "../../api/teacher";
import { UploadSelfFile } from "../../api/common/common";
export default {
import {
setFeedBack
} from "../../api/teacher";
import {
UploadSelfFile
} from "../../api/common/common";
export default {
props: {
arr: {
type: Array,
......@@ -182,10 +133,10 @@ export default {
this.dataList[index].PhotoList.splice(index1, 1);
},
},
};
};
</script>
<style>
.avatar-uploader .el-upload {
.avatar-uploader .el-upload {
border-radius: 6px;
cursor: pointer;
width: 100%;
......@@ -193,24 +144,27 @@ export default {
color: #8c939d;
position: relative;
overflow: hidden;
}
.addDutyMain {
}
.addDutyMain {
display: inline-block;
width: 118px;
height: 118px;
font-size: 70px;
border: 1px dashed #d9d9d9;
line-height: 120px;
}
.ItemImgDiv {
}
.ItemImgDiv {
width: 118px;
height: 118px;
position: relative;
overflow: hidden;
margin: 0 10px 10px 0;
display: inline-block;
}
._delete_img {
}
._delete_img {
position: absolute;
top: 0px;
height: 82px;
......@@ -221,8 +175,9 @@ export default {
display: inherit;
opacity: 0;
transition: all linear 0.5s;
}
._delete_img i.iconfont {
}
._delete_img i.iconfont {
display: inline-block;
width: 32px;
height: 32px;
......@@ -230,8 +185,9 @@ export default {
color: #e95252 !important;
background-color: rgba(251, 251, 251, 0.9);
margin-top: 26px;
}
._upload_box ul li {
}
._upload_box ul li {
float: left;
height: 82px;
width: 143px;
......@@ -240,15 +196,18 @@ export default {
position: relative;
cursor: pointer;
margin-right: 10px;
}
._upload_box ul li img {
}
._upload_box ul li img {
height: 82px;
width: 143px;
}
._upload_box ul li:hover ._delete_img {
}
._upload_box ul li:hover ._delete_img {
opacity: 1;
}
._upload_tips {
}
._upload_tips {
font-size: 12px;
position: absolute;
top: 71%;
......@@ -256,5 +215,5 @@ export default {
left: 0;
text-align: center;
color: #949494;
}
}
</style>
\ No newline at end of file
This diff is collapsed.
This diff is collapsed.
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