Commit 03e21c7d authored by qinj's avatar qinj

Merge branch 'dev' of http://120.25.63.219:6088/rex/portalhtml into dev

parents 5735600e b8b7f243
...@@ -163,6 +163,14 @@ export default { ...@@ -163,6 +163,14 @@ export default {
return finalColumns return finalColumns
} }
}, },
watch: {
url: {
handler(newVal) {
},
deep: true
}
},
created() { created() {
// 根据url是否有值确定是否需要请求 // 根据url是否有值确定是否需要请求
if (this.url) { if (this.url) {
......
<template> <template>
<div v-if="addBtnStart"> <div>
<FileTable :type-code="typeCode" :objectID='objectId' /> <FileTable :type-code="typeCode" :objectID='objectId' :form-data="$attrs['form-data']"/>
</div> </div>
</template> </template>
...@@ -13,10 +13,10 @@ export default { ...@@ -13,10 +13,10 @@ export default {
FileTable FileTable
}, },
props: { props: {
addBtnStart: { // addBtnStart: {
type: Boolean, // type: Boolean,
default: false // default: false
}, // },
objectId: { objectId: {
type: String, type: String,
default: '' default: ''
...@@ -24,17 +24,18 @@ export default { ...@@ -24,17 +24,18 @@ export default {
}, },
data() { data() {
return { return {
typeCode: uploadCode.customer typeCode: uploadCode.customer,
// addBtnStart: false
} }
}, },
watch: { watch: {
addBtnStart: { // addBtnStart: {
handler(newVal) { // handler(newVal) {
console.log(newVal) // console.log(newVal)
}, // },
immediate: true, // immediate: true,
deep: true // deep: true
}, // },
objectId: { objectId: {
handler(newVal) { handler(newVal) {
// constant.tableConfig.initialParams = { // constant.tableConfig.initialParams = {
...@@ -44,6 +45,9 @@ export default { ...@@ -44,6 +45,9 @@ export default {
immediate: true, immediate: true,
deep: true deep: true
} }
},
created() {
// this.addBtnStart = this.$route.query.addBtnStart
} }
} }
</script> </script>
......
<template> <template>
<div v-if="addBtnStart"> <div>
<BusinessTable v-bind="constant"/> <BusinessTable v-bind="constant"/>
</div> </div>
</template> </template>
...@@ -9,10 +9,10 @@ import constant from './constant' ...@@ -9,10 +9,10 @@ import constant from './constant'
export default { export default {
props: { props: {
addBtnStart: { // addBtnStart: {
type: Boolean, // type: Boolean,
default: false // default: true
}, // },
objectId: { objectId: {
type: String, type: String,
default: '' default: ''
...@@ -20,17 +20,18 @@ export default { ...@@ -20,17 +20,18 @@ export default {
}, },
data() { data() {
return { return {
constant: {} constant: {},
// addBtnStart: true
} }
}, },
watch: { watch: {
addBtnStart: { // addBtnStart: {
handler(newVal) { // handler(newVal) {
console.log(newVal) // console.log(newVal)
}, // },
immediate: true, // immediate: true,
deep: true // deep: true
}, // },
objectId: { objectId: {
handler(newVal) { handler(newVal) {
constant.tableConfig.initialParams = { constant.tableConfig.initialParams = {
...@@ -43,6 +44,7 @@ export default { ...@@ -43,6 +44,7 @@ export default {
} }
}, },
created() { created() {
// this.addBtnStart = this.$route.query.addBtnStart
var config = JSON.parse(JSON.stringify(constant)) var config = JSON.parse(JSON.stringify(constant))
config.tableConfig.columns.handle = { config.tableConfig.columns.handle = {
label: '操作', label: '操作',
......
...@@ -12,8 +12,12 @@ ...@@ -12,8 +12,12 @@
@request-success="handleSuccess" @request-success="handleSuccess"
/> />
</div> </div>
<customerAddAddress :addBtnStart='addBtnStart' :objectId='objectId' :form-data="$attrs['form-data']"/> <div v-if='addBtnStart'>
<customerAddAccessory :addBtnStart='addBtnStart' :objectId='objectId' :form-data="$attrs['form-data']"/> <customerAddAddress :objectId='objectId' :form-data="$attrs['form-data']"/>
<customerAddAccessory :objectId='objectId' :form-data="$attrs['form-data']"/>
</div>
<!-- <customerAddAddress :objectId='objectId' :form-data="$attrs['form-data']"/>
<customerAddAccessory :objectId='objectId' :form-data="$attrs['form-data']"/> -->
</div> </div>
</template> </template>
...@@ -242,14 +246,13 @@ export default { ...@@ -242,14 +246,13 @@ export default {
const formData = this.$translateToC4CData(data) const formData = this.$translateToC4CData(data)
formData.extCustomerType_SDK = '121' formData.extCustomerType_SDK = '121'
console.log(formData) console.log(formData)
// this.addBtnStart = true
customerCreate(this.paramsToFormData(formData)).then(res => { customerCreate(this.paramsToFormData(formData)).then(res => {
this.addBtnStart = true this.addBtnStart = true
this.objectId = res.results this.objectId = res.results
const objectID = res.results const objectID = res.results
this.$router.push({ this.$router.push({
path: '/customersAdd', path: '/customersAdd',
query: { objectID: objectID } query: { objectID: objectID, addBtnStart: false}
}) })
this.$message.success('创建成功') this.$message.success('创建成功')
}) })
......
const formConfig = {
labelPosition: 'left',
isShowBackBtn: false,
isShowSubmitBtn: false,
span: 12,
rules: {
newPassword: {
trigger: 'blur',
validator: function(rule, value, callback) {
if (this.formData.Ext_EmployeePassword_KUT === this.formData.newPassword) {
return callback(new Error('原密码与新密码不可一致'))
} else {
return callback()
}
}
},
againPassword: {
trigger: 'blur',
validator: function(rule, value, callback) {
if (this.formData.newPassword !== this.formData.againPassword) {
return callback(new Error('新密码与确认密码不一致'))
} else {
return callback()
}
}
}
},
formDesc: {
Ext_EmployeePassword_KUT: {
label: '原密码登陆',
type: 'input',
layout: 20,
required: true
},
newPassword: {
label: '新密码',
type: 'input',
layout: 20,
required: true
},
againPassword: {
label: '确认密码',
type: 'input',
layout: 20,
required: true
}
}
}
export default {
formConfig
}
...@@ -80,13 +80,9 @@ ...@@ -80,13 +80,9 @@
<!-- <p>创新服务全民</p> <!-- <p>创新服务全民</p>
</div> --> </div> -->
<!-- <el-dialog :title="$t('login.thirdparty')" :visible.sync="showDialog"> <el-dialog :visible.sync="updatePassword">
{{ $t('login.thirdpartyTips') }}
<br> </el-dialog>
<br>
<br>
<social-sign />
</el-dialog> -->
</div> </div>
</template> </template>
...@@ -95,6 +91,7 @@ ...@@ -95,6 +91,7 @@
// import LangSelect from '@/components/LangSelect' // import LangSelect from '@/components/LangSelect'
// import SocialSign from './components/SocialSignin' // import SocialSign from './components/SocialSignin'
import path from 'path'; import path from 'path';
import { update } from '@/api/flow/flow-definition';
export default { export default {
name: 'Login', name: 'Login',
...@@ -128,7 +125,8 @@ export default { ...@@ -128,7 +125,8 @@ export default {
loading: false, loading: false,
showDialog: false, showDialog: false,
redirect: undefined, redirect: undefined,
otherQuery: {} otherQuery: {},
updatePassword: false
} }
}, },
watch: { watch: {
......
...@@ -2,8 +2,8 @@ import { file } from '@/api/customers' ...@@ -2,8 +2,8 @@ import { file } from '@/api/customers'
const tableConfig = { const tableConfig = {
tableTitle: '附件信息', tableTitle: '附件信息',
// url: file.searchUrl, url: file.searchUrl,
url: '', // url: '',
isSearch: true, isSearch: true,
defaultColumns: { defaultColumns: {
minWidth: 120, minWidth: 120,
......
...@@ -20,6 +20,7 @@ ...@@ -20,6 +20,7 @@
:listeners="tableListeners" :listeners="tableListeners"
v-bind="tableConfig" v-bind="tableConfig"
:expand-params="expandParams" :expand-params="expandParams"
:url="url"
@handleSelectionChange="handleSelectionChange" @handleSelectionChange="handleSelectionChange"
/> />
...@@ -100,7 +101,8 @@ export default { ...@@ -100,7 +101,8 @@ export default {
current: null, current: null,
dialogFormVisible: false, dialogFormVisible: false,
dialogTitle: '', dialogTitle: '',
loading: false loading: false,
url: ''
} }
}, },
watch: { watch: {
...@@ -123,6 +125,13 @@ export default { ...@@ -123,6 +125,13 @@ export default {
handleEdit: this.handleEdit, handleEdit: this.handleEdit,
handleDownload: this.handleDownload handleDownload: this.handleDownload
} }
if (this.$attrs['form-data'] && this.$attrs['form-data'].BusinessObjectID) {
this.tableConfig.initialParams = {
BusinessObjectID: this.$attrs['form-data'].BusinessObjectID,
}
} else {
this.tableConfig.url = ''
}
}, },
methods: { methods: {
getDetails(params) { getDetails(params) {
...@@ -180,11 +189,14 @@ export default { ...@@ -180,11 +189,14 @@ export default {
this.loading = false this.loading = false
this.dialogFormVisible = false this.dialogFormVisible = false
this.$message.success('添加成功!') this.$message.success('添加成功!')
this.tableConfig.url = '/search' // this.tableConfig.url = file.searchUrl
// console.log(this.$refs.eleTable.url)
this.$refs.eleTable.url = file.searchUrl
// this.url = file.searchUrl
this.$refs.eleTable.handleSearch() this.$refs.eleTable.handleSearch()
}).catch(() => { }).catch(() => {
this.loading = false this.loading = false
this.tableConfig.url = '/search' // this.tableConfig.url = file.searchUrl
}) })
} else { } else {
formData.append('typeCode', this.typeCode) formData.append('typeCode', this.typeCode)
...@@ -192,7 +204,8 @@ export default { ...@@ -192,7 +204,8 @@ export default {
this.loading = false this.loading = false
this.dialogFormVisible = false this.dialogFormVisible = false
this.$message.success('修改成功!') this.$message.success('修改成功!')
this.tableConfig.url = '/search' // this.tableConfig.url = file.searchUrl
this.$refs.eleTable.url = file.searchUrl
this.$refs.eleTable.handleSearch() this.$refs.eleTable.handleSearch()
}).catch(() => { }).catch(() => {
this.loading = false this.loading = false
...@@ -203,7 +216,7 @@ export default { ...@@ -203,7 +216,7 @@ export default {
this.current = selection.length > 0 ? selection[0] : null this.current = selection.length > 0 ? selection[0] : null
}, },
handleDelete() { handleDelete() {
if (this.selection.length === 0) { if (this.current === null) {
this.$message.warning('请先选择一行数据') this.$message.warning('请先选择一行数据')
return return
} }
...@@ -212,8 +225,9 @@ export default { ...@@ -212,8 +225,9 @@ export default {
cancelButtonText: '取消', cancelButtonText: '取消',
type: 'warning' type: 'warning'
}).then(() => { }).then(() => {
this.$request(file.deleteUrl, { objectID: current.ObjectID }).then(() => { this.$request(file.deleteUrl, { objectID: this.current.ObjectID }).then(() => {
this.$message.success('删除成功!') this.$message.success('删除成功!')
this.$refs.eleTable.url = file.searchUrl
this.$refs.eleTable.handleSearch() this.$refs.eleTable.handleSearch()
} }
) )
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment