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 />
......@@ -70,7 +71,7 @@
field: 'TemplateName',
align: 'left',
},
{
{
name: 'GroupTypeName',
label: '组卷类型',
field: 'GroupTypeName',
......@@ -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>
</style>
\ No newline at end of file
......@@ -33,7 +33,6 @@
position: relative;
top: 4px;
}
</style>
<!--移动到文件夹-->
<template>
......@@ -250,7 +249,6 @@
},
},
}
</script>
<style>
</style>
</style>
\ No newline at end of file
......@@ -96,7 +96,6 @@
},
},
}
</script>
<style>
</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>
</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>
</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>
</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,29 +16,29 @@
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="跳转路径" />
</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="排序" />
</div>
<div class="row">
<q-input filled stack-label type="textarea" v-model.number="objOption.Remark" ref="SubjectName"
class="col-12 q-pb-lg" label="描述" />
</div>
<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="排序" />
</div>
<div class="row">
<q-input filled stack-label type="textarea" v-model.number="objOption.Remark" ref="SubjectName"
class="col-12 q-pb-lg" label="描述" />
</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="closeDig" />
<q-btn label="保存" color="accent q-px-md" style="font-weight:400 !important" @click="save" />
<q-btn label="保存" color="accent q-px-md" style="font-weight:400 !important" @click="save" />
</q-card-actions>
</q-card>
</q-dialog>
......@@ -54,24 +54,24 @@
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
}
}
},
mounted() {
this.init()
this.init()
},
methods: {
closeDig() {
......@@ -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){
this.$q.notify({
type :'warning',
position :'top',
message :"请上传图片"
})
return
}
this.$refs.Path.validate()
this.$refs.Sort.validate()
if (!this.$refs.Path.hasError&&!this.$refs.Sort.hasError) {
this.persistent = false
this.$emit('save',this.objOption)
save() {
if (!this.objOption.Image) {
this.$q.notify({
type: 'warning',
position: 'top',
message: "请上传图片"
})
return
}
this.$refs.Path.validate()
this.$refs.Sort.validate()
if (!this.$refs.Path.hasError && !this.$refs.Sort.hasError) {
this.persistent = false
this.$emit('save', this.objOption)
}
}
}
}
</script>
<style >
.avatar-uploader .el-upload {
<style>
.avatar-uploader .el-upload {
border-radius: 6px;
cursor: pointer;
width: 100%;
......@@ -134,14 +133,16 @@
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 {
}
._delete_img {
position: absolute;
top: 0px;
height: 82px;
......
......@@ -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>
</script>
\ No newline at end of file
This diff is collapsed.
This diff is collapsed.
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