401b1977 by fanguang Committed by lihua

style

1 parent 987c80e3
......@@ -233,23 +233,19 @@ const tableBtnClick = (scope, btn) => {
} else if (type == 'save') {
saveData(scope)
} else if (type == 'cancel') {
console.log('cancel')
if (row.guid != undefined) {
// row = orginData.value[(page.value.curr - 1) * page.value.limit + scope.$index]
row = JSON.parse(JSON.stringify(orginData.value[scope.$index]))
row.STATE = ''
row.STATUS = ''
tableData.value[scope.$index] = row
console.log('1111')
} else {
tableData.value.splice(scope.$index, 1)
orginData.value.splice(scope.$index, 1)
console.log('2222')
}
tableInfo.value.page.rows = tableData.value.length
// tableInfo.value.page.rows = tableData.value.length
let haveState = tableData.value.some(item => item.STATE)
saveDisabled.value = !haveState
console.log('3333')
} else if (type == 'remove') {
open("是否确定删除所选数据?", "warning");
}
......
<template>
<el-dialog v-model="visible" :title="title" width="900" modal-class="standard-modal">
<el-drawer
v-model="visible"
:title="title"
size="760px"
class="standard-modal"
:close-on-click-modal="false"
>
<el-form :rules="formRules" :model="form" ref="formEl" require-asterisk-position="right">
<el-row>
<el-col :span="12" style="padding-right:10px">
......@@ -75,28 +81,37 @@
</el-select>
</div>
<div class="table-form-item">
<el-select v-if="item.inputTypeCode == 2" v-model="item.dataTypeCode" style="width:220px" size="small" filterable clearable>
<el-select v-if="item.inputTypeCode == 2" v-model="item.dataTypeCode" style="width:160px" size="small" filterable clearable>
<el-option v-for="item in allDictOptions" :label="item.dictTypeName" :value="item.dictTypeName" :key="item.guid"></el-option>
</el-select>
<el-input v-else-if="item.inputTypeCode == 3" v-model="item.validateExpression" placeholder="请输入"></el-input>
</div>
<div class="table-form-operation">
<el-icon color="#4fa1a4" @click="() => addTableItem(index)">
<!-- <el-icon color="#4fa1a4" @click="() => addTableItem(index)">
<CirclePlus />
</el-icon>
<el-icon color="#F56C6C" @click="() => deleteTableItem(index)"><Delete /></el-icon>
</el-icon> -->
<el-icon color="#b2b2b2" @click="() => deleteTableItem(index)"><Delete /></el-icon>
</div>
</div>
<div class="table-form-add">
<el-icon color="#4fa1a4" @click="() => addTableItem(index)">
<CirclePlus />
</el-icon>
<span @click="() => addTableItem(index)" style="cursor: pointer;">添加字段</span>
</div>
</div>
</el-form-item>
</el-col>
</el-row>
</el-form>
<template #footer>
<el-button @click="visible = false" :disabled="confirmLoading">取消</el-button>
<el-button type="primary" @click="confirm" :loading="confirmLoading">确认</el-button>
<div style="text-align:right">
<el-button @click="visible = false" :disabled="confirmLoading">取消</el-button>
<el-button type="primary" @click="confirm" :loading="confirmLoading">确认</el-button>
</div>
</template>
</el-dialog>
</el-drawer>
</template>
<script setup lang="ts">
......@@ -135,7 +150,7 @@ const visible = computed({
}
})
const title = computed(() => {
return props.type === 'add' ? '新建元标准' : '编辑元标准'
return props.type === 'add' ? '新增元数据标准' : '编辑元数据标准'
})
/**
......@@ -195,7 +210,8 @@ const tableFormTpl = {
}
function addTableItem (index) {
const tableObj = { ...tableFormTpl }
form.value.fieldRQVOS.splice(index + 1, 0, tableObj)
// form.value.fieldRQVOS.splice(index + 1, 0, tableObj)
form.value.fieldRQVOS.push(tableObj)
}
function deleteTableItem (index) {
form.value.fieldRQVOS.splice(index, 1)
......@@ -295,8 +311,9 @@ onBeforeMount(() => {
justify-content: flex-start;
}
}
.el-dialog__footer {
.el-drawer__footer {
padding: 10px;
justify-content: flex-end;
}
.el-dialog__body {
height: 500px;
......@@ -309,9 +326,14 @@ onBeforeMount(() => {
padding-right: 10px;
}
.table-form-operation {
flex: 0 0 70px;
padding-left: 6px;
flex: 0 0 30px;
// padding-left: 6px;
}
}
.table-form-add {
display: flex;
align-items: center;
color: #4fa1a4;
}
}
</style>
\ No newline at end of file
......
<template>
<el-dialog
<el-drawer
v-model="visible"
:title="title"
width="600"
modal-class="standard-modal"
width="520"
class="standard-meta-modal"
:close-on-click-modal="false"
>
<el-form :model="form" :rules="formRules" ref="formEl" style="min-height: 200px;" require-asterisk-position="right">
<el-row>
......@@ -36,10 +37,12 @@
</el-row>
</el-form>
<template #footer>
<el-button @click="visible = false" :disabled="confirmLoading">取消</el-button>
<el-button type="primary" @click="confirm" :loading="confirmLoading">确认</el-button>
<div style="text-align:right">
<el-button @click="visible = false" :disabled="confirmLoading">取消</el-button>
<el-button type="primary" @click="confirm" :loading="confirmLoading">确认</el-button>
</div>
</template>
</el-dialog>
</el-drawer>
</template>
<script setup lang="ts">
......@@ -197,15 +200,16 @@ onBeforeMount(() => {
</script>
<style lang="scss">
.standard-modal {
.standard-meta-modal {
.el-form-item {
flex-direction: column;
.el-form-item__label {
justify-content: flex-start;
}
}
.el-dialog__footer {
.el-drawer__footer {
padding: 10px;
justify-content: flex-end;
}
.table-form-wrapper {
......
Styling with Markdown is supported
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!