|
@@ -0,0 +1,95 @@
|
|
|
+<template>
|
|
|
+ <template-page ref="pageRef" :get-list="getList" :table-attributes="tableAttributes" :table-events="tableEvents"
|
|
|
+ :options-evens-group="optionsEvensGroup" :moreParameters="moreParameters" :column-parsing="columnParsing"
|
|
|
+ :exportList="exportList">
|
|
|
+ </template-page>
|
|
|
+</template>
|
|
|
+
|
|
|
+<script>
|
|
|
+import TemplatePage from '@/components/template/template-page-1.vue'
|
|
|
+import import_mixin from '@/components/template/import_mixin.js'
|
|
|
+import ImageUpload from '@/components/file-upload'
|
|
|
+import { required, mobileRequired, mobile, httpUrl, email } from '@/components/template/rules_verify.js'
|
|
|
+import { listPageV2,pageExport } from "@/api/workOrder/appraise";
|
|
|
+export default {
|
|
|
+ components: { TemplatePage, ImageUpload },
|
|
|
+ mixins: [import_mixin],
|
|
|
+ data() {
|
|
|
+ return {
|
|
|
+ // 事件组合
|
|
|
+ optionsEvensGroup: [],
|
|
|
+ // 表格属性
|
|
|
+ tableAttributes: {
|
|
|
+ // 启用勾选列
|
|
|
+ selectColumn: false
|
|
|
+ },
|
|
|
+ // 表格事件
|
|
|
+ tableEvents: {
|
|
|
+ 'selection-change': this.selectionChange
|
|
|
+ },
|
|
|
+ // 勾选选中行
|
|
|
+ recordSelected: [],
|
|
|
+ /** 表单变量 */
|
|
|
+ formDialogType: 0,
|
|
|
+ formDialogTitles: ["新增","编辑", "详情"],
|
|
|
+ formDialog: false,
|
|
|
+ }
|
|
|
+ },
|
|
|
+ computed: {
|
|
|
+ // 更多参数
|
|
|
+ moreParameters() {
|
|
|
+ return []
|
|
|
+ },
|
|
|
+ formItems() {
|
|
|
+ return []
|
|
|
+ }
|
|
|
+ },
|
|
|
+ methods: {
|
|
|
+ // 列表请求函数
|
|
|
+ getList: listPageV2,
|
|
|
+ // 列表导出函数
|
|
|
+ exportList: pageExport,
|
|
|
+ // 表格列解析渲染数据更改
|
|
|
+ columnParsing(item, defaultData) {
|
|
|
+ if (item.jname === 'id') {
|
|
|
+ defaultData.render = (h, { row, index, column }) => {
|
|
|
+ return (
|
|
|
+ <div style="display: flex;">
|
|
|
+ <div style="cursor: pointer;color: #008dd4;margin-right: 10px">{row.id}</div>
|
|
|
+ <div style="cursor: pointer;color: #008dd4" onClick={()=>{
|
|
|
+ var oInput = document.createElement('input');
|
|
|
+ oInput.value = row.id;
|
|
|
+ document.body.appendChild(oInput);
|
|
|
+ oInput.select();
|
|
|
+ document.execCommand("Copy");
|
|
|
+ oInput.className = 'oInput';
|
|
|
+ oInput.style.display = 'none';
|
|
|
+ this.$message({
|
|
|
+ type: 'success',
|
|
|
+ message: '复制成功!'
|
|
|
+ });
|
|
|
+ }}>复制</div>
|
|
|
+ </div>
|
|
|
+ )
|
|
|
+ }
|
|
|
+ defaultData.columnAttributes.width = 220
|
|
|
+ }
|
|
|
+ return defaultData
|
|
|
+ },
|
|
|
+ // 监听勾选变化
|
|
|
+ selectionChange(data) {
|
|
|
+ this.recordSelected = data
|
|
|
+ },
|
|
|
+ // 表格操作列
|
|
|
+ operation(h, { row, index, column }) {
|
|
|
+
|
|
|
+ }
|
|
|
+ }
|
|
|
+}
|
|
|
+</script>
|
|
|
+
|
|
|
+<style lang="scss" scoped>
|
|
|
+ .tab{
|
|
|
+ padding: 20px 20px 0 20px;
|
|
|
+ }
|
|
|
+</style>
|