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

main
liuyiliang 11 months 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() {
setTimeout(() => {
let menuList = window.sessionStorage.getItem('master-menuAll');
console.log(menuList)
if (menuList) {
for (var index = 0; index < JSON.parse(menuList).length; index++) {
this.data.push({

@ -10,7 +10,7 @@ export default {
const params = this.$route.query
const state = params.state
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>

@ -25,6 +25,7 @@
<i slot="prefix"
class="icon-yonghu"></i>
</el-input>
<div class="el-form-item__error" v-show="errorMsg.account" v-text="errorMsg.account"/>
</el-form-item>
<el-form-item prop="password">
<div class="login-sub-title">密码</div>
@ -55,11 +56,11 @@
</el-col>
<el-col :span="8">
<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>
</el-col>
</el-row>
<div class="el-form-item__error" v-show="errorMsg.code" v-text="errorMsg.code"/>
</el-form-item>
<el-form-item>
<el-button type="primary"
@ -112,7 +113,11 @@
{min: 1, message: "密码长度最少为6位", trigger: "blur"}
]
},
passwordType: "password"
passwordType: "password",
errorMsg: {
account: null,
code: null
}
};
},
created() {
@ -139,6 +144,10 @@
: (this.passwordType = "");
},
handleLogin() {
this.errorMsg = {
account: null,
code: null
};
this.$refs.loginForm.validate(valid => {
if (valid) {
const loading = this.$loading({
@ -149,8 +158,13 @@
this.$store.dispatch("LoginByUsername", this.loginForm).then(() => {
this.$router.push({path: this.tagWel.value});
loading.close();
}).catch(() => {
}).catch((error) => {
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 {
height: 540px !important;
}
.el-table .cell {
white-space: nowrap;
overflow: hidden;
text-overflow: ellipsis;
}

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

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

Loading…
Cancel
Save