提交 45c73681 编写于 作者: 刘英杰's avatar 刘英杰

V20240305 1.0.1 添加场地类型表单验证及更改字段

上级 5f40418d
流水线 #24407 已通过 ,包含阶段
in 30 second
.ivu-form-item[data-v-59686c33]{padding-right:15px}.fileRow[data-v-59686c33]{display:flex;justify-content:space-between;align-items:center}.fileRow .delIcon[data-v-59686c33]{color:#ed4014}.fileRow .delIcon[data-v-59686c33]:hover{color:#f16643;cursor:pointer}.searchDiv .ivu-form-item[data-v-7f239dd6]{margin-bottom:12px}.searchDiv .buttonCol[data-v-7f239dd6]{margin-left:auto;text-align:right}.searchDiv .buttonCol .ivu-btn[data-v-7f239dd6]{margin-left:8px}.cyrIcon[data-v-780740c1]{color:#515a6e}.cyrIcon[data-v-780740c1]:hover{color:#757d8f;cursor:pointer}.cyrIcon[data-v-780740c1]:active{color:#3f485c}
\ No newline at end of file
.ivu-form-item[data-v-2a65a7bf]{padding-right:15px}.fileRow[data-v-2a65a7bf]{display:flex;justify-content:space-between;align-items:center}.fileRow .delIcon[data-v-2a65a7bf]{color:#ed4014}.fileRow .delIcon[data-v-2a65a7bf]:hover{color:#f16643;cursor:pointer}.mainDiv[data-v-159b2d98]{width:100%;height:100%;display:flex;flex-wrap:wrap;justify-content:space-between}.mainDiv .bigCard[data-v-159b2d98],.mainDiv .smallCard[data-v-159b2d98]{margin-bottom:16px}.mainDiv .bigCard[data-v-159b2d98] .ivu-card-body,.mainDiv .smallCard[data-v-159b2d98] .ivu-card-body{height:calc(100% - 51px)}.mainDiv .bigCard[data-v-159b2d98] .ivu-card-body .ivu-form-item,.mainDiv .smallCard[data-v-159b2d98] .ivu-card-body .ivu-form-item{margin-bottom:12px}.mainDiv .bigCard[data-v-159b2d98]{width:calc(50% - 8px)}.mainDiv .smallCard[data-v-159b2d98]{width:calc(33.33333% - 10.66667px)}.mainDiv[data-v-159b2d98] .kjyyCard .ivu-card-body{overflow:auto}.mainDiv[data-v-159b2d98] .kjyyCard .ivu-card-body p[name=fastCP]{display:flex;justify-content:space-between}.mainDiv[data-v-159b2d98] .kjyyCard .ivu-card-body p[name=fastCP] a[name=del]{color:#ed4014}.mainDiv[data-v-159b2d98] .kjyyCard .ivu-card-body p[name=fastCP] a[name=del]:hover{color:#f16643}.mainDiv[data-v-159b2d98] .kjyyCard .ivu-card-body p[name=fastCP] a[name=del]:active{color:#e13d13}.mainDiv[data-v-159b2d98] .cplhsCard .ivu-card-body{display:flex;flex-direction:column;justify-content:space-evenly}.mainDiv[data-v-159b2d98] .save-bt{text-align:right;position:absolute;bottom:16px;right:16px}
\ No newline at end of file
.ivu-form-item[data-v-59686c33]{padding-right:15px}.fileRow[data-v-59686c33]{display:flex;justify-content:space-between;align-items:center}.fileRow .delIcon[data-v-59686c33]{color:#ed4014}.fileRow .delIcon[data-v-59686c33]:hover{color:#f16643;cursor:pointer}.mainDiv[data-v-159b2d98]{width:100%;height:100%;display:flex;flex-wrap:wrap;justify-content:space-between}.mainDiv .bigCard[data-v-159b2d98],.mainDiv .smallCard[data-v-159b2d98]{margin-bottom:16px}.mainDiv .bigCard[data-v-159b2d98] .ivu-card-body,.mainDiv .smallCard[data-v-159b2d98] .ivu-card-body{height:calc(100% - 51px)}.mainDiv .bigCard[data-v-159b2d98] .ivu-card-body .ivu-form-item,.mainDiv .smallCard[data-v-159b2d98] .ivu-card-body .ivu-form-item{margin-bottom:12px}.mainDiv .bigCard[data-v-159b2d98]{width:calc(50% - 8px)}.mainDiv .smallCard[data-v-159b2d98]{width:calc(33.33333% - 10.66667px)}.mainDiv[data-v-159b2d98] .kjyyCard .ivu-card-body{overflow:auto}.mainDiv[data-v-159b2d98] .kjyyCard .ivu-card-body p[name=fastCP]{display:flex;justify-content:space-between}.mainDiv[data-v-159b2d98] .kjyyCard .ivu-card-body p[name=fastCP] a[name=del]{color:#ed4014}.mainDiv[data-v-159b2d98] .kjyyCard .ivu-card-body p[name=fastCP] a[name=del]:hover{color:#f16643}.mainDiv[data-v-159b2d98] .kjyyCard .ivu-card-body p[name=fastCP] a[name=del]:active{color:#e13d13}.mainDiv[data-v-159b2d98] .cplhsCard .ivu-card-body{display:flex;flex-direction:column;justify-content:space-evenly}.mainDiv[data-v-159b2d98] .save-bt{text-align:right;position:absolute;bottom:16px;right:16px}
\ No newline at end of file
.ivu-form-item[data-v-2a65a7bf]{padding-right:15px}.fileRow[data-v-2a65a7bf]{display:flex;justify-content:space-between;align-items:center}.fileRow .delIcon[data-v-2a65a7bf]{color:#ed4014}.fileRow .delIcon[data-v-2a65a7bf]:hover{color:#f16643;cursor:pointer}.searchDiv .ivu-form-item[data-v-7f239dd6]{margin-bottom:12px}.searchDiv .buttonCol[data-v-7f239dd6]{margin-left:auto;text-align:right}.searchDiv .buttonCol .ivu-btn[data-v-7f239dd6]{margin-left:8px}
\ No newline at end of file
.ivu-form-item[data-v-59686c33]{padding-right:15px}.fileRow[data-v-59686c33]{display:flex;justify-content:space-between;align-items:center}.fileRow .delIcon[data-v-59686c33]{color:#ed4014}.fileRow .delIcon[data-v-59686c33]:hover{color:#f16643;cursor:pointer}.searchDiv .ivu-form-item[data-v-7f239dd6]{margin-bottom:12px}.searchDiv .buttonCol[data-v-7f239dd6]{margin-left:auto;text-align:right}.searchDiv .buttonCol .ivu-btn[data-v-7f239dd6]{margin-left:8px}
\ No newline at end of file
.ivu-form-item[data-v-2a65a7bf]{padding-right:15px}.fileRow[data-v-2a65a7bf]{display:flex;justify-content:space-between;align-items:center}.fileRow .delIcon[data-v-2a65a7bf]{color:#ed4014}.fileRow .delIcon[data-v-2a65a7bf]:hover{color:#f16643;cursor:pointer}.searchDiv .ivu-form-item[data-v-7f239dd6]{margin-bottom:12px}.searchDiv .buttonCol[data-v-7f239dd6]{margin-left:auto;text-align:right}.searchDiv .buttonCol .ivu-btn[data-v-7f239dd6]{margin-left:8px}
\ No newline at end of file
.ivu-form-item[data-v-59686c33]{padding-right:15px}.fileRow[data-v-59686c33]{display:flex;justify-content:space-between;align-items:center}.fileRow .delIcon[data-v-59686c33]{color:#ed4014}.fileRow .delIcon[data-v-59686c33]:hover{color:#f16643;cursor:pointer}.searchDiv .ivu-form-item[data-v-7f239dd6]{margin-bottom:12px}.searchDiv .buttonCol[data-v-7f239dd6]{margin-left:auto;text-align:right}.searchDiv .buttonCol .ivu-btn[data-v-7f239dd6]{margin-left:8px}
\ No newline at end of file
.ivu-form-item[data-v-2a65a7bf]{padding-right:15px}.fileRow[data-v-2a65a7bf]{display:flex;justify-content:space-between;align-items:center}.fileRow .delIcon[data-v-2a65a7bf]{color:#ed4014}.fileRow .delIcon[data-v-2a65a7bf]:hover{color:#f16643;cursor:pointer}.searchDiv .ivu-form-item[data-v-7f239dd6]{margin-bottom:12px}.searchDiv .buttonCol[data-v-7f239dd6]{margin-left:auto;text-align:right}.searchDiv .buttonCol .ivu-btn[data-v-7f239dd6]{margin-left:8px}.demo-split[data-v-6f29bbfa]{height:calc(100vh - 112px)}.demo-split .demo-split-pane-L[data-v-6f29bbfa]{padding:10px;height:100%;background-color:#fff}.demo-split .demo-split-pane-R[data-v-6f29bbfa]{padding-left:24px}
\ No newline at end of file
.ivu-form-item[data-v-59686c33]{padding-right:15px}.fileRow[data-v-59686c33]{display:flex;justify-content:space-between;align-items:center}.fileRow .delIcon[data-v-59686c33]{color:#ed4014}.fileRow .delIcon[data-v-59686c33]:hover{color:#f16643;cursor:pointer}.searchDiv .ivu-form-item[data-v-7f239dd6]{margin-bottom:12px}.searchDiv .buttonCol[data-v-7f239dd6]{margin-left:auto;text-align:right}.searchDiv .buttonCol .ivu-btn[data-v-7f239dd6]{margin-left:8px}.demo-split[data-v-6f29bbfa]{height:calc(100vh - 112px)}.demo-split .demo-split-pane-L[data-v-6f29bbfa]{padding:10px;height:100%;background-color:#fff}.demo-split .demo-split-pane-R[data-v-6f29bbfa]{padding-left:24px}
\ No newline at end of file
.ivu-form-item[data-v-2a65a7bf]{padding-right:15px}.fileRow[data-v-2a65a7bf]{display:flex;justify-content:space-between;align-items:center}.fileRow .delIcon[data-v-2a65a7bf]{color:#ed4014}.fileRow .delIcon[data-v-2a65a7bf]:hover{color:#f16643;cursor:pointer}.searchDiv .ivu-form-item[data-v-7f239dd6]{margin-bottom:12px}.searchDiv .buttonCol[data-v-7f239dd6]{margin-left:auto;text-align:right}.searchDiv .buttonCol .ivu-btn[data-v-7f239dd6]{margin-left:8px}
\ No newline at end of file
.ivu-form-item[data-v-59686c33]{padding-right:15px}.fileRow[data-v-59686c33]{display:flex;justify-content:space-between;align-items:center}.fileRow .delIcon[data-v-59686c33]{color:#ed4014}.fileRow .delIcon[data-v-59686c33]:hover{color:#f16643;cursor:pointer}.searchDiv .ivu-form-item[data-v-7f239dd6]{margin-bottom:12px}.searchDiv .buttonCol[data-v-7f239dd6]{margin-left:auto;text-align:right}.searchDiv .buttonCol .ivu-btn[data-v-7f239dd6]{margin-left:8px}
\ No newline at end of file
.ivu-form-item[data-v-2a65a7bf]{padding-right:15px}.fileRow[data-v-2a65a7bf]{display:flex;justify-content:space-between;align-items:center}.fileRow .delIcon[data-v-2a65a7bf]{color:#ed4014}.fileRow .delIcon[data-v-2a65a7bf]:hover{color:#f16643;cursor:pointer}.searchDiv .ivu-form-item[data-v-7f239dd6]{margin-bottom:12px}.searchDiv .buttonCol[data-v-7f239dd6]{margin-left:auto;text-align:right}.searchDiv .buttonCol .ivu-btn[data-v-7f239dd6]{margin-left:8px}
\ No newline at end of file
.ivu-form-item[data-v-59686c33]{padding-right:15px}.fileRow[data-v-59686c33]{display:flex;justify-content:space-between;align-items:center}.fileRow .delIcon[data-v-59686c33]{color:#ed4014}.fileRow .delIcon[data-v-59686c33]:hover{color:#f16643;cursor:pointer}.searchDiv .ivu-form-item[data-v-7f239dd6]{margin-bottom:12px}.searchDiv .buttonCol[data-v-7f239dd6]{margin-left:auto;text-align:right}.searchDiv .buttonCol .ivu-btn[data-v-7f239dd6]{margin-left:8px}
\ No newline at end of file
.ivu-form-item[data-v-2a65a7bf]{padding-right:15px}.fileRow[data-v-2a65a7bf]{display:flex;justify-content:space-between;align-items:center}.fileRow .delIcon[data-v-2a65a7bf]{color:#ed4014}.fileRow .delIcon[data-v-2a65a7bf]:hover{color:#f16643;cursor:pointer}.searchDiv .ivu-form-item[data-v-7f239dd6]{margin-bottom:12px}.searchDiv .buttonCol[data-v-7f239dd6]{margin-left:auto;text-align:right}.searchDiv .buttonCol .ivu-btn[data-v-7f239dd6]{margin-left:8px}.cyrIcon[data-v-6d449fff]{color:#515a6e}.cyrIcon[data-v-6d449fff]:hover{color:#757d8f;cursor:pointer}.cyrIcon[data-v-6d449fff]:active{color:#3f485c}
\ No newline at end of file
.ivu-form-item[data-v-2a65a7bf]{padding-right:15px}.fileRow[data-v-2a65a7bf]{display:flex;justify-content:space-between;align-items:center}.fileRow .delIcon[data-v-2a65a7bf]{color:#ed4014}.fileRow .delIcon[data-v-2a65a7bf]:hover{color:#f16643;cursor:pointer}.searchDiv .ivu-form-item[data-v-7f239dd6]{margin-bottom:12px}.searchDiv .buttonCol[data-v-7f239dd6]{margin-left:auto;text-align:right}.searchDiv .buttonCol .ivu-btn[data-v-7f239dd6]{margin-left:8px}
\ No newline at end of file
.ivu-form-item[data-v-59686c33]{padding-right:15px}.fileRow[data-v-59686c33]{display:flex;justify-content:space-between;align-items:center}.fileRow .delIcon[data-v-59686c33]{color:#ed4014}.fileRow .delIcon[data-v-59686c33]:hover{color:#f16643;cursor:pointer}.searchDiv .ivu-form-item[data-v-7f239dd6]{margin-bottom:12px}.searchDiv .buttonCol[data-v-7f239dd6]{margin-left:auto;text-align:right}.searchDiv .buttonCol .ivu-btn[data-v-7f239dd6]{margin-left:8px}
\ No newline at end of file
<!DOCTYPE html><html><head><meta charset=utf-8><meta http-equiv=X-UA-Compatible content="IE=edge"><meta name=viewport content="width=device-width,initial-scale=1,maximum-scale=1,user-scalable=0"><link rel="shortcut icon" href=favicon.ico><title>场地管理</title><link href=css/app.f8f860e0.css rel=stylesheet></head><body><script src=/a/manager/identify/identify.js></script><noscript><strong>请开启 JavaScript 功能来使用 场地管理。</strong></noscript><div id=app></div><script src=js/chunk-vendors.c0d93cbb.js></script><script src=js/app.eca2c929.js></script></body></html>
\ No newline at end of file
<!DOCTYPE html><html><head><meta charset=utf-8><meta http-equiv=X-UA-Compatible content="IE=edge"><meta name=viewport content="width=device-width,initial-scale=1,maximum-scale=1,user-scalable=0"><link rel="shortcut icon" href=favicon.ico><title>场地管理</title><link href=css/app.f8f860e0.css rel=stylesheet></head><body><script src=/a/manager/identify/identify.js></script><noscript><strong>请开启 JavaScript 功能来使用 场地管理。</strong></noscript><div id=app></div><script src=js/chunk-vendors.c0d93cbb.js></script><script src=js/app.cf2ce0b7.js></script></body></html>
\ No newline at end of file
此差异已折叠。
此差异已折叠。
此差异已折叠。
此差异已折叠。
此差异已折叠。
此差异已折叠。
......@@ -228,11 +228,12 @@ export default {
this.isDetails = false
this.uploadBtLoading = []
if (addOrEdit == 'add') {
this.$refs.form.resetFields() //重置状态
this.modalTitle = title ? title : '新增'
this.formData = row ? cloneDeep(row) : {}
} else if (addOrEdit == 'edit') {
this.modalTitle = '编辑'
this.$refs.form.resetFields()
this.formData = cloneDeep(row)
// 时间范围处理
......@@ -303,6 +304,7 @@ export default {
if (tri != -1) {
let id = this.formItem[tri].id
obj[id] = obj[id].join('-')
}
this.$emit('onSubmit', obj)
......
......@@ -753,6 +753,7 @@ export default {
// console.log('编辑行', row)
// this.editModalshow = true
// this.editModalLoading = true
// this.asc.getApiActivityGetActivityInfo({id:row.id}).then(res => {
// console.log('编辑详情', res)
// this.$refs.ceditmodal.modalInit('edit', res.response)
......
......@@ -10,7 +10,7 @@
@onReset="reset"></SearchCondForm>
<Button type="primary" class="ivu-ml-8" @click="add"><Icon type="md-add"/>新增</Button>
<!-- 数据table -->
<CTable
:tableColumns="tableColumns.filter(a => a.show)"
......@@ -35,6 +35,7 @@
ref="ceditmodal"
v-model="editModalshow"
:formItem="formItem"
:formRule="formRule"
:loading="editModalLoading"
:formLabelWidth="100"
:width="1000"
......@@ -91,7 +92,7 @@ export default {
{ key: 'time_split', title: '分割时间段(分钟)', align: 'center', minWidth: 150, show: true },
{ key: 'instructions', title: '使用须知', align: 'center', minWidth: 300, show: true, tooltip: true, tooltipMaxWidth: 800 },
{ key: 'read_time', title: '阅读时间(秒)', align: 'center', minWidth: 120, show: true },
{ key: 'service_interval_time', title: '时间范围', align: 'center', minWidth: 120, show: true },
{ key: 'service_interval_time', title: '场地开放时间', align: 'center', minWidth: 120, show: true },
// { key: 'is_enable', title: '启用', align: 'center', minWidth: 80, show: true },
{ slot: 'generalSwitch', title: '启用', align: 'center', minWidth: 80, show: true },
{ slot: 'other', title: '其他', align: 'center', minWidth: 80, show: true, fixed: 'right' },
......@@ -99,7 +100,7 @@ export default {
],
tableLoading: false,
tableData:[],
tableSize: 'default',
tableFullscreen: false,
......@@ -110,14 +111,22 @@ export default {
editModalLoading: false,
// 新增编辑表单项
formItem: [
{ id: 'place_type_name', name: '场地类型名称', type: 'input', disabled: false, require: false, optList: [] },
{ id: 'time_split', name: '分割时间段(分钟)', type: 'input', disabled: false, require: false, optList: [] },
{ id: 'place_type_name', name: '场地类型名称', type: 'input', disabled: false, require: true, optList: [] },
{ id: 'time_split', name: '分割时间段(分钟)', type: 'input', disabled: false, require: true, optList: [] },
{ id: 'read_time', name: '阅读时间(秒)', type: 'input', disabled: false, require: false, optList: [] },
{ id: 'service_interval_time', name: '时间范围', type: 'timerange', disabled: false, require: false, optList: [] },
{ id: 'service_interval_time', name: '场地开放时间', type: 'timerange', disabled: false, require: true, optList: [] },
{ id: 'instructions', name: '使用须知', type: 'textarea', disabled: false, require: false, optList: [], rows: 2 },
// { id: 'file_id', name: '附件', type: 'file', disabled: false, require: false, optList: [] },
{ id: 'is_enable', name: '启用', type: 'switch', disabled: false, require: false, optList: [] },
],
//表单校验
formRule:{
place_type_name: [{ required: true,type:'string', message: '场地名称不能为空', trigger: 'change' }],
time_split: [{ required: true,type:'number', message: '分割时间段不能为空', trigger: 'change' }],
service_interval_time: [
{ required: true,type:'array', message: '场地开放时间不能为空', trigger: 'change' },
],
},
defaultFormData: {
id: "",
place_type_name: "",
......@@ -219,16 +228,19 @@ export default {
// 新增
add(){
this.editModalshow = true
this.$refs.ceditmodal.modalInit('add', this.defaultFormData, '新增场地类型')
},
// 编辑
rowEdit(row){
// console.log('编辑行', row)
this.editModalshow = true
this.editModalshow = true
this.editModalLoading = true
this.asc.getApiPlaceTypeGetPlaceTypeInfo({id:row.id}).then(res => {
// console.log('编辑详情', res)
this.$refs.ceditmodal.modalInit('edit', res.response)
this.editModalLoading = false
})
......@@ -269,7 +281,7 @@ export default {
}
})
},
// 更改页码
onPageChange(val) {
this.params.page_index = val
......@@ -282,7 +294,7 @@ export default {
this.onPageChange(1)
}
},
// 更改物资页码
onCmdPageChange(val) {
this.cmdParams.page_index = val
......@@ -295,7 +307,7 @@ export default {
this.onCmdPageChange(1)
}
},
// 物资树格式化
treeFormat(arr) {
return arr.map(a => {
......@@ -315,4 +327,4 @@ export default {
<style scoped lang="less">
</style>
\ No newline at end of file
</style>
......@@ -80,10 +80,7 @@ service.interceptors.request.use(
config.headers['X-Token'] = token;
if(config.url === '/api/Common/FileUpload'){
config.headers['content-type'] = 'multipart/form-data';
console.log("🚀🚀multipart🚀,",)
}else {
console.log("🚀🚀application🚀,",)
config.headers['content-type'] = 'application/json';
}
// config.headers['content-type'] = 'multipart/form-data';
......
......@@ -37,6 +37,8 @@ router.beforeEach(async (to, from, next) => {
if (Setting.showProgressBar) iView.LoadingBar.start();
// 判断是否需要登录才可以进入
if (to.matched.some(_ => _.meta.auth)) {
// next();
// 这里依据 token 判断是否登录,可视情况修改
const token = util.cookies.get('site-management-token');
......
Markdown 格式
0% or
您添加了 0 人 到此讨论。请谨慎行事。
先完成此消息的编辑!
想要评论请 注册 或