|
|
@@ -42,7 +42,7 @@
|
|
|
|
|
|
<el-card shadow="never">
|
|
|
|
|
|
- <tableElm :columns="columns" @childToParent='childrenClick' ref="table"></tableElm>
|
|
|
+ <tableElm :columns="columns" @childToParent='childrenClick' :showButton="false" ref="table"></tableElm>
|
|
|
|
|
|
<pagination v-show="total > 0" :total="total" v-model:page="queryParams.pageNum"
|
|
|
v-model:limit="queryParams.pageSize" @pagination="getList" />
|
|
|
@@ -62,6 +62,7 @@
|
|
|
</template>
|
|
|
</el-dialog>
|
|
|
</div>
|
|
|
+
|
|
|
</template>
|
|
|
|
|
|
<script setup name="CarInfo" lang="ts">
|
|
|
@@ -70,6 +71,8 @@ import { CarInfoVO, CarInfoQuery, CarInfoForm } from '@/api/carInfo/types';
|
|
|
import tableElm from "@/components/Public/table.vue";
|
|
|
import { useRoute, useRouter } from "vue-router";
|
|
|
import useTagsViewStore from '@/store/modules/tagsView';
|
|
|
+import { h } from 'vue';
|
|
|
+import { ElButton,ElMessage } from 'element-plus'
|
|
|
|
|
|
const route = useRoute();
|
|
|
const router = useRouter();
|
|
|
@@ -102,6 +105,29 @@ const columns = ref([
|
|
|
{ label: '车辆分类', prop: 'carType', pprop: "ext1", visible: true, isTemplate: false, isTemplateJson: false ,dict:"tbl_car_type"},
|
|
|
{ label: '网格', prop: 'wangge', pprop: "ext1", visible: true, isTemplate: false, isTemplateJson: true },
|
|
|
{ label: '单位', prop: 'dept', pprop: "ext1", visible: true, isTemplate: false, isTemplateJson: true },
|
|
|
+ {
|
|
|
+ label: '操作', custom: true, visible: true, render: (data) => {
|
|
|
+
|
|
|
+ return h('div',[h(ElButton, {
|
|
|
+ type: 'primary', // 组件属性
|
|
|
+ link:true,
|
|
|
+ onClick: () => {
|
|
|
+ handleUpdate(data)
|
|
|
+ },
|
|
|
+ },'管理'),h(ElButton, {
|
|
|
+ type: 'danger', // 组件属性
|
|
|
+ link:true,
|
|
|
+ onClick: () => {
|
|
|
+ handleDelete(data)
|
|
|
+ },
|
|
|
+ },'删除')].concat(data.carType==1?[h(ElButton, {
|
|
|
+ type: 'primary', // 组件属性
|
|
|
+ link:true,
|
|
|
+ onClick: () => {
|
|
|
+ ElMessage.success("sss")
|
|
|
+ },
|
|
|
+ },'查看地图')]:[])) ;
|
|
|
+ } },
|
|
|
])
|
|
|
|
|
|
const initFormData: CarInfoForm = {
|