|
@@ -73,6 +73,47 @@
|
|
|
@on-close="handleUpdataWorkspaceTab"
|
|
@on-close="handleUpdataWorkspaceTab"
|
|
|
@on-ok="subWorkspace"
|
|
@on-ok="subWorkspace"
|
|
|
/>
|
|
/>
|
|
|
|
|
+
|
|
|
|
|
+ <el-dialog
|
|
|
|
|
+ v-model="dialogVisible"
|
|
|
|
|
+ title="添加企业信息"
|
|
|
|
|
+ width="500"
|
|
|
|
|
+
|
|
|
|
|
+ >
|
|
|
|
|
+ <!-- <span>This is a message</span> -->
|
|
|
|
|
+ <div >
|
|
|
|
|
+ <div class="relate-select">
|
|
|
|
|
+ <div class='select-title'>企业分类</div>
|
|
|
|
|
+ <el-select v-model="companyType" placeholder="请选择企业类型" style="width:180px" >
|
|
|
|
|
+ <el-option v-for="item in options" :key="item.value" :label="item.label" :value="item.value" />
|
|
|
|
|
+ </el-select>
|
|
|
|
|
+ </div>
|
|
|
|
|
+ <div class="relate-select">
|
|
|
|
|
+ <div class='select-title'>企业名称</div>
|
|
|
|
|
+ <el-select v-model="tenantName" placeholder="请选择企业租户信息" style="width:180px" @change="changeCom" >
|
|
|
|
|
+ <el-option v-for="item in companyList" :key="item.tenantCode" :label="item.tenantName" :value="item.tenantCode" />
|
|
|
|
|
+ </el-select>
|
|
|
|
|
+ </div>
|
|
|
|
|
+ <div v-if="tenantCode" class="relate-select">
|
|
|
|
|
+ <div class='select-title'>企业租户信息</div>
|
|
|
|
|
+ <el-input
|
|
|
|
|
+ v-model="tenantCode"
|
|
|
|
|
+ style="width: 180px"
|
|
|
|
|
+ disabled
|
|
|
|
|
+ />
|
|
|
|
|
+ </div>
|
|
|
|
|
+
|
|
|
|
|
+ </div>
|
|
|
|
|
+ <template #footer>
|
|
|
|
|
+
|
|
|
|
|
+ <div class="dialog-footer">
|
|
|
|
|
+ <el-button @click="dialogVisible =false">取消</el-button>
|
|
|
|
|
+ <el-button type="primary" @click="close">
|
|
|
|
|
+ 确定
|
|
|
|
|
+ </el-button>
|
|
|
|
|
+ </div>
|
|
|
|
|
+ </template>
|
|
|
|
|
+ </el-dialog>
|
|
|
</page-wrapper>
|
|
</page-wrapper>
|
|
|
</template>
|
|
</template>
|
|
|
|
|
|
|
@@ -80,7 +121,7 @@
|
|
|
import { ref, onMounted, reactive, h, computed } from 'vue';
|
|
import { ref, onMounted, reactive, h, computed } from 'vue';
|
|
|
import { Plus } from '@element-plus/icons-vue';
|
|
import { Plus } from '@element-plus/icons-vue';
|
|
|
import { BasicTable, BasicColumn } from '@/components/Table';
|
|
import { BasicTable, BasicColumn } from '@/components/Table';
|
|
|
- import { ElMessageBox } from 'element-plus';
|
|
|
|
|
|
|
+ import { ElMessage, ElMessageBox } from 'element-plus';
|
|
|
import ActionColomn from './actionColomns.vue';
|
|
import ActionColomn from './actionColomns.vue';
|
|
|
import CompanyDrawer from './CompanyDrawer.vue';
|
|
import CompanyDrawer from './CompanyDrawer.vue';
|
|
|
import WorkshopDrawer from './WorkshopDrawer.vue';
|
|
import WorkshopDrawer from './WorkshopDrawer.vue';
|
|
@@ -93,6 +134,7 @@
|
|
|
removeParent,
|
|
removeParent,
|
|
|
flattenCodes,
|
|
flattenCodes,
|
|
|
getParent,
|
|
getParent,
|
|
|
|
|
+ options,
|
|
|
} from './use-method.tsx';
|
|
} from './use-method.tsx';
|
|
|
import {
|
|
import {
|
|
|
ComAddDatas,
|
|
ComAddDatas,
|
|
@@ -103,12 +145,19 @@
|
|
|
delWorkspace,
|
|
delWorkspace,
|
|
|
sortSceneList,
|
|
sortSceneList,
|
|
|
} from '@/api/scene/sceneOperate';
|
|
} from '@/api/scene/sceneOperate';
|
|
|
|
|
+ import {
|
|
|
|
|
+ getCompanyList,
|
|
|
|
|
+ CompanyType,
|
|
|
|
|
+ changeRelate,
|
|
|
|
|
+ } from '@/api/scene/scene-relate';
|
|
|
import useScene from './use-scene';
|
|
import useScene from './use-scene';
|
|
|
import useSceneTemplete from './use-sence-templete';
|
|
import useSceneTemplete from './use-sence-templete';
|
|
|
import { useRouter } from 'vue-router';
|
|
import { useRouter } from 'vue-router';
|
|
|
import { storeToRefs } from 'pinia';
|
|
import { storeToRefs } from 'pinia';
|
|
|
import { cloneDeep } from 'lodash-es';
|
|
import { cloneDeep } from 'lodash-es';
|
|
|
|
|
|
|
|
|
|
+
|
|
|
|
|
+
|
|
|
const router = useRouter();
|
|
const router = useRouter();
|
|
|
|
|
|
|
|
const useSceneList = useScene();
|
|
const useSceneList = useScene();
|
|
@@ -127,6 +176,48 @@
|
|
|
const page = ref(1);
|
|
const page = ref(1);
|
|
|
const size = ref(10);
|
|
const size = ref(10);
|
|
|
const total = computed(() => tableData.value.length);
|
|
const total = computed(() => tableData.value.length);
|
|
|
|
|
+ const dialogVisible =ref<boolean>(false)
|
|
|
|
|
+ const companyType = ref('')
|
|
|
|
|
+ // const companyId = ref('')
|
|
|
|
|
+ const tenantName = ref('')
|
|
|
|
|
+ const tenantCode = ref('')
|
|
|
|
|
+ const tenantId = ref()
|
|
|
|
|
+ const companyList = ref<CompanyType[]>([])
|
|
|
|
|
+
|
|
|
|
|
+ const reset=()=>{
|
|
|
|
|
+ dialogVisible.value = false;
|
|
|
|
|
+ tenantName.value = '';
|
|
|
|
|
+ tenantCode.value = '';
|
|
|
|
|
+ tenantId.value = null;
|
|
|
|
|
+ companyType.value =''
|
|
|
|
|
+ }
|
|
|
|
|
+
|
|
|
|
|
+const close = ()=>{
|
|
|
|
|
+
|
|
|
|
|
+ const subData = {
|
|
|
|
|
+ tenantCode: tenantCode.value,
|
|
|
|
|
+ tenantId: tenantId.value,
|
|
|
|
|
+ type:companyType.value,
|
|
|
|
|
+ }
|
|
|
|
|
+ changeRelate(subData).then(()=>{
|
|
|
|
|
+ ElMessage({
|
|
|
|
|
+ message: '绑定成功',
|
|
|
|
|
+ type: 'success',
|
|
|
|
|
+ })
|
|
|
|
|
+ reset();
|
|
|
|
|
+ })
|
|
|
|
|
+
|
|
|
|
|
+}
|
|
|
|
|
+ const changeCom = (val:any)=>{
|
|
|
|
|
+ console.log(val);
|
|
|
|
|
+ const item = companyList.value.find((item)=>item.tenantCode===val)
|
|
|
|
|
+ console.log('item',item);
|
|
|
|
|
+ tenantName.value = item?.tenantName!
|
|
|
|
|
+ tenantId.value = item?.tenantId!
|
|
|
|
|
+ tenantCode.value = val
|
|
|
|
|
+ // tenantCode.value = item.tenantCode
|
|
|
|
|
+ // tenantId.value = item.tenantId
|
|
|
|
|
+ }
|
|
|
|
|
|
|
|
//改变el-drawer公司的状态
|
|
//改变el-drawer公司的状态
|
|
|
const handleUpdateTableCom = () => {
|
|
const handleUpdateTableCom = () => {
|
|
@@ -154,6 +245,9 @@
|
|
|
|
|
|
|
|
//获取tableData数据
|
|
//获取tableData数据
|
|
|
getSceneDetail();
|
|
getSceneDetail();
|
|
|
|
|
+ getCompanyList().then((res)=>{
|
|
|
|
|
+ companyList.value = res
|
|
|
|
|
+ })
|
|
|
});
|
|
});
|
|
|
|
|
|
|
|
function onCheckedRow(rowKeys) {
|
|
function onCheckedRow(rowKeys) {
|
|
@@ -200,7 +294,7 @@
|
|
|
|
|
|
|
|
//操作列
|
|
//操作列
|
|
|
const actionColumn: BasicColumn = reactive({
|
|
const actionColumn: BasicColumn = reactive({
|
|
|
- width: 350,
|
|
|
|
|
|
|
+ width: 360,
|
|
|
label: '操作',
|
|
label: '操作',
|
|
|
prop: 'booking',
|
|
prop: 'booking',
|
|
|
key: 'action',
|
|
key: 'action',
|
|
@@ -210,6 +304,7 @@
|
|
|
// rowUpDisable:
|
|
// rowUpDisable:
|
|
|
// rowDownDisable:
|
|
// rowDownDisable:
|
|
|
subItem: record.row,
|
|
subItem: record.row,
|
|
|
|
|
+ handleRelate:handleRelate,
|
|
|
handleConig: handleConfig,
|
|
handleConig: handleConfig,
|
|
|
handleAdd: handleAdd,
|
|
handleAdd: handleAdd,
|
|
|
handleEdit: handleEdit,
|
|
handleEdit: handleEdit,
|
|
@@ -220,6 +315,13 @@
|
|
|
},
|
|
},
|
|
|
});
|
|
});
|
|
|
|
|
|
|
|
|
|
+
|
|
|
|
|
+ //绑定
|
|
|
|
|
+ const handleRelate=(row)=>{
|
|
|
|
|
+ console.log('row',row);
|
|
|
|
|
+ dialogVisible.value = true
|
|
|
|
|
+ }
|
|
|
|
|
+
|
|
|
//页面设置函数
|
|
//页面设置函数
|
|
|
const handleConfig = (row) => {
|
|
const handleConfig = (row) => {
|
|
|
router.push({
|
|
router.push({
|
|
@@ -434,4 +536,16 @@
|
|
|
border-radius: 4px;
|
|
border-radius: 4px;
|
|
|
border: 1px solid rgba(0, 0, 0, 0.15);
|
|
border: 1px solid rgba(0, 0, 0, 0.15);
|
|
|
}
|
|
}
|
|
|
|
|
+
|
|
|
|
|
+ .relate-select{
|
|
|
|
|
+ display: flex;
|
|
|
|
|
+
|
|
|
|
|
+ align-items: center;
|
|
|
|
|
+ margin-bottom: 20px
|
|
|
|
|
+ }
|
|
|
|
|
+
|
|
|
|
|
+ .select-title{
|
|
|
|
|
+ width:100px;
|
|
|
|
|
+ margin-right: 20px
|
|
|
|
|
+ }
|
|
|
</style>
|
|
</style>
|