|
@@ -21,7 +21,18 @@
|
|
|
:rowSelection="tableType == 3 ? false : rowSelection"
|
|
|
>
|
|
|
<template #toolbar>
|
|
|
- <a-button type="primary" @click="handleMoveAll" v-if="tableType != 3 && tableType != 57 && tableType != 58 && getCheckPerm('scenes-move-batch')"> 批量迁移</a-button>
|
|
|
+ <a-button
|
|
|
+ type="primary"
|
|
|
+ @click="handleMoveAll"
|
|
|
+ v-if="
|
|
|
+ tableType != 3 &&
|
|
|
+ tableType != 57 &&
|
|
|
+ tableType != 58 &&
|
|
|
+ getCheckPerm('scenes-move-batch')
|
|
|
+ "
|
|
|
+ >
|
|
|
+ 批量迁移</a-button
|
|
|
+ >
|
|
|
</template>
|
|
|
<template #status="{ record }">
|
|
|
<span v-if="record.status != '-1'">{{ record.statusString }}</span>
|
|
@@ -55,7 +66,11 @@
|
|
|
{
|
|
|
label: '迁移',
|
|
|
disabled: !(record.status == 1 || record.status == -2),
|
|
|
- ifShow: getTypeCheckPerm('scenes-move') && tableType != 3 && tableType != 57 && tableType != 58,
|
|
|
+ ifShow:
|
|
|
+ getTypeCheckPerm('scenes-move') &&
|
|
|
+ tableType != 3 &&
|
|
|
+ tableType != 57 &&
|
|
|
+ tableType != 58,
|
|
|
onClick: handleMove.bind(null, record),
|
|
|
},
|
|
|
{
|
|
@@ -80,7 +95,11 @@
|
|
|
label: '重算',
|
|
|
disabled: record.status == 0 || (record.status == -2 && record.payStatus != 1),
|
|
|
ifShow:
|
|
|
- getTypeCheckPerm('scenes-recalculate') && tableType != 3 && record.status != -4 && tableType != 57 && tableType != 58,
|
|
|
+ getTypeCheckPerm('scenes-recalculate') &&
|
|
|
+ tableType != 3 &&
|
|
|
+ record.status != -4 &&
|
|
|
+ tableType != 57 &&
|
|
|
+ tableType != 58,
|
|
|
popConfirm: {
|
|
|
title: '是否重算?',
|
|
|
confirm: handleReset.bind(null, record),
|
|
@@ -89,7 +108,11 @@
|
|
|
{
|
|
|
label: '复制',
|
|
|
disabled: !(record.status == 1 || (record.status == -2 && record.payStatus == 1)),
|
|
|
- ifShow: getTypeCheckPerm('scenes-copy') && tableType != 3 && tableType != 57 && tableType != 58,
|
|
|
+ ifShow:
|
|
|
+ getTypeCheckPerm('scenes-copy') &&
|
|
|
+ tableType != 3 &&
|
|
|
+ tableType != 57 &&
|
|
|
+ tableType != 58,
|
|
|
onClick: handleCopy.bind(null, record),
|
|
|
},
|
|
|
{
|
|
@@ -209,7 +232,6 @@
|
|
|
percent: 0,
|
|
|
};
|
|
|
console.log('取消下载', downloadOption.value);
|
|
|
-
|
|
|
}
|
|
|
const [registerPriority, { openModal: openPriorityModal }] = useModal();
|
|
|
const [registerDownModal, { openModal: openDownModal, closeModal }] = useModal();
|
|
@@ -222,15 +244,17 @@
|
|
|
title: `场景列表`,
|
|
|
columns: getColumns(false),
|
|
|
// rowSelection: { type: 'checkbox' },
|
|
|
- searchInfo: props.userName?{ type: tableType, userName: props.userName }:{type: tableType},
|
|
|
+ searchInfo: props.userName
|
|
|
+ ? { type: tableType, userName: props.userName }
|
|
|
+ : { type: tableType },
|
|
|
useSearchForm: true,
|
|
|
formConfig: searchFormSs,
|
|
|
showTableSetting: true,
|
|
|
beforeFetch: (T) => {
|
|
|
loading.value = true;
|
|
|
if (T.shootCounts) {
|
|
|
- let min = T.shootCounts[0]<T.shootCounts[1]?T.shootCounts[0]:T.shootCounts[1];
|
|
|
- let max = T.shootCounts[0]>T.shootCounts[1]?T.shootCounts[0]:T.shootCounts[1];
|
|
|
+ let min = T.shootCounts[0] < T.shootCounts[1] ? T.shootCounts[0] : T.shootCounts[1];
|
|
|
+ let max = T.shootCounts[0] > T.shootCounts[1] ? T.shootCounts[0] : T.shootCounts[1];
|
|
|
T.shootCountMin = min;
|
|
|
T.shootCountMax = max;
|
|
|
}
|
|
@@ -261,9 +285,9 @@
|
|
|
function changeTable(val: string) {
|
|
|
tableType.value = val;
|
|
|
let sgetForm = getForm();
|
|
|
- if(sgetForm){
|
|
|
- sgetForm.resetFields()
|
|
|
- sgetForm.updateSchema(getSchemas(val, props.userName))
|
|
|
+ if (sgetForm) {
|
|
|
+ sgetForm.resetFields();
|
|
|
+ sgetForm.updateSchema(getSchemas(val, props.userName));
|
|
|
}
|
|
|
console.log('sgetForm', sgetForm, val);
|
|
|
setColumns(getColumns(val));
|
|
@@ -339,7 +363,12 @@
|
|
|
function handleDownload(record: Recordable) {
|
|
|
let isObj = tableType.value == 5 || tableType.value == 7 || tableType.value == 58 ? 1 : 0;
|
|
|
let params = { num: record.num, isObj: 0 };
|
|
|
- if (tableType.value == 4 || tableType.value == 5 || tableType.value == 7 || tableType.value == 58) {
|
|
|
+ if (
|
|
|
+ tableType.value == 4 ||
|
|
|
+ tableType.value == 5 ||
|
|
|
+ tableType.value == 7 ||
|
|
|
+ tableType.value == 58
|
|
|
+ ) {
|
|
|
params.isObj = isObj;
|
|
|
}
|
|
|
canDownload.value = true;
|
|
@@ -357,20 +386,7 @@
|
|
|
if (timer.value) {
|
|
|
afterClose();
|
|
|
}
|
|
|
- timer.value = setInterval(() => {
|
|
|
- downloadProcess(params).then((processres) => {
|
|
|
- console.log('processres', res, params);
|
|
|
- if (processres.percent >= 100) {
|
|
|
- canDownload.value = false;
|
|
|
- afterClose();
|
|
|
- window.open(res.url);
|
|
|
- closeModal();
|
|
|
- cancelDownload();
|
|
|
- }
|
|
|
- downloadOption.value = processres;
|
|
|
- console.log(processres);
|
|
|
- });
|
|
|
- }, 1000);
|
|
|
+ getProcess(params);
|
|
|
}
|
|
|
} else {
|
|
|
window.open(res.downloadUrl);
|
|
@@ -381,6 +397,23 @@
|
|
|
clearInterval(timer.value);
|
|
|
timer.value = null;
|
|
|
}
|
|
|
+ function getProcess(params) {
|
|
|
+ timer.value = setTimeout(() => {
|
|
|
+ downloadProcess(params).then((processres) => {
|
|
|
+ console.log('processres', processres, params);
|
|
|
+ if (processres.percent >= 100) {
|
|
|
+ canDownload.value = false;
|
|
|
+ afterClose();
|
|
|
+ window.open(processres.url);
|
|
|
+ closeModal();
|
|
|
+ cancelDownload();
|
|
|
+ } else {
|
|
|
+ getProcess(params);
|
|
|
+ }
|
|
|
+ downloadOption.value = processres;
|
|
|
+ });
|
|
|
+ }, 1000);
|
|
|
+ }
|
|
|
function handleReset(record: Recordable) {
|
|
|
console.log('handleReset', record);
|
|
|
rebuildScene({ num: record.num }).then(() => {
|