更调element ui原生选项功能、样式

main
liuyiliang 1 year ago
parent 44def3b567
commit 4931f5697b
  1. 18605
      public/cdn/element-ui/2.15.6/index.js
  2. 1
      src/page/index/top-menu.vue
  3. 2
      src/page/login/authredirect.vue
  4. 22
      src/page/login/userlogin.vue
  5. 5
      src/styles/element-ui.scss
  6. 47
      src/views/smart/workorder.vue
  7. 56
      src/views/smart/workorderDetail.vue

File diff suppressed because one or more lines are too long

@ -37,7 +37,6 @@ export default {
created() { created() {
setTimeout(() => { setTimeout(() => {
let menuList = window.sessionStorage.getItem('master-menuAll'); let menuList = window.sessionStorage.getItem('master-menuAll');
console.log(menuList)
if (menuList) { if (menuList) {
for (var index = 0; index < JSON.parse(menuList).length; index++) { for (var index = 0; index < JSON.parse(menuList).length; index++) {
this.data.push({ this.data.push({

@ -10,7 +10,7 @@ export default {
const params = this.$route.query const params = this.$route.query
const state = params.state const state = params.state
const code = params.code const code = params.code
window.opener.location.href = `${window.location.origin}/#/login?state=${state}&code=${code}` window.opener.location.href = `${window.location.origin}/#/login?state=${state}&code=${code}&_t=1`
} }
} }
</script> </script>

@ -25,6 +25,7 @@
<i slot="prefix" <i slot="prefix"
class="icon-yonghu"></i> class="icon-yonghu"></i>
</el-input> </el-input>
<div class="el-form-item__error" v-show="errorMsg.account" v-text="errorMsg.account"/>
</el-form-item> </el-form-item>
<el-form-item prop="password"> <el-form-item prop="password">
<div class="login-sub-title">密码</div> <div class="login-sub-title">密码</div>
@ -55,11 +56,11 @@
</el-col> </el-col>
<el-col :span="8"> <el-col :span="8">
<div class="login-code"> <div class="login-code">
<img :src="loginForm.image" class="login-code-img" @click="refreshCode" <img :src="loginForm.image" class="login-code-img" @click="refreshCode"/>
/>
</div> </div>
</el-col> </el-col>
</el-row> </el-row>
<div class="el-form-item__error" v-show="errorMsg.code" v-text="errorMsg.code"/>
</el-form-item> </el-form-item>
<el-form-item> <el-form-item>
<el-button type="primary" <el-button type="primary"
@ -112,7 +113,11 @@
{min: 1, message: "密码长度最少为6位", trigger: "blur"} {min: 1, message: "密码长度最少为6位", trigger: "blur"}
] ]
}, },
passwordType: "password" passwordType: "password",
errorMsg: {
account: null,
code: null
}
}; };
}, },
created() { created() {
@ -139,6 +144,10 @@
: (this.passwordType = ""); : (this.passwordType = "");
}, },
handleLogin() { handleLogin() {
this.errorMsg = {
account: null,
code: null
};
this.$refs.loginForm.validate(valid => { this.$refs.loginForm.validate(valid => {
if (valid) { if (valid) {
const loading = this.$loading({ const loading = this.$loading({
@ -149,8 +158,13 @@
this.$store.dispatch("LoginByUsername", this.loginForm).then(() => { this.$store.dispatch("LoginByUsername", this.loginForm).then(() => {
this.$router.push({path: this.tagWel.value}); this.$router.push({path: this.tagWel.value});
loading.close(); loading.close();
}).catch(() => { }).catch((error) => {
loading.close() loading.close()
if (error.message.match('验证码') !== null) {
this.errorMsg.code = error.message;
} else {
this.errorMsg.account = error.message;
}
}); });
} }
}); });

@ -90,3 +90,8 @@ table {
.el-table { .el-table {
height: 540px !important; height: 540px !important;
} }
.el-table .cell {
white-space: nowrap;
overflow: hidden;
text-overflow: ellipsis;
}

@ -18,10 +18,24 @@
@selection-change="selectionChange" @selection-change="selectionChange"
@current-change="currentChange" @current-change="currentChange"
@size-change="sizeChange" @size-change="sizeChange"
@on-load="onLoad"> @on-load="onLoad"
class="workorder_table">
<template slot="menuLeft"> <template slot="menuLeft">
<el-button type="danger" size="small" icon="el-icon-delete" plain v-if="permission.workorder_delete" @click="handleDelete">批量删除</el-button> <el-button type="danger" size="small" icon="el-icon-delete" plain v-if="permission.workorder_delete" @click="handleDelete">批量删除</el-button>
</template> </template>
<template #equipmentLedgerId="scope">
{{scope.row.kksEncoding}}
</template>
<template #description="scope">
<el-tooltip class="item" effect="dark" :content="scope.row.description" placement="top-start">
<span>{{ scope.row.description }}</span>
</el-tooltip>
</template>
<template #maintenanceTaskType="scope">
<el-tooltip class="item" effect="dark" :content="scope.row.maintenanceTaskType" placement="top-start">
<span>{{ scope.row.maintenanceTaskType }}</span>
</el-tooltip>
</template>
<template slot="menuRight"> <template slot="menuRight">
<el-button type="primary" size="small" plain @click="handleDetailAdd" v-if="permission.workorder_add">新增</el-button> <el-button type="primary" size="small" plain @click="handleDetailAdd" v-if="permission.workorder_add">新增</el-button>
<el-button type="primary" size="small" plain @click="handleReject" v-if="permission.workorder_reject">批量驳回</el-button> <el-button type="primary" size="small" plain @click="handleReject" v-if="permission.workorder_reject">批量驳回</el-button>
@ -107,13 +121,15 @@
searchMenuSpan: 6, searchMenuSpan: 6,
tip: false, tip: false,
border: true, border: true,
index: true, index: false,
viewBtn: true, viewBtn: true,
selection: true, selection: true,
refreshBtn: false, refreshBtn: false,
searchShowBtn: false, searchShowBtn: false,
menuWidth: 270, menuWidth: 270,
menuAlign: 'center', menuAlign: 'center',
searchBtnText: '查询',
emptyBtnText: '重置',
column: [ column: [
{ {
label: "主键", label: "主键",
@ -131,18 +147,13 @@
type: 'select', type: 'select',
remote: true, remote: true,
search: true, search: true,
width: "150px",
props: { props: {
label: 'kksEncoding', label: 'kksEncoding',
value: 'id', value: 'id',
// desc: 'station'
}, },
hide: true,
dicUrl: "/api/equipmentledger/listByCoding?coding={{key}}", dicUrl: "/api/equipmentledger/listByCoding?coding={{key}}",
}, },
{
label: "KKS编码",
prop: "kksEncoding"
},
{ {
label: "场站", label: "场站",
prop: "station", prop: "station",
@ -154,6 +165,7 @@
label: "dictValue", label: "dictValue",
value: "dictKey" value: "dictKey"
}, },
width: "150px",
rules: [{ rules: [{
required: true, required: true,
message: "请输入场站", message: "请输入场站",
@ -162,6 +174,7 @@
}, },
{ {
label: "工单编号", label: "工单编号",
width: "150px",
prop: "workOrderNo", prop: "workOrderNo",
search: true, search: true,
rules: [{ rules: [{
@ -174,6 +187,7 @@
label: "内容描述", label: "内容描述",
prop: "description", prop: "description",
search: true, search: true,
width: "150px",
rules: [{ rules: [{
required: true, required: true,
message: "请输入内容描述", message: "请输入内容描述",
@ -183,6 +197,7 @@
{ {
label: "工单类型", label: "工单类型",
prop: "workOrderType", prop: "workOrderType",
width: "150px",
type: "select", type: "select",
dicUrl: "/api/daf-system/dict/dictionary?code=workorder_type", dicUrl: "/api/daf-system/dict/dictionary?code=workorder_type",
props: { props: {
@ -199,11 +214,12 @@
{ {
label: "维护作业类型", label: "维护作业类型",
prop: "maintenanceTaskType", prop: "maintenanceTaskType",
span: 8 width: "150px"
}, },
{ {
label: "所属场站", label: "所属场站",
prop: "plannedFactory", prop: "plannedFactory",
width: "150px",
rules: [{ rules: [{
required: true, required: true,
message: "请输入所属场站", message: "请输入所属场站",
@ -213,6 +229,7 @@
{ {
label: "责任人", label: "责任人",
prop: "managerUserName", prop: "managerUserName",
width: "150px",
rules: [{ rules: [{
required: true, required: true,
message: "请输入负责人", message: "请输入负责人",
@ -222,6 +239,7 @@
{ {
label: "责任班组", label: "责任班组",
prop: "responsibilityTeam", prop: "responsibilityTeam",
width: "150px",
search: true, search: true,
rules: [{ rules: [{
required: true, required: true,
@ -233,6 +251,7 @@
label: "用户状态", label: "用户状态",
prop: "userStatus", prop: "userStatus",
type: "select", type: "select",
width: "150px",
search: true, search: true,
hide: true, hide: true,
dicUrl: "/api/daf-system/dict/dictionary?code=user_status", dicUrl: "/api/daf-system/dict/dictionary?code=user_status",
@ -250,6 +269,7 @@
label: "发生时间", label: "发生时间",
prop: "occurrenceTime", prop: "occurrenceTime",
hide: true, hide: true,
width: "150px",
rules: [{ rules: [{
required: true, required: true,
message: "请输入发生时间", message: "请输入发生时间",
@ -259,6 +279,7 @@
{ {
label: "执行班组", label: "执行班组",
prop: "taskTeam", prop: "taskTeam",
width: "150px",
hide: true, hide: true,
rules: [{ rules: [{
required: true, required: true,
@ -269,6 +290,7 @@
{ {
label: "处理时间", label: "处理时间",
prop: "processingTime", prop: "processingTime",
width: "150px",
hide: true, hide: true,
rules: [{ rules: [{
required: true, required: true,
@ -279,6 +301,7 @@
{ {
label: "发生原因", label: "发生原因",
prop: "causeIncident", prop: "causeIncident",
width: "150px",
hide: true, hide: true,
rules: [{ rules: [{
required: true, required: true,
@ -289,6 +312,7 @@
{ {
label: "处理过程描述", label: "处理过程描述",
prop: "processDescription", prop: "processDescription",
width: "150px",
hide: true, hide: true,
rules: [{ rules: [{
required: true, required: true,
@ -299,6 +323,7 @@
{ {
label: "结束时间", label: "结束时间",
prop: "endTime", prop: "endTime",
width: "150px",
hide: true, hide: true,
rules: [{ rules: [{
required: true, required: true,
@ -309,10 +334,12 @@
{ {
label: "工单完成", label: "工单完成",
prop: "handlingResult", prop: "handlingResult",
width: "150px",
}, },
{ {
label: "审核状态", label: "审核状态",
prop: "approvalStatus", prop: "approvalStatus",
width: "150px",
type: "select", type: "select",
dicUrl: "/api/daf-system/dict/dictionary?code=check_status", dicUrl: "/api/daf-system/dict/dictionary?code=check_status",
props: { props: {
@ -599,5 +626,5 @@
}; };
</script> </script>
<style> <style scoped="scoped" lang="scss">
</style> </style>

@ -5,8 +5,7 @@
<div class="check_status_class"> <div class="check_status_class">
<span> <span>
<el-col > <el-col >
审核状态: {{getOptionCheckStatusLabel(tab1_form.approvalStatus)}}
<avue-input v-model="form" placeholder="" class="frame_class1" style = "width: 100px"></avue-input>
</el-col> </el-col>
</span> </span>
</div> </div>
@ -67,7 +66,7 @@
} }
] ]
}, },
original_form: {},
tab1_form: {}, tab1_form: {},
tab1_option: { tab1_option: {
submitBtn: false, submitBtn: false,
@ -115,7 +114,8 @@
} }
}, },
}, },
}, { },
{
label: "KKS描述", label: "KKS描述",
prop: "kksDescription", prop: "kksDescription",
type: 'textarea', type: 'textarea',
@ -130,7 +130,8 @@
span: 8, span: 8,
maxlength: 400, maxlength: 400,
disabled: true disabled: true
}, { },
{
label: "场站", label: "场站",
prop: "station", prop: "station",
type: "select", type: "select",
@ -146,7 +147,8 @@
trigger: "blur" trigger: "blur"
}], }],
disabled: true disabled: true
}, { },
{
label: "工单编号", label: "工单编号",
prop: "workOrderNo", prop: "workOrderNo",
span: 8, span: 8,
@ -155,7 +157,8 @@
message: "请输入工单编号", message: "请输入工单编号",
trigger: "blur" trigger: "blur"
}] }]
}, { },
{
label: "工单类型", label: "工单类型",
prop: "workOrderType", prop: "workOrderType",
type: "select", type: "select",
@ -170,7 +173,8 @@
message: "请输入工单类型", message: "请输入工单类型",
trigger: "blur" trigger: "blur"
}] }]
}, { },
{
label: "内容描述", label: "内容描述",
prop: "description", prop: "description",
type: 'textarea', type: 'textarea',
@ -290,6 +294,7 @@
}, },
item_data: [], item_data: [],
equipmentOptions: [], equipmentOptions: [],
curr: null
} }
}, },
computed: { computed: {
@ -312,8 +317,8 @@
this.shouldShowButton = false; this.shouldShowButton = false;
this.addupdateShowButton = true; this.addupdateShowButton = true;
this.frame_class = null; this.frame_class = null;
this.searchDetail();
} else if (this.$route.query.frameMode == "search") { } else if (this.$route.query.frameMode == "search") {
this.tab1_option.column[1].curr = 'curr';
this.tab1_option.column[1].disabled = false; this.tab1_option.column[1].disabled = false;
this.tab1_option.column[2].disabled = false; this.tab1_option.column[2].disabled = false;
this.readonlyForm = true; this.readonlyForm = true;
@ -341,6 +346,12 @@
this.updateToSearch(); this.updateToSearch();
}, },
updateToSearch() { updateToSearch() {
if (this.$route.query.frameMode == "add") {
// this.$refs.tab1_form.resetFields();
this.$router.push({path: "/smart/workorder"});
} else {
this.tab1_form = this.original_form;
}
this.tab1_option.column[1].disabled = false; this.tab1_option.column[1].disabled = false;
this.tab1_option.column[2].disabled = false; this.tab1_option.column[2].disabled = false;
this.readonlyForm = true; this.readonlyForm = true;
@ -352,6 +363,26 @@
searchDetail() { searchDetail() {
getDetail(this.$route.query.id).then(res => { getDetail(this.$route.query.id).then(res => {
this.tab1_form = res.data.data; this.tab1_form = res.data.data;
this.original_form = res.data.data;
const charactersPerRow = 20;
let descriptionLen = res.data.data.description.length;
let descriptionLenRows = Math.ceil(descriptionLen / charactersPerRow);
this.tab1_option.column[5].maxRows = descriptionLenRows;
let maintenanceTaskTypeLen = res.data.data.maintenanceTaskType.length;
let maintenanceTaskTypeLenRows = Math.ceil(maintenanceTaskTypeLen / charactersPerRow);
this.tab1_option.column[9].maxRows = maintenanceTaskTypeLenRows;
let processDescriptionLen = res.data.data.processDescription.length;
let processDescriptionLenRows = Math.ceil(processDescriptionLen / charactersPerRow);
this.tab1_option.column[14].maxRows = processDescriptionLenRows;
let handlingResultLen = res.data.data.handlingResult.length;
let handlingResultLenRows = Math.ceil(handlingResultLen / charactersPerRow);
this.tab1_option.column[16].maxRows = handlingResultLenRows;
switch (this.tab1_form.approvalStatus){ switch (this.tab1_form.approvalStatus){
case 1: case 1:
this.form = "审核中"; this.form = "审核中";
@ -467,7 +498,7 @@
this.frame_class = null; this.frame_class = null;
}, },
del() { del() {
this.$confirm("是否将选择数据审核?", { this.$confirm("是否删除?", {
confirmButtonText: "确定", confirmButtonText: "确定",
cancelButtonText: "取消", cancelButtonText: "取消",
type: "warning" type: "warning"
@ -532,6 +563,11 @@
pointer-events: none; pointer-events: none;
} }
.frame_class1 textarea {
overflow: hidden;
}
.check_status_class { .check_status_class {
display: flex; display: flex;
justify-content: flex-end; /* 将子元素推到容器的末端 */ justify-content: flex-end; /* 将子元素推到容器的末端 */

Loading…
Cancel
Save