通讯录导入前端
This commit is contained in:
@@ -556,12 +556,12 @@ class WorkbenchController extends Controller
|
||||
}
|
||||
break;
|
||||
case self::TYPE_IMPORT_CONTACT:
|
||||
if (!empty($item->importContact)) {
|
||||
$item->config = $item->importContact;
|
||||
$item->config->devices = json_decode($item->config->devices, true);
|
||||
$item->config->pools = json_decode($item->config->pools, true);
|
||||
if (!empty($workbench->importContact)) {
|
||||
$workbench->config = $workbench->importContact;
|
||||
$workbench->config->devices = json_decode($workbench->config->devices, true);
|
||||
$workbench->config->pools = json_decode($workbench->config->pools, true);
|
||||
}
|
||||
unset($item->importContact, $item->import_contact);
|
||||
unset($workbench->importContact, $workbench->import_contact);
|
||||
break;
|
||||
}
|
||||
unset(
|
||||
@@ -991,11 +991,12 @@ class WorkbenchController extends Controller
|
||||
}
|
||||
break;
|
||||
case self::TYPE_IMPORT_CONTACT: //联系人导入
|
||||
$config = WorkbenchImportContact::where('workbenchId',$id)->find();;
|
||||
$config = WorkbenchImportContact::where('workbenchId',$id)->find();
|
||||
if ($config) {
|
||||
$newConfig = new WorkbenchImportContact;
|
||||
$newConfig->devices = json_encode($config->deveiceGroups);
|
||||
$newConfig->pools = json_encode($config->pools);
|
||||
$newConfig->workbenchId = $newWorkbench->id;
|
||||
$newConfig->devices = $config->devices;
|
||||
$newConfig->pools = $config->pools;
|
||||
$newConfig->num = $config->num;
|
||||
$newConfig->clearContact = $config->clearContact;
|
||||
$newConfig->remark = $config->remark;
|
||||
|
||||
@@ -64,7 +64,7 @@ class Workbench extends Model
|
||||
|
||||
public function importContact()
|
||||
{
|
||||
return $this->hasOne('WorkbenchTrafficConfig', 'workbenchId', 'id');
|
||||
return $this->hasOne('WorkbenchImportContact', 'workbenchId', 'id');
|
||||
}
|
||||
|
||||
|
||||
|
||||
Reference in New Issue
Block a user