750abf7a by 任超

style:字典

1 parent c1e5e8b5
......@@ -52,7 +52,7 @@ export function realMove (bsmDict, operate, data) {
if (arr.length) {
let flag = false;
for (let i in arr) {
if (arr[i].bsmDict == bsmDict) {
if (arr[i].dictid == bsmDict) {
if (operate === "UP") {
arr[i] = arr.splice(i - 1, 1, arr[i])[0];
} else if (operate === "DOWN") {
......@@ -111,30 +111,30 @@ export function down (index, data) {
}
}
export function timeFormat(date,end) {
if (!date || typeof(date) === "string") {
this.error("参数异常,请检查...");
export function timeFormat (date, end) {
if (!date || typeof (date) === "string") {
this.error("参数异常,请检查...");
}
var y = date.getFullYear(); //年
var m = date.getMonth() + 1; //月
var d = date.getDate(); //日
if (end) {
return y + "/" + m + "/" + d + ' 23:59:59';
}else{
} else {
return y + "/" + m + "/" + d + ' 00:00:00';
}
}
export function getFirstDayOfSeason (d) {
let date = d || new Date()
var month = date.getMonth();
if(month <3 ){
date.setMonth(0);
}else if(2 < month && month < 6){
date.setMonth(3);
}else if(5 < month && month < 9){
date.setMonth(6);
}else if(8 < month && month < 11){
date.setMonth(9);
if (month < 3) {
date.setMonth(0);
} else if (2 < month && month < 6) {
date.setMonth(3);
} else if (5 < month && month < 9) {
date.setMonth(6);
} else if (8 < month && month < 11) {
date.setMonth(9);
}
date.setDate(1);
return timeFormat(date);
......
<template>
<!-- 编辑 -->
<dialogBox
submitForm="submitForm"
class="tableClass"
@closeDialog="closeDialog"
@submitForm="handleSubmit"
width="60%"
v-model="myValue"
:isMain="true"
title="字典信息"
>
<dialogBox submitForm="submitForm" class="tableClass" @closeDialog="closeDialog" @submitForm="handleSubmit"
width="60%" v-model="myValue" :isMain="true" title="字典信息">
<div class="editDialogBox-box ">
<el-form :model="ruleForm" ref="ruleForm" label-width="100px">
<el-row :gutter="20">
......@@ -25,17 +17,9 @@
</el-col>
</el-row>
</el-form>
<lb-table
:column="column"
class="loadingtext opacity-input"
:heightNum="600"
:key="key"
:expand-row-keys="keyList"
row-key="dictid"
:tree-props="{ children: 'children' }"
:pagination="false"
:data="tableData"
>
<lb-table :column="column" class="loadingtext opacity-input" :heightNum="600" :key="key"
:expand-row-keys="keyList" row-key="dictid" :tree-props="{ children: 'children' }" :pagination="false"
:data="tableData">
</lb-table>
</div>
</dialogBox>
......@@ -249,6 +233,7 @@ export default {
this.tableData.forEach((item, index) => {
item.index = index + 1;
})
this.tableData = judgeSort(this.tableData)
})
},
immediate: true
......@@ -374,15 +359,15 @@ export default {
// 上移下移
moveUpward (index, row) {
realMove(row.dictid, "UP", this.tableData);
this.key++;
let id = findParents(this.tableData, row.dictid);
this.keyList = id;
this.key++;
},
moveDown (index, row) {
realMove(row.dictid, "DOWN", this.tableData);
this.key++;
let id = findParents(this.tableData, row.dictid);
this.keyList = id;
this.key++;
},
},
};
......@@ -413,11 +398,13 @@ export default {
align-items: center;
justify-content: center;
}
.editDialogBox-box{
margin:14px 18px 30px 18px !important
}
.opacity-input{
/deep/ .el-input__inner{
.editDialogBox-box {
margin: 14px 18px 30px 18px !important
}
.opacity-input {
/deep/ .el-input__inner {
background-color: transparent;
border: 1px solid #458ACF;
}
......
......@@ -29,25 +29,9 @@ class data extends filter {
{
prop: "DNAME",
label: "字典类型名称",
},
// {
// label: "是否允许修改",
// width: '150',
// render: (h, scope) => {
// return (
// <div>
// {
// scope.row.ISENABLE == '1' ?
// <div class='allow'>允许</div> :
// <div class='prohibit'>禁止</div>
// }
// </div>
// )
// }
// }
}
]
}
}
let datas = new data()
export {
......