5b2e76f2 by 任超

style:字典

1 parent 316edede
......@@ -25,6 +25,7 @@
.el-dialog__body {
max-height: 88vh;
overflow-x: hidden;
overflow-y: hidden;
}
.dialog_footer {
......
......@@ -45,11 +45,11 @@ export default {
column: [],
columns: [
{
width: '60',
width: '70',
renderHeader: (h, scope) => {
return (<div>
{
this.details.isenable == 2 ?
this.details.isenable === '0' ?
<span>序号</span> :
<i class="el-icon-plus" onClick={() => { this.handleAdd() }} style="cursor:pointer;color:#409EFF"></i>
}
......@@ -68,14 +68,14 @@ export default {
render: (h, scope) => {
return (
<div>
<el-input placeholder="字典项编码" disabled={this.details.isenable == 2} v-show={scope.row.codeShow} v-fo value={scope.row[scope.column.property]}
<el-input placeholder="字典项编码" disabled={this.details.isenable === '0'} v-show={scope.row.codeShow} v-fo value={scope.row[scope.column.property]}
onFocus={() => { this.itemShowFalse(); scope.row.codeShow = true; }}
onInput={(val) => { scope.row[scope.column.property] = val }}></el-input>
onInput={(val) => { scope.row[scope.column.property] = val }} maxlength='8'></el-input>
<el-input placeholder="字典项编码" disabled={this.details.isenable == 2} v-show={!scope.row.codeShow} value={scope.row[scope.column.property]}
<el-input placeholder="字典项编码" disabled={this.details.isenable === '0'} v-show={!scope.row.codeShow} value={scope.row[scope.column.property]}
onFocus={() => { this.itemShowFalse(); scope.row.codeShow = true; }}
onInput={(val) => { scope.row[scope.column.property] = val }}></el-input>
onInput={(val) => { scope.row[scope.column.property] = val }} maxlength='8'></el-input>
</div>
)
}
......@@ -86,11 +86,11 @@ export default {
render: (h, scope) => {
return (
<div>
<el-input placeholder="字典项编码" disabled={this.details.isenable == 2} v-show={scope.row.nameShow} v-fo value={scope.row[scope.column.property]}
<el-input placeholder="字典项编码" disabled={this.details.isenable === '0'} v-show={scope.row.nameShow} v-fo value={scope.row[scope.column.property]}
onFocus={() => { this.itemShowFalse(); scope.row.nameShow = true; }}
onInput={(val) => { scope.row[scope.column.property] = val }}></el-input>
<el-input placeholder="字典项名称" disabled={this.details.isenable == 2} v-show={!scope.row.nameShow} value={scope.row[scope.column.property]}
<el-input placeholder="字典项名称" disabled={this.details.isenable === '0'} v-show={!scope.row.nameShow} value={scope.row[scope.column.property]}
onFocus={() => { this.itemShowFalse(); scope.row.nameShow = true; }}
onInput={(val) => { scope.row[scope.column.property] = val }}></el-input>
</div>
......@@ -98,32 +98,19 @@ export default {
}
},
{
prop: 'isenable',
width: '160',
label: '是否禁用',
render: (h, scope) => {
return (
<el-radio-group disabled={this.details.isenable == 2} v-model={scope.row.isenable}>
<el-radio label="1">启用</el-radio>
<el-radio label="0">禁用</el-radio>
</el-radio-group>
)
}
},
{
prop: 'normcode',
label: '部标编码',
width: '100',
render: (h, scope) => {
return (
<div>
<el-input placeholder="部标编码" disabled={this.details.isenable == 2} v-show={scope.row.nameShow} v-fo value={scope.row[scope.column.property]}
onFocus={() => { this.itemShowFalse(); scope.row.nameShow = true; }}
onInput={(val) => { scope.row[scope.column.property] = val }}></el-input>
<el-input placeholder="部标编码" disabled={this.details.isenable === '0'} v-show={scope.row.normcodeShow} v-fo value={scope.row[scope.column.property]}
onFocus={() => { this.itemShowFalse(); scope.row.normcodeShow = true; }}
onInput={(val) => { scope.row[scope.column.property] = val }} maxlength='8'></el-input>
<el-input placeholder="部标编码" disabled={this.details.isenable == 2} v-show={!scope.row.nameShow} value={scope.row[scope.column.property]}
onFocus={() => { this.itemShowFalse(); scope.row.nameShow = true; }}
onInput={(val) => { scope.row[scope.column.property] = val }}></el-input>
<el-input placeholder="部标编码" disabled={this.details.isenable === '0'} v-show={!scope.row.normcodeShow} value={scope.row[scope.column.property]}
onFocus={() => { this.itemShowFalse(); scope.row.normcodeShow = true; }}
onInput={(val) => { scope.row[scope.column.property] = val }} maxlength='8'></el-input>
</div>
)
}
......@@ -134,18 +121,31 @@ export default {
render: (h, scope) => {
return (
<div>
<el-input placeholder="部标名称" disabled={this.details.isenable == 2} v-show={scope.row.nameShow} v-fo value={scope.row[scope.column.property]}
onFocus={() => { this.itemShowFalse(); scope.row.nameShow = true; }}
<el-input placeholder="部标名称" disabled={this.details.isenable === '0'} v-show={scope.row.normnameShow} v-fo value={scope.row[scope.column.property]}
onFocus={() => { this.itemShowFalse(); scope.row.normnameShow = true; }}
onInput={(val) => { scope.row[scope.column.property] = val }}></el-input>
<el-input placeholder="部标名称" disabled={this.details.isenable == 2} v-show={!scope.row.nameShow} value={scope.row[scope.column.property]}
onFocus={() => { this.itemShowFalse(); scope.row.nameShow = true; }}
<el-input placeholder="部标名称" disabled={this.details.isenable === '0'} v-show={!scope.row.normnameShow} value={scope.row[scope.column.property]}
onFocus={() => { this.itemShowFalse(); scope.row.normnameShow = true; }}
onInput={(val) => { scope.row[scope.column.property] = val }}></el-input>
</div>
)
}
},
{
prop: 'isenable',
width: '160',
label: '是否禁用',
render: (h, scope) => {
return (
<el-radio-group disabled={this.details.isenable === '0'} v-model={scope.row.isenable}>
<el-radio label="1">启用</el-radio>
<el-radio label="0">禁用</el-radio>
</el-radio-group>
)
}
},
{
width: '130',
label: '移动',
render: (h, scope) => {
......@@ -197,9 +197,14 @@ export default {
data.forEach((item, index) => {
if (index == 0) {
item.codeShow = true
item.nameShow = false
item.normcodeShow = false
item.normnameShow = false
} else {
item.codeShow = false
item.nameShow = false
item.normcodeShow = false
item.normnameShow = false
}
if (isAdd) {
item.index = index + 1
......@@ -213,6 +218,8 @@ export default {
this.tableData.forEach((item, index) => {
item.codeShow = false
item.nameShow = false
item.normcodeShow = false
item.normnameShow = false
})
},
handleMinus (index, row) {
......
......@@ -17,7 +17,7 @@
</el-col>
</el-row>
</el-form>
<lb-table :column="column" border :key="key" :heightNum="405" :pagination="false" :data="tableData">
<lb-table :column="column" border :key="key" heightNumSetting :pagination="false" :data="tableData">
</lb-table>
</div>
</template>
......
......@@ -17,8 +17,7 @@
</el-col>
</el-row>
</el-form>
<lb-table :column="column" border :key="key" :heightNum="390" :pagination="false" heightNumSetting
:data="tableData">
<lb-table :column="column" border :key="key" :pagination="false" heightNumSetting :data="tableData">
</lb-table>
</div>
</template>
......