|
@@ -19,19 +19,6 @@
|
|
|
>
|
|
|
<!-- 火灾 -->
|
|
|
<el-tab-pane label="火灾" name="Fire">
|
|
|
- <!-- <div class="demo-input-suffix firsttitle"> -->
|
|
|
- <!-- <el-form-item label="火灾源" label-width="formLabelWidth5">
|
|
|
- <el-input v-model="input2"
|
|
|
- class="w-50 m-2"
|
|
|
- placeholder="管道名称"
|
|
|
- :prefix-icon="Search" />
|
|
|
- </el-form-item> -->
|
|
|
- <!-- <div class="btn2">
|
|
|
- <el-button type="success">搜索</el-button>
|
|
|
- </div> -->
|
|
|
- <!-- <div class="btn2">
|
|
|
- <el-button type="success">开始演化</el-button></div>
|
|
|
- </div> -->
|
|
|
<!-- table表 -->
|
|
|
<div class="btn2" style="text-align: right;">
|
|
|
<el-button type="success" @click="newtable();newaddshow=true;">新建</el-button>
|
|
@@ -243,13 +230,13 @@
|
|
|
<el-button
|
|
|
size="small"
|
|
|
type="success"
|
|
|
- @click.stop="handlewater(scope.$index, scope.row)"
|
|
|
+ @click.stop="handlexiugai(scope.$index, scope.row)"
|
|
|
>修改</el-button
|
|
|
>
|
|
|
<el-button
|
|
|
size="small"
|
|
|
type="danger"
|
|
|
- @click="handleDelete(scope.$index, scope.row)"
|
|
|
+ @click="handleDeletefire(scope.$index, scope.row)"
|
|
|
>删除</el-button
|
|
|
>
|
|
|
</template>
|
|
@@ -283,7 +270,7 @@
|
|
|
<div v-show="isDisasterwater">
|
|
|
<h2 style="text-align: left;">灾情源检查表</h2>
|
|
|
<div class="btn2" style="text-align: right;">
|
|
|
- <el-button type="success" @click="dialogVisibleadd=true">新建</el-button>
|
|
|
+ <el-button type="success" @click=" jcyclick();dialogVisibleadd=true">新建</el-button>
|
|
|
</div>
|
|
|
<!-- 灾情源的新增弹框 -->
|
|
|
<el-dialog
|
|
@@ -331,13 +318,13 @@
|
|
|
<el-button
|
|
|
size="small"
|
|
|
type="success"
|
|
|
- @click="handlexiugai(scope.$index, scope.row)"
|
|
|
+ @click="handlexiugai2(scope.$index, scope.row)"
|
|
|
>修改</el-button
|
|
|
>
|
|
|
<el-button
|
|
|
size="small"
|
|
|
type="danger"
|
|
|
- @click="handleDelete(scope.$index, scope.row)"
|
|
|
+ @click="handleDeletede(scope.$index, scope.row)"
|
|
|
>删除</el-button
|
|
|
>
|
|
|
</template>
|
|
@@ -404,6 +391,7 @@
|
|
|
const formLabelWidth5=ref(77)
|
|
|
const multipleTableRef = ref()
|
|
|
const multipleSelection = ref([])
|
|
|
+ let zaiqytabledata=ref([]);
|
|
|
let listArray = ref([
|
|
|
{ id: 0, name: "灾情演化" },
|
|
|
{ id: 1, name: "演化过程" },
|
|
@@ -447,16 +435,12 @@ let paginationConfig=reactive({
|
|
|
// 分页查询
|
|
|
|
|
|
function handleSizeChange(val) {
|
|
|
- //console.log("11111"+val)
|
|
|
}
|
|
|
function handleCurrentChange(val){
|
|
|
- // console.log("22222"+val)
|
|
|
- // currentPage4.value=val
|
|
|
pipelinedata(searchtaggd.value)
|
|
|
}
|
|
|
function handleClick(tab, event){
|
|
|
activeName.value=tab.props.name;
|
|
|
- //console.log(activeName.value);
|
|
|
getdata();
|
|
|
}
|
|
|
//火灾接口查询
|
|
@@ -512,7 +496,6 @@ function pipelinedata(searchtag){
|
|
|
}
|
|
|
|
|
|
function handleClicktable() {
|
|
|
- // console.log('click')
|
|
|
}
|
|
|
function handleSelectionChange(val){
|
|
|
|
|
@@ -547,7 +530,8 @@ function pipelinedata(searchtag){
|
|
|
if(gdadd.value=='1'){
|
|
|
fireadd()
|
|
|
newaddshow.value=false;
|
|
|
- }else if(gdadd.value=='2'){
|
|
|
+ }else if(gdadd.value=='2'){
|
|
|
+ console.log(1111)
|
|
|
gdxiugaifun()
|
|
|
newaddshow.value=false;
|
|
|
}
|
|
@@ -579,13 +563,19 @@ function pipelinedata(searchtag){
|
|
|
}
|
|
|
// 修改
|
|
|
function handlexiugai(index,row){
|
|
|
- gdadd.value='2';
|
|
|
gdxiugai.value=row;
|
|
|
- newaddshow.value=true;
|
|
|
+ gdadd.value='2';//修改跟新建的区分
|
|
|
selectstr.value=row.pname;
|
|
|
source.site=row.site;
|
|
|
firesid.value=row.sid;
|
|
|
- firepid.value=row.pid;
|
|
|
+ if(activeName.value=='Fire'){
|
|
|
+ newaddshow.value=true;
|
|
|
+ }else if(activeName.value=='Water'){
|
|
|
+ waaddshow.value=true;
|
|
|
+ }else{
|
|
|
+
|
|
|
+ }
|
|
|
+
|
|
|
}
|
|
|
// 管道的修改
|
|
|
function gdxiugaifun(){
|
|
@@ -608,12 +598,39 @@ function pipelinedata(searchtag){
|
|
|
})
|
|
|
}
|
|
|
//管道删除
|
|
|
-function handleDeletefire(index,row){
|
|
|
+ function handleDeletefire(index,row){
|
|
|
+ firesid.value=row.sid;
|
|
|
+ ///secondmethod();
|
|
|
+ firstmethod().then(function(){secondmethod()});
|
|
|
+}
|
|
|
+function firstmethod(){
|
|
|
+ return new Promise((resolve)=>{
|
|
|
+ testdata()
|
|
|
+ setTimeout(function(){
|
|
|
+ resolve();
|
|
|
+ },1000)
|
|
|
+ })
|
|
|
+
|
|
|
+}
|
|
|
+ function secondmethod(){
|
|
|
+if(zaiqytabledata.value.length==0){
|
|
|
+ fundeledata();
|
|
|
+ }else{
|
|
|
+ ElMessage({
|
|
|
+ message:'有灾源检测,不能删除',
|
|
|
+ type: "warning",
|
|
|
+ });
|
|
|
+ }
|
|
|
+// },1000)
|
|
|
+ }
|
|
|
+//删除接口
|
|
|
+function fundeledata(){
|
|
|
const params = {
|
|
|
transCode: 'D000011',
|
|
|
- sid:row.sid,
|
|
|
+ sid:firesid.value,
|
|
|
userId:userId.value,
|
|
|
}
|
|
|
+ console.log(params);
|
|
|
request(params)
|
|
|
.then((res) => {
|
|
|
ElMessage({
|
|
@@ -624,17 +641,9 @@ function handleDeletefire(index,row){
|
|
|
})
|
|
|
.catch((err) => {
|
|
|
})
|
|
|
-
|
|
|
}
|
|
|
- function handlewater(index,row){
|
|
|
- gdadd.value='2';
|
|
|
- waaddshow.value=true;
|
|
|
- selectstr.value=row.pname;
|
|
|
- source.site=row.site;
|
|
|
- firesid.value=row.sid;
|
|
|
- firepid.value=row.pid;
|
|
|
- }
|
|
|
|
|
|
+// 灾情源的删除
|
|
|
function handleDelete(index,row) {
|
|
|
|
|
|
}
|
|
@@ -678,7 +687,8 @@ function handleDeletefire(index,row){
|
|
|
testdata()
|
|
|
}
|
|
|
//检测数据
|
|
|
- function testdata(tableD){
|
|
|
+ function testdata(){
|
|
|
+ // zaiqytabledata.value=[];
|
|
|
const params = {
|
|
|
transCode: 'D00007',
|
|
|
sid:firesid.value,
|
|
@@ -686,7 +696,8 @@ function handleDeletefire(index,row){
|
|
|
}
|
|
|
request(params)
|
|
|
.then((res) => {
|
|
|
-
|
|
|
+ zaiqytabledata.value=res.rows;
|
|
|
+ console.log( zaiqytabledata.value)
|
|
|
if(activeName.value=='Fire'){
|
|
|
tableDatafir.value=res.rows;
|
|
|
}else{
|
|
@@ -698,12 +709,17 @@ function handleDeletefire(index,row){
|
|
|
}
|
|
|
//新建灾情源
|
|
|
function jcyclick(){
|
|
|
- jcadd.value='1';
|
|
|
- Disastersource.value.timeline=''
|
|
|
+ Disastersource.value.timeline=''
|
|
|
Disastersource.value.val1=''
|
|
|
Disastersource.value.val2=''
|
|
|
Disastersource.value.val3=''
|
|
|
Disastersource.value.val4=''
|
|
|
+ if(activeName.value=='Fire'){
|
|
|
+ jcadd.value='1';
|
|
|
+ }
|
|
|
+ else if(activeName.value=='Water'){
|
|
|
+ jcadd.value='1';
|
|
|
+ }
|
|
|
}
|
|
|
function newDisaster(){
|
|
|
const params = {
|
|
@@ -754,6 +770,7 @@ function handleDeletefire(index,row){
|
|
|
|
|
|
}
|
|
|
function Disasterclick(){
|
|
|
+ console.log(jcadd.value);
|
|
|
if(jcadd.value=='1'){
|
|
|
newDisaster();
|
|
|
}else if(jcadd.value=='2'){
|
|
@@ -770,6 +787,13 @@ function handlexiugai2(index,row){
|
|
|
Disastersource.value.timeline=row.timeline;
|
|
|
Disastersource.value.val1=row.val1;
|
|
|
Disastersource.value.val2=row.val2;
|
|
|
+ Disastersource.value.val3=row.val3;
|
|
|
+ Disastersource.value.val4=row.val4;
|
|
|
+ Disastersource.value.svid=row.svid;
|
|
|
+ }else if(activeName.value=='Water'){
|
|
|
+ Disastersource.value.timeline=row.timeline;
|
|
|
+ Disastersource.value.val1=row.val1;
|
|
|
+ Disastersource.value.val2=row.val2;
|
|
|
Disastersource.value.val3=row.val3;
|
|
|
Disastersource.value.val4=row.val4;
|
|
|
Disastersource.value.svid=row.svid;
|