Commit e7584b4f authored by tanjunxin's avatar tanjunxin

Merge branch 'information' of...

Merge branch 'information' of http://git.local.topsunit.com/heyuanjiang/topsun-baoshen-excel into information
parents e309e098 5fb9441f
......@@ -25,7 +25,7 @@ const queryFileInfo = async () => {
}
const pageBack = () => {
router.go(-1)
router.push('/order/list')
}
onMounted(() => {
......
......@@ -115,7 +115,7 @@ const submitForm = async () => {
const goBack = () => {
const router = useRouter()
router.go(-1)
router.push('/order/list')
}
</script>
<style lang="scss" scoped></style>
......@@ -9,7 +9,13 @@
><span class="text-gray-500">{{ item.scriptDesc }}</span>
<template v-if="item?.example">
<p class="text-gray-500">示例:</p>
<div class="bg-[#1e293b] p-2 text-white rounded">{{ item.example }}</div>
<div class="bg-[#1e293b] p-2 text-white rounded expample">
{{ item.example }}
</div>
<p class="text-gray-500">返回值:</p>
<div class="bg-[#1e293b] p-2 text-white rounded expample">
{{ item.result }}
</div>
</template>
</li>
</ol>
......@@ -53,4 +59,10 @@ onMounted(() => {
onQueryExlScript()
})
</script>
<style lang="scss" scoped></style>
<style lang="scss" scoped>
.expample {
white-space: pre-wrap;
}
</style>
......@@ -201,7 +201,12 @@ const onReset = () => {
}
const editRow = (row) => {
console.log("查看脚本" + JSON.stringify(row.orders))
Object.assign(formEdit, row)
// jsonStr = JSON.stringify(row.orders);
jsonStr.value = row.orders
console.log(jsonStr.value)
showEdit.value = true
}
......
<template>
<vxe-modal
v-model="showEdit"
:z-index="1006"
@hide="onHide"
title="客户选择"
width="800"
esc-closable
mask-closable
show-footer
>
<template #default>
<vxe-table ref="xTable" border :data="data" size="small" height="400">
<vxe-column v-for="column in titles"
:key="item"
:field="column"
<vxe-modal
v-model="showEdit"
:z-index="1006"
@hide="onHide"
title="客户选择"
width="800"
esc-closable
mask-closable
show-footer
>
<template #default>
<vxe-table ref="xTable" border :data="data" size="small" height="400">
<vxe-column
v-for="column in titles"
:key="item"
:field="column"
:title="column"
show-overflow
width="150">
width="150"
>
</vxe-column>
</vxe-table>
</template>
</vxe-column>
</vxe-table>
</template>
<template #footer>
<el-button type="primary" @click="showEdit = false">关闭</el-button>
</template>
</vxe-modal>
</template>
<script lang="ts">
import { defineComponent, ref, onMounted, reactive, watch, unref } from 'vue'
import { getCustomerPage } from '@/api/customer'
import type { VxeTableInstance } from 'vxe-table'
import { ElMessage } from 'element-plus'
export default defineComponent({
name: 'TemplateVariables',
props: {
visible: {
type: Boolean,
default: false
},
titles: {
type: Array,
default: () => []
},
data: {
type: Array,
default: () => []
}
<template #footer>
<el-button type="primary" @click="exportRunData">导出</el-button>
<el-button type="primary" @click="showEdit = false">关闭</el-button>
</template>
</vxe-modal>
</template>
<script lang="ts">
import { defineComponent, ref, onMounted, reactive, watch, unref } from 'vue'
import { getCustomerPage } from '@/api/customer'
import type { VxeTableInstance } from 'vxe-table'
import { ElMessage } from 'element-plus'
export default defineComponent({
name: 'TemplateVariables',
props: {
visible: {
type: Boolean,
default: false
},
emits: ['update:visible'],
setup(props, { emit }) {
const showEdit = ref(false)
const xTable = ref<VxeTableInstance>()
const tableData = ref([])
watch(
() => props.visible,
(val) => {
showEdit.value = val
}
)
titles: {
type: Array,
default: () => []
},
data: {
type: Array,
default: () => []
}
},
emits: ['update:visible'],
setup(props, { emit }) {
const showEdit = ref(false)
const xTable = ref<VxeTableInstance>()
const tableData = ref([])
const onHide = () => {
emit('update:visible', false)
}
return {
showEdit,
xTable,
tableData,
onHide,
watch(
() => props.visible,
(val) => {
showEdit.value = val
}
)
const onHide = () => {
emit('update:visible', false)
}
const exportRunData = () => {
xTable.value?.exportData({ type: 'csv' })
}
return {
showEdit,
xTable,
tableData,
onHide,
exportRunData
}
})
</script>
<style lang="scss" scoped></style>
\ No newline at end of file
}
})
</script>
<style lang="scss" scoped></style>
......@@ -25,7 +25,7 @@ const queryFileInfo = async () => {
}
const pageBack = () => {
router.go(-1)
router.push('/order/list')
}
onMounted(() => {
......
......@@ -160,7 +160,7 @@ const submitForm = async () => {
const goBack = () => {
const router = useRouter()
router.go(-1)
router.push('/order/list')
}
</script>
<style lang="scss" scoped></style>
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